Prevent Off (or On) action
Posted: Saturday 28 November 2015 22:00
I searched the forum, but couldn't find a solution so far.
I have a switch that operates the power to my desktop PC (and some other equipment). about 5 minutes after the ip-address is gone (after a shutdown of the PC), the switch is set to off by a Lua script and thus cutting the power, which works fine.
The switch can be turned on via the webpage or some other app or by operating the switch itself manually. In frontpage I disabled the possibility to switch off this switch, however in the default Domoticz webpage this does not seem possible without protecting the switch, which I do not want to do. The reason for this is that I want to prevent anyone from accidently switch off the computer when not shutdown.
I tried creating a dummy script and I put that in the off-action of the switch. The script is called, but the switch is still switched off.
Also, I want to see if the switch is on or off, so I do not think another switch type will work.
Does anyone have an idea or solution?
I have a switch that operates the power to my desktop PC (and some other equipment). about 5 minutes after the ip-address is gone (after a shutdown of the PC), the switch is set to off by a Lua script and thus cutting the power, which works fine.
The switch can be turned on via the webpage or some other app or by operating the switch itself manually. In frontpage I disabled the possibility to switch off this switch, however in the default Domoticz webpage this does not seem possible without protecting the switch, which I do not want to do. The reason for this is that I want to prevent anyone from accidently switch off the computer when not shutdown.
I tried creating a dummy script and I put that in the off-action of the switch. The script is called, but the switch is still switched off.
Also, I want to see if the switch is on or off, so I do not think another switch type will work.
Does anyone have an idea or solution?