Need help with MQTT setup

I’m running 0.107 on HASS.io and installed the Mosquitto broker (5.1) with the following config

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

Startup log is like this:

[10:45:16] INFO: Setup mosquitto configuration
[10:45:16] WARNING: SSL not enabled - No valid certs found!
[10:45:16] INFO: No local user available
[10:45:16] INFO: Initialize Hass.io Add-on services
[10:45:16] INFO: Initialize Home Assistant discovery
[10:45:16] INFO: Start Mosquitto daemon
1584697516: mosquitto version 1.6.3 starting
1584697516: Config loaded from /etc/mosquitto.conf.
1584697516: Loading plugin: /usr/share/mosquitto/auth-plug.so
1584697516: |-- *** auth-plug: startup
1584697516:  ├── Username/password checking enabled.
1584697516:  ├── TLS-PSK checking enabled.
1584697516:  └── Extended authentication not enabled.
1584697516: Opening ipv4 listen socket on port 1883.
1584697516: Opening ipv6 listen socket on port 1883.
1584697516: Opening websockets listen socket on port 1884.
1584697516: Warning: Mosquitto should not be run as root/administrator.
1584697518: New connection from 172.30.32.1 on port 1883.
[INFO] found homeassistant on local database
1584697518: New client connected from 172.30.32.1 as auto-62C8FC59-9B28-055A-9E2C-C2AB1170FC2A (p2, c1, k60, u'homeassistant').

All seems okay, but when try to connect from the outside with the following command:
mosquitto_pub -h 192.168.0.185 -t home-assistant/switch/1/on -m “Switch is ON” -d
This is the output from the command

Client mosqpub|3461-raspberryp sending CONNECT
Client mosqpub|3461-raspberryp received CONNACK (0)
Client mosqpub|3461-raspberryp sending PUBLISH (d0, q0, r0, m1, 'home-assistant/switch/1/on', ... (12 bytes))
Client mosqpub|3461-raspberryp sending DISCONNECT

And this in the broker log on the HASS.io server

1584697659: New connection from 192.168.0.133 on port 1883.
1584697659: New client connected from 192.168.0.133 as mosqpub|3466-raspberryp (p2, c1, k60).
1584697659: Client mosqpub|3466-raspberryp disconnected.

When I look at the MQTT in dev tools I don’t see anything coming in by the listener

I’ve been reading, testing and starting over again for hours now, but can’t get it to work.

So any help is more than welcome

/Rien

The command mosquitto_pub is sending the data to Mosquitto but HA needs to subscribe to that topic… Can you share the code in HA for that subscription ?

Here is an example of my code (Switch definition in switch.yaml):

  - platform: mqtt
    name: "Switch Salon"
    state_topic: "homeassistant/switch/switch_salon_montreal/state"
    command_topic: "homeassistant/switch/switch_salon_montreal/set"
    icon: mdi:power-plug
    payload_on: "on"
    payload_off: "off"
    state_on: "on"
    state_off: "off"
    optimistic: false
    qos: 0
    retain: true

And the connection to Mosquitto in HA (configuration.yaml … Mosquitto is running on the same raspberry Pi than HA):

#
# mqtt broker address
#
mqtt:
  broker: localhost
  port: 1883
  username: !secret mosquitto_username
  password: !secret mosquitto_password

Thank you for your reply

In my configuration.yaml I haveL

mqtt:
  broker: localhost
  port: 1883

I don’t need authentication and therefore anonymous is set to true in the Mosquitto config (Right ??)

I did not have a switch.yaml (yet) so I created one.

switch:
   - platform: mqtt
    name: "Switch Salon"
    state_topic: "homeassistant/switch/switch_salon_montreal/state"
    command_topic: "homeassistant/switch/switch_salon_montreal/set"
    icon: mdi:power-plug
    payload_on: "on"
    payload_off: "off"
    state_on: "on"
    state_off: "off"
    optimistic: false
    qos: 0
    retain: true

Still no difference in the behavior :frowning:

And is it possible to auto discover in stead of using switch.yaml (or others) because I have many devices coming in whenever this works.

try to remove it completely, it’s not required.

1 Like

Hi,

I now see data coming in, but the auto discovery is not yet working.
I have this in the configuration.yaml

mqtt:
  broker: localhost
  port: 1883
  discovery: true
  discovery_prefix: homeassistant

I followed the documentation and sent the following info(see screenshot)

But no device is created.

What am I missing here, I followed the documentation

The example in the doc does not create a device. You should however see it under ‘entities’

I don’t see it in entities either

And shouldn’t it be visible in the Mosquitto Broker integration too?

No. Only devices appear there.

If you want to try a discovery message that creates a device :

homeassistant/binary_sensor/garagedoor/config
'{"name": "garagedoor", "device_class": "garage_door", "state_topic": "sensor/garagedoor", "unique_id": "garagedoor", "off_delay": 30, "device": {"identifiers": ["rfbridge_564886"],"name": "garagedoor", "model": "Digoo door sensor", "manufacturer": "Digoo"}}'

No still no garage door entity.

Strange. That is an actual message I used myself. The only difference I see I do have a user/password :

mqtt:
  broker: 10.0.0.63
  port: 1883
  discovery: true
  discovery_prefix: homeassistant
  username: xxx
  password: xxx
  birth_message:
    topic: 'hass/status'
    payload: 'online'
  will_message:
    topic: 'hass/status'
    payload: 'offline'  
    

Tried that too, but without luck

I’ll give up on HASS

First I got excited about the huge number of integrations and the way the interface is customizable.

Then I moved my (55) zwave devices, which was a total disaster, I’ve never seen such a bad implementation of zwave. Even Domoticz is better, and that sucks too.

So I moved the Zwave devices back to HomeSeer (which has the best wave integration I’ve seen so far) and try to integrate via MQTT. Which failed in the first basic steps, as you can read in this topic.
Troubleshooting is very hard to do without error logs, or even errors to respond to.
The potential of HASS is huge, I learned a lot the last couple of days, but at the end of the day it just not work for me when it comes to zwave integration (which is crucial to me)

:pensive:

3 Likes

If you want better logs, add this to configuration.yaml :

logger:
  default: debug

You did restart after adding discovery: true to configuration.yaml ?

mqtt:
  broker: localhost
  port: 1883
  discovery: true
  discovery_prefix: homeassistant

Yes I restarted…
many many times :wink:

Don’t see any debug logging though…

It is OT, but what specific problems are you having with the zw integration? Mine has worked perfect for a while now… only a few sensors that behaved weird because the manufacturer didn’t follow zw standards (aeotec g5 recessed door sensors, and jasco wall dimmers), but a few lines of config got those working fine also.

If you don’t see any debug logging, there must be something wrong with your HA installation. Just turned on debug, 5 minutes log : (too big to post, will have to cut some)

2020-03-20 20:06:57 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to homeassistant/#
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/switch/0x000d6ffffefd3b79/switch/config (retained): b'{"payload_off":"OFF","payload_on":"ON","value_template":"{{ value_json.state }}","command_topic":"zigbee2mqtt/ikeaoutlet1/set","state_topic":"zigbee2mqtt/ikeaoutlet1","json_attributes_topic":"zigbee2mqtt/ikeaoutlet1","name":"ikeaoutlet1_switch","unique_id":"0x000d6ffffefd3b79_switch_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x000d6ffffefd3b79"],"name":"ikeaoutlet1","sw_version":"Zigbee2mqtt 1.12.0","model":"TRADFRI control outlet (E1603/E1702)","manufacturer":"IKEA"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/switch/0x000d6ffffea93230/switch/config (retained): b'{"payload_off":"OFF","payload_on":"ON","value_template":"{{ value_json.state }}","command_topic":"zigbee2mqtt/ikeaoutlet3/set","state_topic":"zigbee2mqtt/ikeaoutlet3","json_attributes_topic":"zigbee2mqtt/ikeaoutlet3","name":"ikeaoutlet3_switch","unique_id":"0x000d6ffffea93230_switch_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x000d6ffffea93230"],"name":"ikeaoutlet3","sw_version":"Zigbee2mqtt 1.12.0","model":"TRADFRI control outlet (E1603/E1702)","manufacturer":"IKEA"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/switch/0x000d6ffffea7d4c7/switch/config (retained): b'{"payload_off":"OFF","payload_on":"ON","value_template":"{{ value_json.state }}","command_topic":"zigbee2mqtt/ikeaoutlet2/set","state_topic":"zigbee2mqtt/ikeaoutlet2","json_attributes_topic":"zigbee2mqtt/ikeaoutlet2","name":"ikeaoutlet2_switch","unique_id":"0x000d6ffffea7d4c7_switch_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x000d6ffffea7d4c7"],"name":"ikeaoutlet2","sw_version":"Zigbee2mqtt 1.12.0","model":"TRADFRI control outlet (E1603/E1702)","manufacturer":"IKEA"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/switch/0x000d6ffffefd3bf8/switch/config (retained): b'{"payload_off":"OFF","payload_on":"ON","value_template":"{{ value_json.state }}","command_topic":"zigbee2mqtt/ikeaoutlet4/set","state_topic":"zigbee2mqtt/ikeaoutlet4","json_attributes_topic":"zigbee2mqtt/ikeaoutlet4","name":"ikeaoutlet4_switch","unique_id":"0x000d6ffffefd3bf8_switch_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x000d6ffffefd3bf8"],"name":"ikeaoutlet4","sw_version":"Zigbee2mqtt 1.12.0","model":"TRADFRI control outlet (E1603/E1702)","manufacturer":"IKEA"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/switch/0x086bd7fffe5b3df5/switch/config (retained): b'{"payload_off":"OFF","payload_on":"ON","value_template":"{{ value_json.state }}","command_topic":"zigbee2mqtt/ikeaoutlet5/set","state_topic":"zigbee2mqtt/ikeaoutlet5","json_attributes_topic":"zigbee2mqtt/ikeaoutlet5","name":"ikeaoutlet5_switch","unique_id":"0x086bd7fffe5b3df5_switch_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x086bd7fffe5b3df5"],"name":"ikeaoutlet5","sw_version":"Zigbee2mqtt 1.12.0","model":"TRADFRI control outlet (E1603/E1702)","manufacturer":"IKEA"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/switch/C6D98E_RL_1/config (retained): b'{"name":"SonoffBasic3","cmd_t":"~cmnd/POWER","stat_t":"~tele/STATE","val_tpl":"{{value_json.POWER}}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"C6D98E_RL_1","device":{"identifiers":["C6D98E"],"connections":[["mac","60:01:94:C6:D9:8E"]]},"~":"SonoffBasic3/"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/switch/9F20A8_RL_1/config (retained): b'{"name":"Qia","cmd_t":"~cmnd/POWER","stat_t":"~tele/STATE","val_tpl":"{{value_json.POWER}}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"9F20A8_RL_1","device":{"identifiers":["9F20A8"],"connections":[["mac","EC:FA:BC:9F:20:A8"]]},"~":"Qia/"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/switch/CE0D83_RL_1/config (retained): b'{"name":"switchvooraangrotelichten","cmd_t":"~cmnd/POWER1","stat_t":"~tele/STATE","val_tpl":"{{value_json.POWER1}}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"CE0D83_RL_1","device":{"identifiers":["CE0D83"]},"~":"sonoff4ch/"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/switch/CE0D83_RL_2/config (retained): b'{"name":"switchvooraandeur","cmd_t":"~cmnd/POWER2","stat_t":"~tele/STATE","val_tpl":"{{value_json.POWER2}}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"CE0D83_RL_2","device":{"identifiers":["CE0D83"]},"~":"sonoff4ch/"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/switch/CE0D83_RL_3/config (retained): b'{"name":"switchvooraankleinelichten","cmd_t":"~cmnd/POWER3","stat_t":"~tele/STATE","val_tpl":"{{value_json.POWER3}}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"CE0D83_RL_3","device":{"identifiers":["CE0D83"]},"~":"sonoff4ch/"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/switch/CE0D83_RL_4/config (retained): b'{"name":"Sonoff4ch4","cmd_t":"~cmnd/POWER4","stat_t":"~tele/STATE","val_tpl":"{{value_json.POWER4}}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"CE0D83_RL_4","device":{"identifiers":["CE0D83"]},"~":"sonoff4ch/"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/switch/193EF5_RL_1/config (retained): b'{"name":"powr2","cmd_t":"~cmnd/POWER","stat_t":"~tele/STATE","val_tpl":"{{value_json.POWER}}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"193EF5_RL_1","device":{"identifiers":["193EF5"]},"~":"powr2/"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/switch/DB45F2_RL_1/config (retained): b'{"name":"Sonoff1","cmd_t":"~cmnd/POWER1","stat_t":"~tele/STATE","val_tpl":"{{value_json.POWER1}}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"DB45F2_RL_1","device":{"identifiers":["DB45F2"]},"~":"sonoff4chpro/"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/switch/DB45F2_RL_2/config (retained): b'{"name":"Sonoff2","cmd_t":"~cmnd/POWER2","stat_t":"~tele/STATE","val_tpl":"{{value_json.POWER2}}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"DB45F2_RL_2","device":{"identifiers":["DB45F2"]},"~":"sonoff4chpro/"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/switch/DB45F2_RL_3/config (retained): b'{"name":"Sonoff3","cmd_t":"~cmnd/POWER3","stat_t":"~tele/STATE","val_tpl":"{{value_json.POWER3}}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"DB45F2_RL_3","device":{"identifiers":["DB45F2"]},"~":"sonoff4chpro/"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/switch/DB45F2_RL_4/config (retained): b'{"name":"Sonoff4","cmd_t":"~cmnd/POWER4","stat_t":"~tele/STATE","val_tpl":"{{value_json.POWER4}}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"DB45F2_RL_4","device":{"identifiers":["DB45F2"]},"~":"sonoff4chpro/"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0x000d6ffffefd3b79/linkquality/config (retained): b'{"icon":"mdi:signal","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}","state_topic":"zigbee2mqtt/ikeaoutlet1","json_attributes_topic":"zigbee2mqtt/ikeaoutlet1","name":"ikeaoutlet1_linkquality","unique_id":"0x000d6ffffefd3b79_linkquality_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x000d6ffffefd3b79"],"name":"ikeaoutlet1","sw_version":"Zigbee2mqtt 1.12.0","model":"TRADFRI control outlet (E1603/E1702)","manufacturer":"IKEA"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0x000d6ffffea93230/linkquality/config (retained): b'{"icon":"mdi:signal","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}","state_topic":"zigbee2mqtt/ikeaoutlet3","json_attributes_topic":"zigbee2mqtt/ikeaoutlet3","name":"ikeaoutlet3_linkquality","unique_id":"0x000d6ffffea93230_linkquality_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x000d6ffffea93230"],"name":"ikeaoutlet3","sw_version":"Zigbee2mqtt 1.12.0","model":"TRADFRI control outlet (E1603/E1702)","manufacturer":"IKEA"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0x000d6ffffea7d4c7/linkquality/config (retained): b'{"icon":"mdi:signal","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}","state_topic":"zigbee2mqtt/ikeaoutlet2","json_attributes_topic":"zigbee2mqtt/ikeaoutlet2","name":"ikeaoutlet2_linkquality","unique_id":"0x000d6ffffea7d4c7_linkquality_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x000d6ffffea7d4c7"],"name":"ikeaoutlet2","sw_version":"Zigbee2mqtt 1.12.0","model":"TRADFRI control outlet (E1603/E1702)","manufacturer":"IKEA"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0x000d6ffffefd3bf8/linkquality/config (retained): b'{"icon":"mdi:signal","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}","state_topic":"zigbee2mqtt/ikeaoutlet4","json_attributes_topic":"zigbee2mqtt/ikeaoutlet4","name":"ikeaoutlet4_linkquality","unique_id":"0x000d6ffffefd3bf8_linkquality_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x000d6ffffefd3bf8"],"name":"ikeaoutlet4","sw_version":"Zigbee2mqtt 1.12.0","model":"TRADFRI control outlet (E1603/E1702)","manufacturer":"IKEA"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0x000d6ffffeac1f8a/click/config (retained): b'{"icon":"mdi:toggle-switch","value_template":"{{ value_json.click }}","state_topic":"zigbee2mqtt/ikea_button1","json_attributes_topic":"zigbee2mqtt/ikea_button1","name":"ikea_button1_click","unique_id":"0x000d6ffffeac1f8a_click_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x000d6ffffeac1f8a"],"name":"ikea_button1","sw_version":"Zigbee2mqtt 1.12.0","model":"TRADFRI ON/OFF switch (E1743)","manufacturer":"IKEA"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0x000d6ffffeac1f8a/battery/config (retained): b'{"unit_of_measurement":"%","device_class":"battery","value_template":"{{ value_json.battery }}","state_topic":"zigbee2mqtt/ikea_button1","json_attributes_topic":"zigbee2mqtt/ikea_button1","name":"ikea_button1_battery","unique_id":"0x000d6ffffeac1f8a_battery_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x000d6ffffeac1f8a"],"name":"ikea_button1","sw_version":"Zigbee2mqtt 1.12.0","model":"TRADFRI ON/OFF switch (E1743)","manufacturer":"IKEA"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0x000d6ffffeac1f8a/linkquality/config (retained): b'{"icon":"mdi:signal","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}","state_topic":"zigbee2mqtt/ikea_button1","json_attributes_topic":"zigbee2mqtt/ikea_button1","name":"ikea_button1_linkquality","unique_id":"0x000d6ffffeac1f8a_linkquality_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x000d6ffffeac1f8a"],"name":"ikea_button1","sw_version":"Zigbee2mqtt 1.12.0","model":"TRADFRI ON/OFF switch (E1743)","manufacturer":"IKEA"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0x00124b0018e25f2a/linkquality/config (retained): b'{"icon":"mdi:signal","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}","state_topic":"zigbee2mqtt/CC2531","json_attributes_topic":"zigbee2mqtt/CC2531","name":"CC2531_linkquality","unique_id":"0x00124b0018e25f2a_linkquality_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x00124b0018e25f2a"],"name":"CC2531","sw_version":"Zigbee2mqtt 1.12.0","model":"[CC2530 router](http://ptvo.info/cc2530-based-zigbee-coordinator-and-router-112/) (CC2530.ROUTER)","manufacturer":"Custom devices (DiY)"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0x00158d000445703e/temperature/config (retained): b'{"unit_of_measurement":"\xc2\xb0C","device_class":"temperature","value_template":"{{ value_json.temperature }}","state_topic":"zigbee2mqtt/temp_slaapkamer","json_attributes_topic":"zigbee2mqtt/temp_slaapkamer","name":"temp_slaapkamer_temperature","unique_id":"0x00158d000445703e_temperature_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x00158d000445703e"],"name":"temp_slaapkamer","sw_version":"Zigbee2mqtt 1.12.0","model":"MiJia temperature & humidity sensor (WSDCGQ01LM)","manufacturer":"Xiaomi"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0x00158d000445703e/humidity/config (retained): b'{"unit_of_measurement":"%","device_class":"humidity","value_template":"{{ value_json.humidity }}","state_topic":"zigbee2mqtt/temp_slaapkamer","json_attributes_topic":"zigbee2mqtt/temp_slaapkamer","name":"temp_slaapkamer_humidity","unique_id":"0x00158d000445703e_humidity_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x00158d000445703e"],"name":"temp_slaapkamer","sw_version":"Zigbee2mqtt 1.12.0","model":"MiJia temperature & humidity sensor (WSDCGQ01LM)","manufacturer":"Xiaomi"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0x00158d000445703e/battery/config (retained): b'{"unit_of_measurement":"%","device_class":"battery","value_template":"{{ value_json.battery }}","state_topic":"zigbee2mqtt/temp_slaapkamer","json_attributes_topic":"zigbee2mqtt/temp_slaapkamer","name":"temp_slaapkamer_battery","unique_id":"0x00158d000445703e_battery_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x00158d000445703e"],"name":"temp_slaapkamer","sw_version":"Zigbee2mqtt 1.12.0","model":"MiJia temperature & humidity sensor (WSDCGQ01LM)","manufacturer":"Xiaomi"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0x00158d000445703e/linkquality/config (retained): b'{"icon":"mdi:signal","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}","state_topic":"zigbee2mqtt/temp_slaapkamer","json_attributes_topic":"zigbee2mqtt/temp_slaapkamer","name":"temp_slaapkamer_linkquality","unique_id":"0x00158d000445703e_linkquality_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x00158d000445703e"],"name":"temp_slaapkamer","sw_version":"Zigbee2mqtt 1.12.0","model":"MiJia temperature & humidity sensor (WSDCGQ01LM)","manufacturer":"Xiaomi"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0x14b457fffe49ecf4/battery/config (retained): b'{"unit_of_measurement":"%","device_class":"battery","value_template":"{{ value_json.battery }}","state_topic":"zigbee2mqtt/ikeapir","json_attributes_topic":"zigbee2mqtt/ikeapir","name":"ikeapir_battery","unique_id":"0x14b457fffe49ecf4_battery_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x14b457fffe49ecf4"],"name":"ikeapir","sw_version":"Zigbee2mqtt 1.12.0","model":"TRADFRI motion sensor (E1525/E1745)","manufacturer":"IKEA"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0x14b457fffe49ecf4/linkquality/config (retained): b'{"icon":"mdi:signal","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}","state_topic":"zigbee2mqtt/ikeapir","json_attributes_topic":"zigbee2mqtt/ikeapir","name":"ikeapir_linkquality","unique_id":"0x14b457fffe49ecf4_linkquality_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x14b457fffe49ecf4"],"name":"ikeapir","sw_version":"Zigbee2mqtt 1.12.0","model":"TRADFRI motion sensor (E1525/E1745)","manufacturer":"IKEA"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0x00158d00034ce4e1/illuminance/config (retained): b'{"unit_of_measurement":"-","device_class":"illuminance","value_template":"{{ value_json.illuminance }}","state_topic":"zigbee2mqtt/aquara1","json_attributes_topic":"zigbee2mqtt/aquara1","name":"aquara1_illuminance","unique_id":"0x00158d00034ce4e1_illuminance_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x00158d00034ce4e1"],"name":"aquara1","sw_version":"Zigbee2mqtt 1.12.0","model":"Aqara human body movement and illuminance sensor (RTCGQ11LM)","manufacturer":"Xiaomi"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0x00158d00034ce4e1/battery/config (retained): b'{"unit_of_measurement":"%","device_class":"battery","value_template":"{{ value_json.battery }}","state_topic":"zigbee2mqtt/aquara1","json_attributes_topic":"zigbee2mqtt/aquara1","name":"aquara1_battery","unique_id":"0x00158d00034ce4e1_battery_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x00158d00034ce4e1"],"name":"aquara1","sw_version":"Zigbee2mqtt 1.12.0","model":"Aqara human body movement and illuminance sensor (RTCGQ11LM)","manufacturer":"Xiaomi"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0x00158d00034ce4e1/linkquality/config (retained): b'{"icon":"mdi:signal","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}","state_topic":"zigbee2mqtt/aquara1","json_attributes_topic":"zigbee2mqtt/aquara1","name":"aquara1_linkquality","unique_id":"0x00158d00034ce4e1_linkquality_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x00158d00034ce4e1"],"name":"aquara1","sw_version":"Zigbee2mqtt 1.12.0","model":"Aqara human body movement and illuminance sensor (RTCGQ11LM)","manufacturer":"Xiaomi"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0x086bd7fffe5b3df5/linkquality/config (retained): b'{"icon":"mdi:signal","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}","state_topic":"zigbee2mqtt/ikeaoutlet5","json_attributes_topic":"zigbee2mqtt/ikeaoutlet5","name":"ikeaoutlet5_linkquality","unique_id":"0x086bd7fffe5b3df5_linkquality_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x086bd7fffe5b3df5"],"name":"ikeaoutlet5","sw_version":"Zigbee2mqtt 1.12.0","model":"TRADFRI control outlet (E1603/E1702)","manufacturer":"IKEA"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:00 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0x000d6ffffe4a8700/battery/config (retained): b'{"unit_of_measurement":"%","device_class":"battery","value_template":"{{ value_json.battery }}","state_topic":"zigbee2mqtt/ikeapirboven","json_attributes_topic":"zigbee2mqtt/ikeapirboven","name":"ikeapirboven_battery","unique_id":"0x000d6ffffe4a8700_battery_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x000d6ffffe4a8700"],"name":"ikeapirboven","sw_version":"Zigbee2mqtt 1.12.0","model":"TRADFRI motion sensor (E1525/E1745)","manufacturer":"IKEA"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:01 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0x000d6ffffe4a8700/linkquality/config (retained): b'{"icon":"mdi:signal","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}","state_topic":"zigbee2mqtt/ikeapirboven","json_attributes_topic":"zigbee2mqtt/ikeapirboven","name":"ikeapirboven_linkquality","unique_id":"0x000d6ffffe4a8700_linkquality_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x000d6ffffe4a8700"],"name":"ikeapirboven","sw_version":"Zigbee2mqtt 1.12.0","model":"TRADFRI motion sensor (E1525/E1745)","manufacturer":"IKEA"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:01 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0xccccccfffe2fb287/battery/config (retained): b'{"unit_of_measurement":"%","device_class":"battery","value_template":"{{ value_json.battery }}","state_topic":"zigbee2mqtt/ikeapir2","json_attributes_topic":"zigbee2mqtt/ikeapir2","name":"ikeapir2_battery","unique_id":"0xccccccfffe2fb287_battery_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0xccccccfffe2fb287"],"name":"ikeapir2","sw_version":"Zigbee2mqtt 1.12.0","model":"TRADFRI motion sensor (E1525/E1745)","manufacturer":"IKEA"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:01 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0xccccccfffe2fb287/linkquality/config (retained): b'{"icon":"mdi:signal","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}","state_topic":"zigbee2mqtt/ikeapir2","json_attributes_topic":"zigbee2mqtt/ikeapir2","name":"ikeapir2_linkquality","unique_id":"0xccccccfffe2fb287_linkquality_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0xccccccfffe2fb287"],"name":"ikeapir2","sw_version":"Zigbee2mqtt 1.12.0","model":"TRADFRI motion sensor (E1525/E1745)","manufacturer":"IKEA"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:01 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0x00124b0008b9d933/linkquality/config (retained): b'{"icon":"mdi:signal","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}","state_topic":"zigbee2mqtt/CC2531router","json_attributes_topic":"zigbee2mqtt/CC2531router","name":"CC2531router_linkquality","unique_id":"0x00124b0008b9d933_linkquality_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x00124b0008b9d933"],"name":"CC2531router","sw_version":"Zigbee2mqtt 1.12.0","model":"[CC2530 router](http://ptvo.info/cc2530-based-zigbee-coordinator-and-router-112/) (CC2530.ROUTER)","manufacturer":"Custom devices (DiY)"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:01 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0x00124b001949ee9c/linkquality/config (retained): b'{"icon":"mdi:signal","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}","state_topic":"zigbee2mqtt/CC2531_ant","json_attributes_topic":"zigbee2mqtt/CC2531_ant","name":"CC2531_ant_linkquality","unique_id":"0x00124b001949ee9c_linkquality_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x00124b001949ee9c"],"name":"CC2531_ant","sw_version":"Zigbee2mqtt 1.12.0","model":"[CC2530 router](http://ptvo.info/cc2530-based-zigbee-coordinator-and-router-112/) (CC2530.ROUTER)","manufacturer":"Custom devices (DiY)"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:01 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0x00158d0003cc6b6d/temperature/config (retained): b'{"unit_of_measurement":"\xc2\xb0C","device_class":"temperature","value_template":"{{ value_json.temperature }}","state_topic":"zigbee2mqtt/temp_keuken","json_attributes_topic":"zigbee2mqtt/temp_keuken","name":"temp_keuken_temperature","unique_id":"0x00158d0003cc6b6d_temperature_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x00158d0003cc6b6d"],"name":"temp_keuken","sw_version":"Zigbee2mqtt 1.12.0","model":"MiJia temperature & humidity sensor (WSDCGQ01LM)","manufacturer":"Xiaomi"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:01 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0x00158d0003cc6b6d/humidity/config (retained): b'{"unit_of_measurement":"%","device_class":"humidity","value_template":"{{ value_json.humidity }}","state_topic":"zigbee2mqtt/temp_keuken","json_attributes_topic":"zigbee2mqtt/temp_keuken","name":"temp_keuken_humidity","unique_id":"0x00158d0003cc6b6d_humidity_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x00158d0003cc6b6d"],"name":"temp_keuken","sw_version":"Zigbee2mqtt 1.12.0","model":"MiJia temperature & humidity sensor (WSDCGQ01LM)","manufacturer":"Xiaomi"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:01 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0x00158d0003cc6b6d/battery/config (retained): b'{"unit_of_measurement":"%","device_class":"battery","value_template":"{{ value_json.battery }}","state_topic":"zigbee2mqtt/temp_keuken","json_attributes_topic":"zigbee2mqtt/temp_keuken","name":"temp_keuken_battery","unique_id":"0x00158d0003cc6b6d_battery_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x00158d0003cc6b6d"],"name":"temp_keuken","sw_version":"Zigbee2mqtt 1.12.0","model":"MiJia temperature & humidity sensor (WSDCGQ01LM)","manufacturer":"Xiaomi"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:01 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0x00158d0003cc6b6d/linkquality/config (retained): b'{"icon":"mdi:signal","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}","state_topic":"zigbee2mqtt/temp_keuken","json_attributes_topic":"zigbee2mqtt/temp_keuken","name":"temp_keuken_linkquality","unique_id":"0x00158d0003cc6b6d_linkquality_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x00158d0003cc6b6d"],"name":"temp_keuken","sw_version":"Zigbee2mqtt 1.12.0","model":"MiJia temperature & humidity sensor (WSDCGQ01LM)","manufacturer":"Xiaomi"},"availability_topic":"zigbee2mqtt/bridge/state"}'
2020-03-20 20:07:01 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/0xccccccfffec13ab3/battery/config (retained): b'{"unit_of_measurement":"%","device_class":"battery","value_template":"{{ value_json.battery }}","state_topic":"zigbee2mqtt/ikeapirkeuken","json_attributes_topic":"zigbee2mqtt/ikeapirkeuken","name":"ikeapirkeuken_battery","unique_id":"0xccccccfffec13ab3_battery_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0xccccccfffec13ab3"],"name":"ikeapirkeuken","sw_version":"Zigbee2mqtt 1.12.0","model":"TRADFRI motion sensor (E1525/E1745)","manufacturer":"IKEA"},"availability_topic":"zigbee2mqtt/bridge/state"}'

As we debug MQTT, I believe it’s enough to say

default: warning
logs:
  homeassistant.components.mqtt: debug
  • it is slow
  • startup takes 5 - 10 minutes
  • so many entities which are not logically named and not connected to the same device as they should
  • 30 % of my devices are not correctly included or don’t work after inclusion
  • very bad logging mechanism
  • sometimes after a reboot none of the devices are working
  • shall I continue?

Then it’s not your choice, end of topic.