Is notification to an external program possible?
Is notification to an external program possible?
This may be obvious, however I am not seeing any mechanism to do what I want. I use the Misterhouse home automation program as the central hub for my house events. I am trying to think of a way to use the excellent ZoneMinder camera monitoring system to alert Misterhouse as to when there is motion detected on the cameras. Ideally if ZM could launch a script when an alarm comes up, or write out to a file, I could trap for this.
I haven't looked into writing a misterhouse script that queries mysql yet, is there a specific place that ZM immediately writes out an alarm to? Has anyone done this? Do I even make sense (it's late).
-h
I haven't looked into writing a misterhouse script that queries mysql yet, is there a specific place that ZM immediately writes out an alarm to? Has anyone done this? Do I even make sense (it's late).
-h
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
There is currently no generic mechanism for outputting triggers, as there is for input triggers. This is mainly because there is not likely to be a small set of formats or behaviours that people want.
However it's not hard to brew up your own script. If you look at zmtrack.pl you will see a pretty small script that just sits and checks for alarms in real time and then issues commands. You should be able to see pretty much where to plug in your own equivalents.
On the other hand I'm also interested in adding support for common applications so if you know of a generic way that Misterhouse supports I'd be happy to add that in.
Phil
However it's not hard to brew up your own script. If you look at zmtrack.pl you will see a pretty small script that just sits and checks for alarms in real time and then issues commands. You should be able to see pretty much where to plug in your own equivalents.
On the other hand I'm also interested in adding support for common applications so if you know of a generic way that Misterhouse supports I'd be happy to add that in.
Phil
This could be interesting
http://board.homeseer.com/showthread.php?t=104408
Turns out there is now xAP to control the x10 ninja pan / tilt using the cm19a
I'm sure the zmtrack.pl could be modified to send xAP messages to the ninja mount.
Recently x10 had a deal 4 of these mounts for $100, seemed like a good deal if they'd work for you.
I have one that I don't use, but I'm betting I would if I can get it working with zm...
I'll keep you posted.
http://board.homeseer.com/showthread.php?t=104408
Turns out there is now xAP to control the x10 ninja pan / tilt using the cm19a
I'm sure the zmtrack.pl could be modified to send xAP messages to the ninja mount.
Recently x10 had a deal 4 of these mounts for $100, seemed like a good deal if they'd work for you.
I have one that I don't use, but I'm betting I would if I can get it working with zm...
I'll keep you posted.
Cool, I started some great discussion.
I will look at the zmtrack.pl script. Currently, I've set a trigger script that calls /usr/lib/zm/bin/mhalert
The mhalert script contains two command;
/usr/local/mh/bin/mhsend -run 'ZM Motion'
echo $1 >> /usr/local/mh/data/zm.txt
I have a voice command within misterhouse (MH) that listens for the command ZM Motion and announces that motion was detected. The command then sets a timer for 3 minutes to prevent the same announcement each second. Another loop detects changes in zm.txt and will (eventually) create http links that can be sent through Misterhouse's Instant Messaging Capability.
This does work, however there is a 20 second lag between motion and the misterhouse announcement. If this could be down to 2-3 seconds that would be great.
I'm not all that familiar with xAP. Currently I run both ZM and MH on the same box. Would this approach work?
I will look at the zmtrack.pl script. Currently, I've set a trigger script that calls /usr/lib/zm/bin/mhalert
The mhalert script contains two command;
/usr/local/mh/bin/mhsend -run 'ZM Motion'
echo $1 >> /usr/local/mh/data/zm.txt
I have a voice command within misterhouse (MH) that listens for the command ZM Motion and announces that motion was detected. The command then sets a timer for 3 minutes to prevent the same announcement each second. Another loop detects changes in zm.txt and will (eventually) create http links that can be sent through Misterhouse's Instant Messaging Capability.
This does work, however there is a 20 second lag between motion and the misterhouse announcement. If this could be down to 2-3 seconds that would be great.
I'm not all that familiar with xAP. Currently I run both ZM and MH on the same box. Would this approach work?
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Ok, I'll bump xAP/xPL support up the priority list a bit. Not that I have any other components (or spare capacity) for an xAP enabled ZM to talk to at present. I'll cross that bridge when I come to it though.
I need to do a bit of reading up. Is there a good intro to the messaging formats anywhere?
Phil
I need to do a bit of reading up. Is there a good intro to the messaging formats anywhere?
Phil
http://www.xapautomation.org/modules.ph ... id=indepth
Also, There was a xAP library created for linux by Peter Lindstone. Maybe this will make development easier?? The author's page is down, so I put it up:
http://www.lightningbolts.net/xaplib_src.zip
Also, There was a xAP library created for linux by Peter Lindstone. Maybe this will make development easier?? The author's page is down, so I put it up:
http://www.lightningbolts.net/xaplib_src.zip
Any chance you have looked over the xaplib yet? I don't think I know c well enough to be of any help. However there is a yahoo group for xap developers, I'm sure someone there could be helpful explaining anything you might need to know.
http://groups.yahoo.com/group/xAP_developer/join
http://groups.yahoo.com/group/xAP_developer/join
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact: