Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95399

MQTT finds device but doesn't show

$
0
0

@whatisk wrote:

I am looking at getting rid of my current Xiaomi Gateway and have setup Mosquito Broker and Zigbee2MQTT as per the instructions I have found (I have the board configured). And they appear to talk to one another without issue. I also setup the 10min timer for discovering devices as found in the documentation.

When trying to add a new Zigbee device, looking at the logs of Zigbee2MQTT it appears to find the device and it’s details okay, but I cannot find the device as an Entity anywhere.

Have included logs and configuraton below. Not sure why the devices aren’t showing. Running Hass.IO 0.107.7 as a fresh install before doing anything with my currenty running install (using Xiaomi Gateway).
Configuration.yaml

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

mqtt:
  broker: core-mosquitto # This will have to be your mqtt broker, Mosquitto addon is recommended.
  discovery: true

input_boolean:
  zigbee_permit_join:
    name: Allow devices to join
    initial: off
    icon: mdi:cellphone-wireless

timer:
  zigbee_permit_join:
    name: Time remaining
    duration: 600 # Updated this to the number of seconds you wish

sensor:
  - platform: mqtt
    name: Bridge state
    state_topic: "zigbee2mqtt/bridge/state"
    icon: mdi:router-wireless

automation:
  - id: enable_zigbee_join
    alias: Enable Zigbee joining
    trigger:
      platform: state
      entity_id: input_boolean.zigbee_permit_join
      to: 'on'
    action:
    - service: mqtt.publish
      data:
        topic: zigbee2mqtt/bridge/config/permit_join
        payload: 'true'
    - service: timer.start
      data:
        entity_id: timer.zigbee_permit_join
  - id: disable_zigbee_join
    alias: Disable Zigbee joining
    trigger:
    - entity_id: input_boolean.zigbee_permit_join
      platform: state
      to: 'off'
    action:
    - data:
        payload: 'false'
        topic: zigbee2mqtt/bridge/config/permit_join
      service: mqtt.publish
    - data:
        entity_id: timer.zigbee_permit_join
      service: timer.cancel
  - id: disable_zigbee_join_timer
    alias: Disable Zigbee joining by timer
    trigger:
    - platform: event
      event_type: timer.finished
      event_data:
        entity_id: timer.zigbee_permit_join
    action:
    - service: mqtt.publish
      data:
        topic: zigbee2mqtt/bridge/config/permit_join
        payload: 'false'
    - service: input_boolean.turn_off
      data:
        entity_id: input_boolean.zigbee_permit_join

Mosquito Broker config:

logins: []
anonymous: false
customize:
  active: false
  folder: mosquitto
certfile: fullchain.pem
keyfile: privkey.pem
require_certificate: false

Mosquito Broker log:

[11:15:32] INFO: Setup mosquitto configuration
[11:15:32] WARNING: SSL not enabled - No valid certs found!
[11:15:32] INFO: No local user available
[11:15:32] INFO: Initialize Hass.io Add-on services
[11:15:32] INFO: Initialize Home Assistant discovery
[11:15:32] INFO: Start Mosquitto daemon
1586567732: mosquitto version 1.6.3 starting
1586567732: Config loaded from /etc/mosquitto.conf.
1586567732: Loading plugin: /usr/share/mosquitto/auth-plug.so
1586567732: |-- *** auth-plug: startup
1586567732:  ├── Username/password checking enabled.
1586567732:  ├── TLS-PSK checking enabled.
1586567732:  └── Extended authentication not enabled.
1586567732: Opening ipv4 listen socket on port 1883.
1586567732: Opening ipv6 listen socket on port 1883.
1586567732: Opening websockets listen socket on port 1884.
1586567732: Warning: Mosquitto should not be run as root/administrator.
1586567733: New connection from 172.30.33.1 on port 1883.
[INFO] found mqtt on Home Assistant
1586567733: New client connected from 172.30.33.1 as mqttjs_dd849d93 (p2, c1, k60, u'mqtt').
1586567806: New connection from 172.30.32.1 on port 1883.
[INFO] found homeassistant on local database
1586567806: New client connected from 172.30.32.1 as auto-A0E17B1C-B4F5-BCF7-3F5D-4D41789B3C14 (p2, c1, k60, u'homeassistant').

Zigbee2MQTT config:

data_path: /share/zigbee2mqtt
devices: devices.yaml
groups: groups.yaml
homeassistant: true
permit_join: false
mqtt:
  base_topic: zigbee2mqtt
  server: 'mqtt://core-mosquitto'
  user: <user>
  password: <password>
serial:
  port: /dev/ttyACM0
advanced:
  pan_id: 6754
  channel: 11
  network_key:
    - 1
    - 3
    - 5
    - 7
    - 9
    - 11
    - 13
    - 15
    - 0
    - 2
    - 4
    - 6
    - 8
    - 10
    - 12
    - 13
  availability_blacklist: []
ban: []
whitelist: []
queue: {}
socat:
  enabled: false
  master: 'pty,raw,echo=0,link=/dev/ttyZ2M,mode=777'
  slave: 'tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5'
  restartdelay: 1
  initialdelay: 1
  options: '-d -d'
  log: false

Zigbee2MQTT log:

zigbee2mqtt:info  2020-04-11 11:05:46: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"device_removed","message":"left_network","meta":{"friendly_name":"0x00158d0001dc0a1a"}}'
zigbee2mqtt:info  2020-04-11 11:05:53: Device '0x00158d0001dc0a1a' joined
zigbee2mqtt:info  2020-04-11 11:05:53: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"device_connected","message":{"friendly_name":"0x00158d0001dc0a1a"}}'
zigbee2mqtt:info  2020-04-11 11:05:53: Starting interview of '0x00158d0001dc0a1a'
zigbee2mqtt:info  2020-04-11 11:05:53: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"interview_started","meta":{"friendly_name":"0x00158d0001dc0a1a"}}'
zigbee2mqtt:info  2020-04-11 11:05:54: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"device_announced","message":"announce","meta":{"friendly_name":"0x00158d0001dc0a1a"}}'
zigbee2mqtt:info  2020-04-11 11:05:54: Successfully interviewed '0x00158d0001dc0a1a', device has successfully been paired
zigbee2mqtt:info  2020-04-11 11:05:54: Device '0x00158d0001dc0a1a' is supported, identified as: Xiaomi Mi power plug ZigBee (ZNCZ02LM)
zigbee2mqtt:info  2020-04-11 11:05:54: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"interview_successful","meta":{"friendly_name":"0x00158d0001dc0a1a","model":"ZNCZ02LM","vendor":"Xiaomi","description":"Mi power plug ZigBee","supported":true}}'
zigbee2mqtt:info  2020-04-11 11:05:55: MQTT publish: topic 'zigbee2mqtt/0x00158d0001dc0a1a', payload '{"state":"OFF","power":0,"voltage":null,"consumption":25.42,"temperature":25,"linkquality":92}'
zigbee2mqtt:info  2020-04-11 11:05:56: MQTT publish: topic 'zigbee2mqtt/0x00158d0001dc0a1a', payload '{"state":"OFF","power":0,"voltage":null,"consumption":25.42,"temperature":25,"linkquality":92}'
zigbee2mqtt:info  2020-04-11 11:05:56: MQTT publish: topic 'zigbee2mqtt/0x00158d0001dc0a1a', payload '{"state":"OFF","power":0,"voltage":null,"consumption":25.42,"temperature":25,"linkquality":89}'

So, if I am understanding the log correctly, the device (in this case a Xiaomi power plug) is being recognised/discovered without issue. So, not sure why it is not showing up. When I look at the Mosquite integration and devices, it lists none. If I check the System Options within the Integration it has ‘enable newly added entities’ enabled.

This is running in a VM on an Intel Nuc. A while back I also briefly tried on a RPi and had devices there add and show successfully. My preference is to use the NUC (where my current Hass.IO install is) and a VM to keep all my machines together.

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95399

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>