Monitor Security Panel for updates

Moderator: leecollings

Post Reply
dennusb
Posts: 12
Joined: Thursday 23 October 2014 8:01
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Monitor Security Panel for updates

Post 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?
User avatar
emme
Posts: 909
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: Monitor Security Panel for updates

Post 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
The most dangerous phrase in any language is:
"We always done this way"
dennusb
Posts: 12
Joined: Thursday 23 October 2014 8:01
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Monitor Security Panel for updates

Post 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?
Keleos
Posts: 29
Joined: Saturday 27 May 2017 9:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Monitor Security Panel for updates

Post 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
User avatar
jvdz
Posts: 2269
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Monitor Security Panel for updates

Post 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
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Keleos
Posts: 29
Joined: Saturday 27 May 2017 9:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Monitor Security Panel for updates

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

Who is online

Users browsing this forum: No registered users and 0 guests