mqtt change button colour

Moderator: leecollings

Post Reply
martins
Posts: 5
Joined: Tuesday 29 November 2016 11:22
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

mqtt change button colour

Post by martins »

I need some help / guidance. Domoticz must subscribe to a mqtt topic and read the status of a door. If status = 1 press button colour must be green = gate is closed and if pressed send 1 to another mqtt topic. If status = 0 press button colour must be red = gate is open and if pressed send 1 to mqtt topic.

Any idea how I can achieve this?

Thanks
SweetPants

Re: mqtt change button colour

Post by SweetPants »

Domoticz MQTT implementation uses only two topics domoticz/in and domoticz/out. Those are hardcoded. If you want to subscribe to a certain toptic and read the status of the door, you have to subscribe to this topic with something like NodeRed. Then you can manipulate the data and use JSON or domoticz/in topic to update a virtual switch in Domoticz. I'm not sure you can change the Icon color
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest