How do you use "Security Panel"?

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
patoo77
Posts: 296
Joined: Thursday 17 July 2014 18:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Paris, France
Contact:

How do you use "Security Panel"?

Post by patoo77 »

I am not sure this has been asked before (I'd love to get a link if it did)
I would like to know how Domoticz users are using the security panel. I understand that it is used in combination with an alarm system. But that's pretty the only knowledge I get from it. :oops:
So, how does that setup work exactly on your side?
* Maybe a tablet on the wall displaying the security panel?
* Anything else?

Also, would it make any sense to implement a "security panel" in a mobile context? For example in a smartphone, a smart watch, etc.
I'm trying to figure out these usecases so that I can implement that feature in my Domoticz app (see in my signature).

Thanks for your help guys :)
User avatar
nayr
Posts: 354
Joined: Tuesday 11 November 2014 18:42
Target OS: Linux
Domoticz version: github
Location: Denver, CO - USA
Contact:

Re: How do you use "Security Panel"?

Post by nayr »

its used to provide a somewhat secure device that requires a valid code to activate/deactivate.. and it has more modes than a simple protected binary switch.

all by its self its practically worthless, like a virtual switch, but when you get into scripting you establish security devices that respond differently depending on the status of the security panel..

here is a very simple example to only send out notifications when the security panel is NOT disarmed.

Code: Select all

if (devicechanged['Front Door'] == 'Open') and (otherdevices['Security Panel'] ~= 'Disarmed') then
        commandArray['SendNotification']='Parimeter Alert: Front Door#Alert, The front door was just accessed.'
end
Armed Home usually ignores internal motion sensors and only monitors perimeter sensors, it might also have longer grace periods before triggering audible alarms.
Armed Away typically is setup to respond to every security sensor immediately.
Disarmed is setup to keep security sensors silent, they can still log but quietly. notifications that are too verbose just get ignored when important ones do happen.

If your app has any local notifications, this is something your users will want to be able to filter based on.

having access to change the domo security panel through a mobile device would be ideal.. even more so if its tied in with geofencing for automatic arming.. I think the best behavior for a mobile security panel would be automatically arm when you leave the house, and automatically display the security panel when you return to your house and its still armed.

An even better solution would replace the panel input entirely and associate a NFC token with the security panel pin number, read the token and disarm with a tone.. like a chip/pin two factor auth but unlocking phone is the pin and the NFC token is the chip.. This keeps users from having to input a pin to unlock device, open app, enter a different pin to disarm security.. not too friendly.. If it could be condensed down to an unlock and tap then that would be perfect and might get wife approval.. Put a NFC sticker inside the entry way, when you get home all you do is unlock phone and tap it against sticker and house is securely disarmed.

I dont know if mobile API's open up access to fitness tracker data, but it would be a killer feature if your house went Armed Home automagically or did other tasks around the house when you fell asleep.. Doubt this is doable quite yet, but perhaps I can put a NFC sticker next to the bed and my phone will arm the house, do other automated tasks and go into silent mode when I lay it on the bandstand every night.. and disarm and do other tasks when I wakeup and pickup the phone.
Debian Jessie: CuBox-i4 (Primary) w/Static Routed IP and x509 / BeagleBone with OpenSprinkler / BeagleBone Planted Aquarium / 3x Raspbery Pi2b GPIO Slaves
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
patoo77
Posts: 296
Joined: Thursday 17 July 2014 18:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Paris, France
Contact:

Re: How do you use "Security Panel"?

Post by patoo77 »

Thanks a lot Nayr, this was very helpful!

My app does support Push notifications from Domoticz, so any user can already trigger a notification whenever the alarm is set through the security panel.

As for geofence, it is already possible to trigger an event based on a geofence (by using my app Pilot on iOS or the official Domoticz app on Android for example).
In this case, the geofence triggers a switch, which looks like an automatic arming. In this case, is there really a need for a security panel?

As for NFC/iBeacons, it's pretty much the same as geofence. And still no need for a security panel.

Pretty messed up lol
User avatar
galadril
Posts: 824
Joined: Monday 07 September 2015 10:32
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Contact:

Re: How do you use "Security Panel"?

Post by galadril »

Get Password:
GET http://ip:port/json.htm?type=settings
JSON: "SecPassword" : (for example) "2adcefe38fbcd3dcd45908fbab1bf628",


ARM HOME:
GET http://ip:port/json.htm?type=command&param=setsecstatus&secstatus=1&seccode=2adcefe38fbcd3dcd45908fbab1bf628


ARM AWAY:
http://ip:port/json.htm?type=command&param=setsecstatus&secstatus=2&seccode=2adcefe38fbcd3dcd45908fbab1bf628


DISARM:
http://ip:port/json.htm?type=command&param=setsecstatus&secstatus=0&seccode=2adcefe38fbcd3dcd45908fbab1bf628



GET STATUS
GET http://ip:port/json.htm?type=command&param=getsecstatus

Code: Select all

Example Switch Device JSON:
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 100,
"CustomImage" : 0,
"Data" : "Normal",
"Description" : "",
"Favorite" : 0,
"HardwareID" : 1000,
"HardwareName" : "Unknown?",
"HardwareType" : "Unknown?",
"HardwareTypeVal" : 0,
"HaveDimmer" : false,
"HaveGroupCmd" : false,
"HaveTimeout" : false,
"ID" : "148702",
"LastUpdate" : "2015-10-26 19:42:41",
"MaxDimLevel" : 0,
"Name" : "Security panel",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : 6,
"Status" : "Normal",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "Security Panel",
"SwitchType" : "Security",
"SwitchTypeVal" : 0,
"Timers" : "false",
"Type" : "Security",
"TypeImg" : "security",
"Unit" : 0,
"Used" : 1,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "65"
}
SecPassword is MD5 encrypted, so the pin in your app should also be encrypted before validation.
If you arm, check if the settings contain a delay counter..



To add a security panel to your switches, specify a PIN in the settings, and ARM the security panel.
It's now visible under devices, and you can add the switch.
Solar panels of Ginlong, Omnik-Solar, Transenergy or Solarman?? Try my Android app:
https://play.google.com/store/apps/deta ... ongmonitor
patoo77
Posts: 296
Joined: Thursday 17 July 2014 18:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Paris, France
Contact:

Re: How do you use "Security Panel"?

Post by patoo77 »

galadril wrote:Get Password:
GET http://ip:port/json.htm?type=settings
JSON: "SecPassword" : (for example) "2adcefe38fbcd3dcd45908fbab1bf628",


ARM HOME:
GET http://ip:port/json.htm?type=command&param=setsecstatus&secstatus=1&seccode=2adcefe38fbcd3dcd45908fbab1bf628


ARM AWAY:
http://ip:port/json.htm?type=command&param=setsecstatus&secstatus=2&seccode=2adcefe38fbcd3dcd45908fbab1bf628


DISARM:
http://ip:port/json.htm?type=command&param=setsecstatus&secstatus=0&seccode=2adcefe38fbcd3dcd45908fbab1bf628



GET STATUS
GET http://ip:port/json.htm?type=command&param=getsecstatus

Code: Select all

Example Switch Device JSON:
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 100,
"CustomImage" : 0,
"Data" : "Normal",
"Description" : "",
"Favorite" : 0,
"HardwareID" : 1000,
"HardwareName" : "Unknown?",
"HardwareType" : "Unknown?",
"HardwareTypeVal" : 0,
"HaveDimmer" : false,
"HaveGroupCmd" : false,
"HaveTimeout" : false,
"ID" : "148702",
"LastUpdate" : "2015-10-26 19:42:41",
"MaxDimLevel" : 0,
"Name" : "Security panel",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : 6,
"Status" : "Normal",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "Security Panel",
"SwitchType" : "Security",
"SwitchTypeVal" : 0,
"Timers" : "false",
"Type" : "Security",
"TypeImg" : "security",
"Unit" : 0,
"Used" : 1,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "65"
}
SecPassword is MD5 encrypted, so the pin in your app should also be encrypted before validation.
If you arm, check if the settings contain a delay counter..



To add a security panel to your switches, specify a PIN in the settings, and ARM the security panel.
It's now visible under devices, and you can add the switch.
Thanks galadril!
Didn't know it was possible to use the security panel as a switch. Makes more sense now.
Still not sure it would actually be useful in a mobile context though.

Thanks :)
tof92130
Posts: 3
Joined: Wednesday 27 March 2019 19:47
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: How do you use "Security Panel"?

Post by tof92130 »

Nice commands !

When I use it from my computer it works but when I try to use it in a lua script on my synology it doesn't work :(

so I connect via ssh to the syno and I enter the command:

Code: Select all

wget http://christophe:*password*@192.168.1.34:8084/json.htm?type=settings
and the syno replies:

Code: Select all

--2019-03-27 19:43:48--  http://christophe:*password*@192.168.1.34:8084/json.htm?type=settings
Connecting to 192.168.1.34:8084... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Unknown authentication scheme.

Username/Password Authentication Failed.
:roll:
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests