Page 1 of 1

Alarm blockly not working

Posted: Wednesday 10 August 2016 21:23
by wormiedk
Hi

I have tried setting up an alarm similar to what is described here:
https://www.domoticz.com/wiki/Alarm_Setup

I have two lua script which correctly trigger a notification to my phone and set the AlarmDetected user variable to 1. I have then tried making a blockly similar to the one described except that my alarm is turned on/off via a "dummy" switch. My blockly looks like this:
Screen Shot 2016-08-10 at 21.21.39.png
Screen Shot 2016-08-10 at 21.21.39.png (55.15 KiB) Viewed 1051 times
I have tried saving as both a device, uservariable and "all" event but the blockly never seems to be triggered. I also tried changing the first if stamens to "AlarmDetected NOT = 0" in case it was something with string vs number.

Do you have any suggestions?

Thanks!

Re: Alarm blockly not working

Posted: Thursday 11 August 2016 2:07
by tozzke
I think you're using the wrong On-block in the first line, you have to use the same On-block as in the last line
So not '[A-F Alarm] = ["On"]' but '[A-F Alarm] = [On]'

Re: Alarm blockly not working

Posted: Thursday 11 August 2016 8:10
by wormiedk
Thanks but I am pretty sure that works as Alarm is a custom switch with three values "On", "Off" and "On (home)". I have used the same logic in another script which now works see: viewtopic.php?t=12802

Actually I also tried the script without the Alarm = "On" bit and it still did not work :(