-
Notifications
You must be signed in to change notification settings - Fork 289
Updating state over MQTT #110
Comments
I can fix this. I will add the lines needed to WebSockets callback. EDIT: Not so easy, MQTT sends back replies based on what it receives. Like "$" payload gives different information than "~". So from WebSockets callback you want which info back? |
Thanks @debsahu and @toblum, the part that is missing that your update included is requests for any change. I'll try and describe best as I can so it makes sense... I kept HomeAutomation enabled to play with, purely to watch the extra information through MQTTbox subscribing to #. Any request through OpenHAB or MQTTbox to the topic resulted in a response, such as sending;
As I am playing with OpenHAB, using the OK %200 response fits in much easier than breaking down the full JSON output to update the sliders. If I update any setting through the McLighting web page, I get the HA JSON response only, not the original MQTT message. Hopefully this will bring both methods to a similar level of functionality |
I've been playing with the standard MQTT and HA implementation controls, but I still use the web controller for some actions, and noticed that an update is sent to the HA MQTT topic, with state, colours and brightness etc when there is a web controller change, but nothing is sent for the non-HA MQTT.
Would this be an easy addition? I haven't had chance to dive in properly yet, but if I get chance I'll make some changes and create a PR if I'm successful!
The text was updated successfully, but these errors were encountered: