xAP/xPL support
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Gliming, thanks for taking the time to do this. I think your approach is right in the current circumstances. Eventually I'd like to have a more generic triggering interface which X10, xAP etc could wrap around but that won't be for a little while yet.
I'd be interested to see how you get on with this and if you need any help or tips just let me know.
Phil
I'd be interested to see how you get on with this and if you need any help or tips just let me know.
Phil
Phil,
I definitely agree w/ eventually working toward a more generic wrapper/framework w/i which these scripts could integrate. I'd be quite happy to asist if that makes sense.
Thanks for the offer to answer questions. Would you prefer that I ask questions regarding technical implementation details on this forum (and, if so, which forum category) or an email?
As samples, here is an initial set:
1) Each monitor appears to have a unique ID which is an incrementing integer starting at 1. Is this id system assigned or can the user change it? Are ids reused by the system if a monitor is added and then deleted?
2) Is it possible (or useful?) to get the zone name and id for a monitor that has gone into alarm? If so, can you provide a pointer on the programmtic way to get this info? Also, is it possible for more than one zone to have caused/permitted an alarm?
3) I note that you test for monitor state values 0 and 2 (suggesting alarm and non-alarm). Is there also a "1" and if so, what does it mean? Would it be possibly useful to differentiate all three states (with xAP, we're not limited to just ON and OFF state maps as you did w/ x10)?
4) I have an xAP library (multiple pm files) that isn't in CPAN. Do you have a preference on location (e.g., scripts/lib/xAP) that could serve as a precedent? BTW: This library is currently BSD licensed--is that a problem (I'm assuming the more liberal license would be ok)? I'm leaving the header/license text of the modified zmx10.pl (I guess I'll tentatively call it xmxap.pl realizing it might need to masquerade as zmx10.pl initially) untouched as I'm significantly reusing it.
BTW: If you prefer a separate email dialoge, you can reach me at gregg <at> limings <dot> net.
Regards,
Gregg
I definitely agree w/ eventually working toward a more generic wrapper/framework w/i which these scripts could integrate. I'd be quite happy to asist if that makes sense.
Thanks for the offer to answer questions. Would you prefer that I ask questions regarding technical implementation details on this forum (and, if so, which forum category) or an email?
As samples, here is an initial set:
1) Each monitor appears to have a unique ID which is an incrementing integer starting at 1. Is this id system assigned or can the user change it? Are ids reused by the system if a monitor is added and then deleted?
2) Is it possible (or useful?) to get the zone name and id for a monitor that has gone into alarm? If so, can you provide a pointer on the programmtic way to get this info? Also, is it possible for more than one zone to have caused/permitted an alarm?
3) I note that you test for monitor state values 0 and 2 (suggesting alarm and non-alarm). Is there also a "1" and if so, what does it mean? Would it be possibly useful to differentiate all three states (with xAP, we're not limited to just ON and OFF state maps as you did w/ x10)?
4) I have an xAP library (multiple pm files) that isn't in CPAN. Do you have a preference on location (e.g., scripts/lib/xAP) that could serve as a precedent? BTW: This library is currently BSD licensed--is that a problem (I'm assuming the more liberal license would be ok)? I'm leaving the header/license text of the modified zmx10.pl (I guess I'll tentatively call it xmxap.pl realizing it might need to masquerade as zmx10.pl initially) untouched as I'm significantly reusing it.
BTW: If you prefer a separate email dialoge, you can reach me at gregg <at> limings <dot> net.
Regards,
Gregg
Joe,
I just noticed the following from your recent reply:
I just noticed the following from your recent reply:
Given that I was going to replicate the existing x10 functional capabilities--only via xAP messages--I don't see that it won't do exactly as you mention above. Specifically, I do intend to allow the same mechanism for (1) turning a monitor on and off, (2) turning an alarm on or off and (3) reporting monitor alarm states--all using xAP BSC schema (I'd use the text field in addition to basic on/off to supplement the extended states). The difference is that you won't be referencing x10 codes in xAP--nor would you actually use zm to turn control x10 devices via xAP--leaving that to some separate home automation control application.I could envision in the future listening to xAP messages as well, and forcing an alarm on or off, etc...
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
I have the script running in my 1.21.4 install since Nov 05. It was modelled after a combination of 1.21.4 zmtrigger.pl and zmx10.pl scripts. The proper points of integration still need to be addressed (I have them grabbing values out of the local conf file). And, perhaps more importantly, testing by users other than me (I'm not convinced that I understand the various capture modes sufficient to have properly interpretted intended operation). Joe Z had started testing; but, I believe was hampered by his xAP software. I'll be happy to make it available to anyone that asks. The script reports alarms, allows invocation of alarms and/or recording and will report telemetry (x/y coords)--if desired--while an alarm is occuring (so as to permit calculation of movement direction(s)).
Gregg
Gregg
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
wow sounds great. This xap thing then what equipment you running
James Wilson
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Hi Gregg. That sounds great, if you can make it available I would like a look. If you don't have somewhere to put it, just mail it to me and I'll stick it on the site.gliming wrote:I have the script running in my 1.21.4 install since Nov 05. It was modelled after a combination of 1.21.4 zmtrigger.pl and zmx10.pl scripts. The proper points of integration still need to be addressed (I have them grabbing values out of the local conf file). And, perhaps more importantly, testing by users other than me (I'm not convinced that I understand the various capture modes sufficient to have properly interpretted intended operation). Joe Z had started testing; but, I believe was hampered by his xAP software. I'll be happy to make it available to anyone that asks. The script reports alarms, allows invocation of alarms and/or recording and will report telemetry (x/y coords)--if desired--while an alarm is occuring (so as to permit calculation of movement direction(s)).
Phil
For the time being, you can get the current package at limings.net/xap/zmxap. I plan to take a look at the latest 1.22.x next week and revise the script to take advantage of any new features and/or practices. The README provides the current "hacked" method of integrating w/ zm. The xap messages are small enough that you can either view them in tcpdump or grab an xAP-aware message viewer. Sample xAP messages are included in the README.
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Thanks. The 1.22.0 zmtrigger.pl is very different, and not fully documented yet, so if you need any help just let me know. On the other hand, as all the shared memory access stuff is in perl modules it is much easier to create bespoke scripts to perform specific tasks or integrate ZM functionality into other applications.
Phil
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
General Question
I have been looking into this xap thing and isnt it a bit too powerful for alarm use or did i miss something glaringly obvious
James
I have been looking into this xap thing and isnt it a bit too powerful for alarm use or did i miss something glaringly obvious
James
James Wilson
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
I'm not sure what you mean by "too powerful". xAP is a protocol for communicating home-automation related information. In my case, I'm getting alarm information sent from zm on one system and intercepted by misterhouse (mh) on another system. This info is integrated by mh using occupancy tracking functions that combine data now from PIRs, zm alarms, door contacts, etc. Likewise, I can have misterhouse deliberately start an alarm or recording based upon perceived occupancy and or occupancy modes (e.g., sleeping, away, awake, etc.). That's a long winded way of saying that it's not at all "too powerful" for my use (and I would expect others). Likewise, w/ telemetry reporting, I can potentially deduce whether an alarmed "target" is moving in a particular direction--which could be used to anticipate a target coming into another "zone".General Question
I have been looking into this xap thing and isnt it a bit too powerful for alarm use or did i miss something glaringly obvious
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
Oh i see, i was looking at all the tv and stereo control stuff. Does this then get converted ti ip or are you linking rs232 between your servers. I only ask as im looking for a flexible way to get normal movement sensors into zm, and linking this to zm, zm4ms an d then linux viewer to see status's etc
James
James
James Wilson
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk