Switch ON/OFF confirmation

Moderator: leecollings

Post Reply
nafremony2
Posts: 3
Joined: Sunday 12 February 2017 8:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Switch ON/OFF confirmation

Post 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?
User avatar
gizmocuz
Posts: 2352
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Switch ON/OFF confirmation

Post by gizmocuz »

No, this is not possible.
It executes whatever you enter
Quality outlives Quantity!
tem0
Posts: 3
Joined: Wednesday 23 November 2016 23:22
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Switch ON/OFF confirmation

Post by tem0 »

Unless you have an input to read the outcome from the switch, I guess, feedback
nafremony2
Posts: 3
Joined: Sunday 12 February 2017 8:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Switch ON/OFF confirmation

Post 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.
nafremony2
Posts: 3
Joined: Sunday 12 February 2017 8:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Switch ON/OFF confirmation

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests