MQTT AD Report Problems
Reporting issues with MQTT Auto Discovery
When you experience issues with MQTT Auto Discovery in a normally working MQTT AD environment (Like your device is not discovered correctly, or not or partly working), and you are sure it is related to Domoticz, we need some additional data to debug/simulate the issue.
MQTT Auto Discovery is a great way to support a lot of hardware, but we do have some limitations....
Each device has a Configuration object (config) and a status object (state)
The device announces its configuration to MQTT in the auto discovery topic that you can configure in the host software (like Zigbee2MQTT or ZWaveJS-UI)
For the above two applications this is default set to homeassistant
To debug the issue, we need the 'config' topic and payload (the payload is a JSON text structure) and the state topic and payload json.
You need to create a issue on Domoticz Github https://github.com/domoticz/domoticz/issues so we will be notified of the problem and post the below requirements.
If you have questions about MQTT Auto Discover or you are not sure you did the right configuration please start a discussion on the MQTT AD subforum https://www.domoticz.com/forum/viewforum.php?f=82
Required Tools
MQTT Explorer
The first thing that should work is that you can connect to your MQTT broker. To do so, we advise to use a great tool 'MQTT Explorer' which you can download from the link below.
When you are connected to your MQTT broker, find the config topic of the device (by searching in the MQTT tree, or using the search option to search for the name/ID
Config Topic and payload
Copy the complete config topic name and the config payload itself like in below example config topic name homeassistant/switch/0x00d6f000b93a71a/switch/config
and payload starting with {"availability":[{"topic":"zigbee2mqtt.."state_topic": "zigbee2mqtt/ST Outlet A1",......
In MQTT Explorer there are copy buttons to copy the topic name to clipboard.
State topic and payload
In below mentioned example the state_topic for switch/0x00d6f000b93a71a is 'zigbee2mqtt/ST Outlet A1', payload is {"current":0,"linkquality":215,"power":0,"state":"ON","voltage":246}
In MQTT Explorer there are copy buttons to copy the payload to clipboard
You might to flip a switch, use a webinterface, or wait some time before data is received at the state topic (like for a temperature sensor)
You could post multiple state payloads if needed
Copy buttons:
Create Github issue
Create a Domoticz github issue in https://github.com/domoticz/domoticz/issues and post
- Description of the issue you have with your device.
- Config Topic and payload json , no screenshots!!
- State Topic and payload json (multiple payloads if needed to switch states), No screenshots!
With the above Config topic + payload and State topic and Payload, we should be able to simulate the situation