-
Notifications
You must be signed in to change notification settings - Fork 0
Description
This looks like it may be related to #34.
I was having issues with zigbee2mqtt pairing to devices, but HA was finding them just fine, so I am going to use it for reference.
It looks like when wink-mqtt-rs is publishing to the config topic, it isn't using a retained message (zigbee2mqtt does this). So far, this is the main thing I can think of as to why HA isn't discovering any devices from wink-mqtt-rs, while it does from zigbee2mqtt. It also didn't create a config topic for the plug until after I restarted the wink-mqtt-rs process. There also seems to be a sizeable difference in the json data between ones that work, and ones that don't.
I did manually send the config message with the retain flag, and it still didn't work, so I'm thinking there's an issue with the format of the json data. (See the gist links below with the comparison to zigbee2mqtt, which works fine).
-s mqtt://wink:**********@**********
-d 'homeassistant'
--discovery-listen-topic 'homeassistant/status'
Note: I only added discovery-listen-topic after noticing the config issue to see if it would help. It did not.
Comparison of config messages (formatted): https://gist.github.com/vrelk/044e490b01ecd7dbedac1386da263b04
Comparison of state messages (formatted): https://gist.github.com/vrelk/57a0fa756dd081f43f9afe40ff31eccb
Debug level logs: https://gist.github.com/vrelk/f1c018a8937b2ae2e393c519e44660ee
Summary:
- Config topic messages are not retained.
- Incorrect json data format??
- Config topic messages are only sent on startup, requiring a restart after adding a device.