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.


  • 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".


  • Hardware Contributor

    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.

  • Hardware Contributor

    @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.

  • Hardware Contributor

    @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/")
    	--Set status
    	commandArray['Inbrottsalarm'] = 'Arm Away'
    	commandArray['Group:Brytare Inne']='Off'
    	commandArray['WW sovlampa'] = 'Off'
    	commandArray['SendNotification']='Alarm Status#Away = Alarm armed#-2'	
    	print('Activating alarm and motiondetection')

  • thank for the input

Log in to reply





Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.