Phone to arm and disarm alarms

Forum for questions and support relating to the 1.29.x releases only.
Locked
schott1984
Posts: 4
Joined: Thu May 05, 2016 1:01 am

Phone to arm and disarm alarms

Post by schott1984 »

Good evening, everyone.

I recently got Zoneminder running with one IP camera and ZMninja on my android phone.

My goal here is to simply use ZM's motion detecting to replace a traditional home security system.

I have read about writing a script to check if your devices are on the home network's wifi, if they're within bluetooth range, etc.

Is it realistically possible to get a simple ARM/DISARM button working on our android phones? I realize I could connect with putty and enable or disable zoneminder, but my wife needs to be able to do this simply and even for me, the SSH method takes too much effort upon leaving/arrive at home.

Ideally I would like to simply change the mode of the monitors to "monitor" (possibly only certain ones) on "disarm" and "modect" on "arm".

What does everyone think? Is my only option to learn to make an app for android and design that around the ZM API?

Thank you in advance!
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Phone to arm and disarm alarms

Post by asker »

Yup - I'll be adding an API for that and will also add it to zmNinja soon
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
rockedge
Posts: 1198
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Phone to arm and disarm alarms

Post by rockedge »

Yup - I'll be adding an API for that and will also add it to zmNinja soon
That will be fantastic. Nice work.
schott1984
Posts: 4
Joined: Thu May 05, 2016 1:01 am

Re: Phone to arm and disarm alarms

Post by schott1984 »

asker wrote:Yup - I'll be adding an API for that and will also add it to zmNinja soon
Awesome. I won't put so much effort into figuring it out on my own, then.

Will we be able to assign groups of monitors to arm/disarm (change from modect to monitor)?
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Phone to arm and disarm alarms

Post by asker »

For now, its on/off per monitor. No groups.
I've put in a PR here https://github.com/ZoneMinder/ZoneMinder/pull/1466

Feel free to give it a go

Code: Select all

// arm/disarm alarms
 +	// expected format: http(s):/portal-api-url/monitors/alarm/id:M/command:C.json
 +	// where M=monitorId
 +	// where C=on|off
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
calmor15014
Posts: 20
Joined: Mon May 09, 2016 4:12 pm

Re: Phone to arm and disarm alarms

Post by calmor15014 »

I'm new to ZM (4 days of experimenting now), but wouldn't this type of thing be better served as a state change, which is possible (though not as a big red/green button) in zmNinja already?

I'm also trying to figure out the workflow to handle some form of semi-automatic or easy-to-use state change.
Locked