Page 1 of 1

Monitor Security Panel for updates

Posted: Tuesday 20 June 2017 14:55
by dennusb
Hi all,

I would like to watch the Security Panel (buildin Domoticz thingy) for status changes. So i've tried :

if(devicechanged["Domoticz Security Panel"]) then

But that does not work. What code would i need to monitor it for status changes?

Re: Monitor Security Panel for updates

Posted: Tuesday 20 June 2017 14:59
by emme
I do not monitor the secpanel... but in my scripts I use to check global variable 'Security' instead of the device ;)

ciao
M

Re: Monitor Security Panel for updates

Posted: Tuesday 20 June 2017 15:01
by dennusb
emme wrote:I do not monitor the secpanel... but in my scripts I use to check global variable 'Security' instead of the device ;)

ciao
M
But do you monitor it for changes? Or do you just run if(globalvariable['Security'] == 'Armed Away') or something like that?

Re: Monitor Security Panel for updates

Posted: Sunday 25 June 2017 12:36
by Keleos
Hello everyone,

I'm asking me exactly the same because I'd like to use the fibaro wallplug as alarm indicator.

Greetings
Kel

Re: Monitor Security Panel for updates

Posted: Sunday 25 June 2017 12:44
by jvdz
Just create a LUA file called: script_security_panel-changes.lua
In there you can simply do something like:

Code: Select all

commandArray = {}
 
printlog('###', 'SecPanel: status changed to ' .. globalvariables['Security'])

if globalvariables['Security'] == 'Disarmed' then
-- 
elseif globalvariables['Security'] == 'Armed Home' then
--
elseif globalvariables['Security'] == 'Armed Away' then
--
end

return commandArray
Jos

Re: Monitor Security Panel for updates

Posted: Sunday 25 June 2017 12:53
by Keleos
Hi Jos,

thank you very much, this works like a charm :)

My mistake was: I did not set the type to "security" so only the disarm was recognized.

Have a nice Sunday

Kel