how to query domoticz's security panel
-
Hello,
Is there a way to retrieve domoticz's security panel's status ? It would be nice for example to activate motion sensors only when it's "armed away".
edit for clarification : I'd like to retrieve domoticz"s security status from the sensor node by polling the gateway every now and then.
Regards,
Mikael
-
Maybe this can do the job?
http://www.domoticz.com/wiki/Domoticz_API/JSON_URL's#Retrieve_status_of_specific_device
-
Thanks, and sorry, my question was not clear enough : I would like to retrieve this information from the sensor node, in order to only activate the motion detection and message transmission when domoticz's security is "armed away".
Regards
Mikael
-
I use lua:
if (devicechanged['Motiondetector'] == 'On' and otherdevices['Security Panel'] == 'Arm Away') then
-
@sundberg84 said in how to query domoticz's security panel:
I use lua:
if (devicechanged['Motiondetector'] == 'On' and otherdevices['Security Panel'] == 'Arm Away') then
is there a way to put the motion sensor in bypassed mode or does it have to be a combination of the security panel being armed. I have a vera controller and there is a button to arm and bypass when in bypassed i get no alerts, how can that be done in domticz.
-
@stress-nero i do it with Lua code.
-
@sundberg84 can you give me an example, and with lua will you be able to have a button that can toggle the armed and bypassed states.
-
@stress-nero - Yes - there is both a button and a security panel in Domoticz GUI you can use to set alarm mode. Also yes, I combine different states to be able to set the motion sensors in bypassed mode. There are two modes Arm home or Arm away. When I have arm home only my outer motion detectors are active (or they are active all the time, but only notify)
(Home is a variable set by the current status of the security device.
------------------------------------------------ -- If away - start alarm/watch ------------------------------------------------ if (Home == 'Away' and uservariables["var_alarm"] < 2) then --Start motion detection os.execute("bash /home/pi/domoticz/scripts/lua/startmotion.sh") --Set status commandArray['Inbrottsalarm'] = 'Arm Away' commandArray['Variable:var_alarm']='2' commandArray['Group:Taklampor']='Off' commandArray['Group:Brytare Inne']='Off' commandArray['WW sovlampa'] = 'Off' --Log commandArray['SendNotification']='Alarm Status#Away = Alarm armed#-2' print('Activating alarm and motiondetection') end
-
thank for the input