Page 1 of 1
Switch ON/OFF confirmation
Posted: Sunday 12 February 2017 9:03
by nafremony2
Hello, I have an ON/Off action on a virtual switch. But no matter whether the URL exists or not, returns 2xx status code or not etc. the switch is turned on/off when I click on it. Is there a way to configure some confirmation (i.e. the request succeeded)? Or at least wait for the state from the switch itself?
Re: Switch ON/OFF confirmation
Posted: Sunday 12 February 2017 9:06
by gizmocuz
No, this is not possible.
It executes whatever you enter
Re: Switch ON/OFF confirmation
Posted: Sunday 12 February 2017 9:47
by tem0
Unless you have an input to read the outcome from the switch, I guess, feedback
Re: Switch ON/OFF confirmation
Posted: Sunday 12 February 2017 10:58
by nafremony2
tem0 wrote:Unless you have an input to read the outcome from the switch, I guess, feedback
I have the switch as an input as well. But that does not solve the problem of the device being i.e. offline/down. With that I can guess only based on
Last Seen. Which is clunky as well.
One solution I can think of is having a script do the request, when that fails, do a request back to Domoticz and turn the switch back OFF. Almost good enough.
Re: Switch ON/OFF confirmation
Posted: Sunday 12 February 2017 21:42
by nafremony2
And also having that switch as input has another problem. Whenever the status is reported the On/Off action is executed. Creating nasty either race condition or bouncing with on and off states indefinitely. That sucks. Looks like only reasonable approach would be having two switches. One for status and one with On/Off actions.