Page 1 of 1

Virtual switch with acknowledge

Posted: Wednesday 23 September 2020 20:40
by gian72
Hi to all.
Is it possible to turn on a virtual switch only if I get an acknowledge from the device?
Let me summarize my needs:
I've a switch that uses a little dzVents script to send some mqtt commands to my irrigation system.
What I need is that the switch icon only turns on when I receive back, via mqtt, the info from the device that it is turned on.
Now if I press the virtualswitch, even if the device is offline, from a graphical point of view it turns on...
The device is a ESP8266 with espeasy firmware.

Thanks for any hints!

Gianluca

Re: Virtual switch with acknowledge

Posted: Wednesday 23 September 2020 21:41
by waaren
gian72 wrote: Wednesday 23 September 2020 20:40 What I need is that the switch icon only turns on when I receive back, via mqtt, the info from the device that it is turned on.
Would it be an option to use (a) push button(s) to trigger the sending of the mqtt commands and a virtual switch to receive the feedback and change state based on that feedback?

Re: Virtual switch with acknowledge

Posted: Thursday 24 September 2020 0:14
by gian72
Yes it could be a good idea and I will use it if there is no other ways. The "acknowledge" button will be password protected otherwise you can inadvertently change the status.... Or is it possible to lock it otherwise?

Inviato dal mio Mi 9T Pro utilizzando Tapatalk


Re: Virtual switch with acknowledge

Posted: Thursday 24 September 2020 12:14
by waaren
gian72 wrote: Thursday 24 September 2020 0:14 Yes it could be a good idea and I will use it if there is no other ways. The "acknowledge" button will be password protected otherwise you can inadvertently change the status.... Or is it possible to lock it otherwise?
...Or use an alert device to reflect actual status.

Re: Virtual switch with acknowledge

Posted: Thursday 24 September 2020 19:40
by gian72
Thanks I will give it a try!

Inviato dal mio Mi 9T Pro utilizzando Tapatalk