xAP/xPL support
I install the xAP plugin. So far I am able to see xAP messages from all of my monitors. I am able to Force Start/Stop/Cancel alarms from an xAP message.
I am not able to start/stop motion detection yet. Not sure why, but I see the following errors in my logs:
Can't get shared memory id '2053971978' for monitor#10: No such file or directory
Exiting subroutine via next at /usr/lib/zm/bin/zmx10.pl line 426.
any ideas??
I am not able to start/stop motion detection yet. Not sure why, but I see the following errors in my logs:
Can't get shared memory id '2053971978' for monitor#10: No such file or directory
Exiting subroutine via next at /usr/lib/zm/bin/zmx10.pl line 426.
any ideas??
I found out what was wrong:
The following example has a mistake. It should be VMI.MonitorCmd not xAPBSC.cmd
Thanks a lot for this plugin!
# An example xAP message sent to zmxap (from some xAP sender app)
# that starts monitor activation
# Note: these messages only apply to "Modect", "Record" or "Mocord"
# monitors
xap-header
{
v=12
hop=1
uid=FFCDEF00
class=xAPBSC.cmd
source=acme.sender.test
target=zm.zoneminder.myhouse:porch_camera
}
Monitor
{
Action=<start>|<stop>
}
The following example has a mistake. It should be VMI.MonitorCmd not xAPBSC.cmd
Thanks a lot for this plugin!
# An example xAP message sent to zmxap (from some xAP sender app)
# that starts monitor activation
# Note: these messages only apply to "Modect", "Record" or "Mocord"
# monitors
xap-header
{
v=12
hop=1
uid=FFCDEF00
class=xAPBSC.cmd
source=acme.sender.test
target=zm.zoneminder.myhouse:porch_camera
}
Monitor
{
Action=<start>|<stop>
}
Boy do I feel stupid. Joe Z. pointed this out earlier off-list and I forgot to update the README. As you probably noted, the documentation is quite sparse and may well be insufficient (although it's encouraging that you managed to make everything work despite mistakes!). Any suggestions would be appreciated. Likewise for any functional changes/behavior.I found out what was wrong:
The following example has a mistake. It should be VMI.MonitorCmd not xAPBSC.cmd
As to your previous reported error... I'm pretty sure that I saw this message before anytime one of my monitors was set to "None" or "Monitor" (maybe it was just "None"). Regardless, I ought to do a better job of trapping/handling the error. I'm hoping that the 1.22.x framework will provide the direct access layer so that I'm not having to deal w/ it.
I have looked briefly at the new 1.22.x framework. It has definitely dramatically changed. I will plan on migrating this script to take advantage of the new perl libs.
Gregg
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
The xAP connector underwent a major "overhaul" motivated by the very awesome new zm API! It now runs as a stand-alone daemon (no more "mangling" zmx10.pl and related configs) and incorporates new features available to 1.22.x and requested by the xAP community. zmxap (ZM xAP connector) is available at http://limings.net/xap/zmxap. Because of it's new dependence on the 1.22.x API, it is only compatible with 1.22.x.
Gregg
Gregg
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
I plan to work on an overview that conceptually describes capabilities/features in the next few days. That info will appear on the zmxap page. There does exist a bit of a "install and usage" guide in the README embedded in the package. It is perhaps sufficient for "installation" but does not address all of the possible usage scenarios. That will also be expanded (hopefully soon).
Gregg
Gregg
Testing xAP
gliming, great ap!
testing and seeing the following in Syslog:
Apr 27 00:26:35 ICS-ZM zm?[5363]: ERR [Can't read 'shared_data:alarm_x' from shared memory '7a6d2004/163844': Identifier removed]
Apr 27 00:26:36 ICS-ZM zm?[5146]: ERR [Can't read 'shared_data:state' from shared memory '7a6d2004/163844': Identifier removed]
Apr 27 00:26:36 ICS-ZM zm?[5146]: ERR [Can't read 'shared_data:last_event' from shared memory '7a6d2004/163844': Identifier removed]
Apr 27 00:26:36 ICS-ZM zm?[5146]: ERR [Can't read 'shared_data:alarm_x' from shared memory '7a6d2004/163844': Identifier removed]
Apr 27 00:26:37 ICS-ZM zm?[5363]: ERR [Can't read 'shared_data:state' from shared memory '7a6d2004/163844': Identifier removed]
Apr 27 00:26:37 ICS-ZM zm?[5363]: ERR [Can't read 'shared_data:last_event' from shared memory '7a6d2004/163844': Identifier removed]
Apr 27 00:26:37 ICS-ZM zm?[5363]: ERR [Can't read 'shared_data:alarm_x' from shared memory '7a6d2004/163844': Identifier removed]
I have an xAP hub set up to read messages from ZM and messages appear fine. I am not sending any xAP messages to ZM yet but want to integrate with Homeseer.
testing and seeing the following in Syslog:
Apr 27 00:26:35 ICS-ZM zm?[5363]: ERR [Can't read 'shared_data:alarm_x' from shared memory '7a6d2004/163844': Identifier removed]
Apr 27 00:26:36 ICS-ZM zm?[5146]: ERR [Can't read 'shared_data:state' from shared memory '7a6d2004/163844': Identifier removed]
Apr 27 00:26:36 ICS-ZM zm?[5146]: ERR [Can't read 'shared_data:last_event' from shared memory '7a6d2004/163844': Identifier removed]
Apr 27 00:26:36 ICS-ZM zm?[5146]: ERR [Can't read 'shared_data:alarm_x' from shared memory '7a6d2004/163844': Identifier removed]
Apr 27 00:26:37 ICS-ZM zm?[5363]: ERR [Can't read 'shared_data:state' from shared memory '7a6d2004/163844': Identifier removed]
Apr 27 00:26:37 ICS-ZM zm?[5363]: ERR [Can't read 'shared_data:last_event' from shared memory '7a6d2004/163844': Identifier removed]
Apr 27 00:26:37 ICS-ZM zm?[5363]: ERR [Can't read 'shared_data:alarm_x' from shared memory '7a6d2004/163844': Identifier removed]
I have an xAP hub set up to read messages from ZM and messages appear fine. I am not sending any xAP messages to ZM yet but want to integrate with Homeseer.
Apr 27 00:26:35 ICS-ZM zm?[5363]: ERR [Can't read 'shared_data:alarm_x' from shared memory '7a6d2004/163844': Identifier removed]
Apr 27 00:26:36 ICS-ZM zm?[5146]: ERR [Can't read 'shared_data:state' from shared memory '7a6d2004/163844': Identifier removed]
Apr 27 00:26:36 ICS-ZM zm?[5146]: ERR [Can't read 'shared_data:last_event' from shared memory '7a6d2004/163844': Identifier removed]
Apr 27 00:26:36 ICS-ZM zm?[5146]: ERR [Can't read 'shared_data:alarm_x' from shared memory '7a6d2004/163844': Identifier removed]
Apr 27 00:26:37 ICS-ZM zm?[5363]: ERR [Can't read 'shared_data:state' from shared memory '7a6d2004/163844': Identifier removed]
Apr 27 00:26:37 ICS-ZM zm?[5363]: ERR [Can't read 'shared_data:last_event' from shared memory '7a6d2004/163844': Identifier removed]
Apr 27 00:26:37 ICS-ZM zm?[5363]: ERR [Can't read 'shared_data:alarm_x' from shared memory '7a6d2004/163844': Identifier removed]
These messages are being generated from within the new ZM perl API--specifically, SharedMemory::zmShmRead. I admittedly don't fully appreciate all of the nuances of ZM's use of shared memory. Hopefully, Phil might see this and offer ideas.
Do you ever get any xAP messages on alarm? I'm guessing not from the errors above, but want to confirm.
For better troubleshooting, can you identify which zm version you're using and how many monitors and the monitor type you have?
Can you clarify the "messages appear fine" part? Are you saying that xAP messages are in general visible or that you are getting any ZM xAP messages (e.g., VMI.MonitorInfo, or xap-hbeat.alive)?I have an xAP hub set up to read messages from ZM and messages appear fine. I am not sending any xAP messages to ZM yet but want to integrate with Homeseer.
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
I think these errors occur when a script is still reading from shared memory that is no longer there if a cam has been shut down etc. If there is a loop it may be worth verifying the shared memory on each pass but there may be more complicated scenarios where this could occur that I haven't thought of yet.
Phil