Search found 3 matches
- 12 Sep 2018, 18:22
- Forum: ESP Easy: General Discussion
- Topic: Acknowledge GPIO change using MQTT
- Replies: 5
- Views: 2963
Re: Acknowledge GPIO change using MQTT
It might be more elegant than I thought using the eventvalue: on light do if [%eventvalue%]=1 GPIO,2,1 Publish %sysname%/light/state,0 else GPIO,2,0 Publish %sysname%/light/state,1 endif endon unfortunately the comparison always goes to the ELSE branch. I tried to publish the eventvalue back to MQTT...
- 12 Sep 2018, 16:24
- Forum: ESP Easy: General Discussion
- Topic: Acknowledge GPIO change using MQTT
- Replies: 5
- Views: 2963
Re: Acknowledge GPIO change using MQTT
Thank you @grovkillen! Are you saying you define custom events in rules like switchon, switchoff and then invoking them through a particular MQTT message (e.g. /pool/light/cmd : event,switchon) I was thinking that already, that will work. Not the most elegant solution, but it will do the job ;-) I w...
- 11 Sep 2018, 21:46
- Forum: ESP Easy: General Discussion
- Topic: Acknowledge GPIO change using MQTT
- Replies: 5
- Views: 2963
Acknowledge GPIO change using MQTT
Hi All, A common pattern with multiple control apps seems to be, that if you are turning on /of a relay, the node responds with a state message (MQTT) I am using openhab and I send an MQTT message to turn on/off the pool light: /pool/GPIO/2 : 1 /pool/GPIO/2 : 0 The switch in openHab turns to the new...