Hi, I am trying to switch everything off in my house when I switch on the alarm to away mode, also the heating switches to a fixed setpoint, and when disarming the heating switches back to program, this all works, but the problem is when I have the alarm switched off but for some reason I want to change the heating to manual, I can't because the Lua script is blocking it. How do i make this to be a single command and not continuous? Is there a function for flank detection? (Rising trigger)
I don't understand the explanation in the standard lua script:
-- device changed contains state and svalues for the device that changed.
-- devicechanged['yourdevicename'] = state
-- devicechanged['svalues'] = svalues string
if devicechanged['alarmon'] == "on" then... would work on a switch device but this device only has svalue so does not work, but how do i use the svalue?
I have it now as the screenshot, but then it is always blocking when the alarm is switched off
Lua action on change of svalue
Moderator: leecollings
-
- Posts: 20
- Joined: Sunday 05 November 2017 14:50
- Target OS: Windows
- Domoticz version:
- Contact:
Lua action on change of svalue
- Attachments
-
- 2017-11-25_224459.jpg (55.2 KiB) Viewed 1159 times
-
- Posts: 20
- Joined: Sunday 05 November 2017 14:50
- Target OS: Windows
- Domoticz version:
- Contact:
Re: Lua action on change of svalue
Tried some more, added a memory switch so that all is only switched once during a change, I tried this with 2 wallsockets, when 1 was switched, the other switched along, but I could still change the second socket independently after that, so seemed to work as desired, BUT... when I try this with my heating it does NOT, the scene switches, but after that if I want I can switch lights etc on again even if the alarm is still armed, but if I try to put the clockmode backon or change the set temperature, domoticz freezes and I have to restart it to get access again (same thing happens if just writing a script which switches a device always on and then manually try to switch the device off)
Anyone any idea how to make this work?? (or what I'm doing wrong?) If I disable the script I can switch the heating and set it to whatever i like without any issue...
Anyone any idea how to make this work?? (or what I'm doing wrong?) If I disable the script I can switch the heating and set it to whatever i like without any issue...
Who is online
Users browsing this forum: No registered users and 1 guest