Amcrest ONVIF events
Amcrest ONVIF events
I have 1.37.66 running with Amcrest AI cameras that have ONVIF push events.
I verified with ODM that the camera is sending motion notifications.
The topic I receive is tns1:RuleEngine/CellMotionDetector/Motion.
The data is IsMotion: true.
I have tried various configuration options in my monitor Onvif settings, but I do not receive any motion triggers in zoneminder.
For ONVIF_URL I have http://10.11.0.13/onvif/device_service
For ONVIF_EVENTS_PATH I currently have /Events.
For ONVIF_Alarm_Text I have Motion.
I'm not clear what Zoneminder is expecting for these fields. I'm watching the camera send events to ODM but ZM is doing nothing.
A little help please?
BTW: 1.37 looks like it's going to be great.
I verified with ODM that the camera is sending motion notifications.
The topic I receive is tns1:RuleEngine/CellMotionDetector/Motion.
The data is IsMotion: true.
I have tried various configuration options in my monitor Onvif settings, but I do not receive any motion triggers in zoneminder.
For ONVIF_URL I have http://10.11.0.13/onvif/device_service
For ONVIF_EVENTS_PATH I currently have /Events.
For ONVIF_Alarm_Text I have Motion.
I'm not clear what Zoneminder is expecting for these fields. I'm watching the camera send events to ODM but ZM is doing nothing.
A little help please?
BTW: 1.37 looks like it's going to be great.
Re: Amcrest ONVIF events
I tried variations of "tns1:RuleEngine/CellMotionDetector/Motion" for the ONVIF_EVENTS_PATH, but got a SQL error that the field is too long.
Re: Amcrest ONVIF events
The settings you had work for my amcrest cams.
Path should just be /Events.
Use the ONVIF_Alarm_Text to match the message. THe default of Motion should have worked for you.
TUrn on debug and see what the logs say.
Path should just be /Events.
Use the ONVIF_Alarm_Text to match the message. THe default of Motion should have worked for you.
TUrn on debug and see what the logs say.
Re: Amcrest ONVIF events
Hi!
I turned on LOG_DEBUG. I waited for an Onvif event, then checked the logs. I see nothing regarding Onvif here.
https://paste.aquilatech.com/?cb7c91499 ... rP7VyuggBk
I turned on LOG_DEBUG. I waited for an Onvif event, then checked the logs. I see nothing regarding Onvif here.
https://paste.aquilatech.com/?cb7c91499 ... rP7VyuggBk
Re: Amcrest ONVIF events
My mistake, I missed this.
Code: Select all
2025/07/09 18:49:58 zmc_m4 136313 DB1 AMCREST url is http://10.11.0.13/onvif/device_service/eventManager.cgi?action=attach&codes=[VideoMotion] zm_monitor_amcrest.cpp 51
Re: Amcrest ONVIF events
I set the Alarm Text to "VideoMotion" but still no hits.
Re: Amcrest ONVIF events
I cleaned the logs and stopped everything and did a full test to capture what I could.
At 17:23:45 I got a detection from the camera. Here is the full log. Zoneminder did nothing with this.
What am I doing wrong please?
At 17:23:45 I got a detection from the camera. Here is the full log. Zoneminder did nothing with this.
What am I doing wrong please?
Code: Select all
07/10/25 17:23:44.627836 zmc_m4[523326].DB1-zm_monitor_amcrest.cpp/51 [AMCREST url is http://10.11.0.13/onvif/device_service/eventManager.cgi?action=attach&codes=[VideoMotion]]
07/10/25 17:23:45.818127 zmc_m4[523326].DB1-zm_monitor_amcrest.cpp/76 [AMCREST response code 0, response ]
07/10/25 17:23:45.822736 zmc_m4[523326].DB1-zm_monitor_amcrest.cpp/87 [AMCREST Healthy]
Re: Amcrest ONVIF events
Code: Select all
<s:Envelope
xmlns:sc="http://www.w3.org/2003/05/soap-encoding"
xmlns:s="http://www.w3.org/2003/05/soap-envelope"
xmlns:tt="http://www.onvif.org/ver10/schema"
xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
xmlns:tev="http://www.onvif.org/ver10/events/wsdl"
xmlns:wsa5="http://www.w3.org/2005/08/addressing"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wstop="http://docs.oasis-open.org/wsn/t-1"
xmlns:tns1="http://www.onvif.org/ver10/topics">
<s:Header>
<wsa5:Action>
http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesResponse
</wsa5:Action>
<wsa5:To>
http://10.11.0.13/onvif/Subscription?Idx=9
</wsa5:To>
</s:Header>
<s:Body>
<tev:PullMessagesResponse>
<tev:CurrentTime>
2025-07-10T22:04:37Z
</tev:CurrentTime>
<tev:TerminationTime>
2025-07-10T22:05:47Z
</tev:TerminationTime>
<wsnt:NotificationMessage>
<wsnt:Topic
Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">
tns1:RuleEngine/CellMotionDetector/Motion
</wsnt:Topic>
<wsnt:Message>
<tt:Message
UtcTime="2025-07-10T22:04:37Z"
PropertyOperation="Changed">
<tt:Source>
<tt:SimpleItem
Name="VideoSourceConfigurationToken"
Value="00000"/>
<tt:SimpleItem
Name="VideoAnalyticsConfigurationToken"
Value="00000"/>
<tt:SimpleItem
Name="Rule"
Value="00000"/>
</tt:Source>
<tt:Data>
<tt:SimpleItem
Name="IsMotion"
Value="true"/>
</tt:Data>
</tt:Message>
</wsnt:Message>
</wsnt:NotificationMessage>
<wsnt:NotificationMessage>
<wsnt:Topic
Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">
tns1:VideoSource/MotionAlarm
</wsnt:Topic>
<wsnt:Message>
<tt:Message
UtcTime="2025-07-10T22:04:37Z"
PropertyOperation="Changed">
<tt:Source>
<tt:SimpleItem
Name="Source"
Value="00000"/>
</tt:Source>
<tt:Data>
<tt:SimpleItem
Name="State"
Value="true"/>
</tt:Data>
</tt:Message>
</wsnt:Message>
</wsnt:NotificationMessage>
</tev:PullMessagesResponse>
</s:Body>
</s:Envelope>
Re: Amcrest ONVIF events
OK, in desperation, I ran wireshark on both Zoneminder and ODM.
ODM is sending requests like this:
to subscribe to events. This works.
Zoneminder is repeatedly sending this:
Every 10 seconds, and getting no response from the camera.
ODM is sending requests like this:
Code: Select all
http://10.11.0.13/onvif/Subscription?Idx=11
Zoneminder is repeatedly sending this:
Code: Select all
http://10.11.0.13/onvif/device_service/eventManager.cgi?action=attach&codes=[VideoMotion]
[Solved] Re: Amcrest ONVIF events
Setting use_Amcrest_API to false, I started getting Onvif events.
-
- Posts: 15
- Joined: Wed May 28, 2025 2:45 pm
Re: [Solved] Re: Amcrest ONVIF events
I spent a fair amount of time yesterday playing with this. I'm getting a bunch of errors with my Amcrest camera.
Code: Select all
ONVIF Couldn't create subscription at http://10.1.6.15/onvif/device_service/Events! 12, fault:Wsse authorized time check failed., detail:null
Also, how are you using ODM to test this? Other than basic status screens in ODM, I don't see anywhere that I can actually test ONVIF.
As an aside topic, but kind of related. Since I never had ONVIF working, I have (what appears to be) a fully functioning python script that queries all of my cameras periodically, captures the event types, an triggers ZM. I think I have the last bugs worked out of it. It is currently handling 10 cameras and allows you to cross-trigger from one camera to another to obtain better perspective of coverage (e.g. front yard, street, etc.) when needed.
Re: Amcrest ONVIF events
THe Amcrest_API thing is entirely separate from ONVIF. It is an entirely different API. I need to get aroudn to removing it from the ONVIF page.
I also see no purpose in using it if ONVIF works.
I also see no purpose in using it if ONVIF works.
Re: [Solved] Re: Amcrest ONVIF events
I have been testing with these two cameras.PencilGeek wrote: ↑Fri Jul 11, 2025 5:44 pm Could you please post all off your ONVIF settings in ZM?
Code: Select all
Model: Amcrest IP8M-DLB2998EW-AI
ONVIF_URL: http://10.11.0.13/onvif/device_service
ONVIF_EVENTS_PATH: /Events
ONVIF_Alarm_Text: Motion
Code: Select all
Model: GW Security GW-5061IP
ONVIF_URL: http://10.11.0.11/onvif/device_service
ONVIF_EVENTS_PATH: /Events
ONVIF_Alarm_Text: Motion
I'm still working on the cameras to try and get them to be reliable. The GW is triggering every time the wind blows.
And I have to wait until night tonight to verify everything is working. I read that some amcrest cameras don't do Onvif at night. I will be testing all night.
My new Amcrest replaces a Grandstream that got hit by lightning 3 weeks ago. This is my 3rd camera replacement and 1 network switch that have been hit by lightning in 20 years. I installed lightning arrestors a few years ago, no network damage this time, but the GS camera was fried.
-
- Posts: 15
- Joined: Wed May 28, 2025 2:45 pm
Re: [Solved] Re: Amcrest ONVIF events
I've got the same Amcrest cameras. I'm getting that timestamp mismatch error I cited above. My TZ on the computer is the same TZ as ZoneMinder, yet I'm getting this timestamp mismatch. I also checked the timestamp in the log against the timestamp reported by the camera (the 175... number below), and they match. So I'm at a loss why this is reporting this problem.Basildane wrote: ↑Fri Jul 11, 2025 9:27 pmI have been testing with these two cameras.PencilGeek wrote: ↑Fri Jul 11, 2025 5:44 pm Could you please post all off your ONVIF settings in ZM?The second one isCode: Select all
Model: Amcrest IP8M-DLB2998EW-AI ONVIF_URL: http://10.11.0.13/onvif/device_service ONVIF_EVENTS_PATH: /Events ONVIF_Alarm_Text: Motion
Once I realized that I need to turn off Amcrest_API, then it started working.Code: Select all
Model: GW Security GW-5061IP ONVIF_URL: http://10.11.0.11/onvif/device_service ONVIF_EVENTS_PATH: /Events ONVIF_Alarm_Text: Motion
I'm still working on the cameras to try and get them to be reliable. The GW is triggering every time the wind blows.
And I have to wait until night tonight to verify everything is working. I read that some amcrest cameras don't do Onvif at night. I will be testing all night.
My new Amcrest replaces a Grandstream that got hit by lightning 3 weeks ago. This is my 3rd camera replacement and 1 network switch that have been hit by lightning in 20 years. I installed lightning arrestors a few years ago, no network damage this time, but the GS camera was fried.
Code: Select all
07/11/25 14:12:36.259864 zmc_m5[337118].ERR-zm_monitor_onvif.cpp/109 [ONVIF Couldn't create subscription at http://10.1.6.15/onvif/device_service/Events! 12, fault:Wsse authorized time check failed., detail:null]
07/11/25 14:12:36.261094 zmc_m5[337048].DB1-zm_db.cpp/223 [Success running sql query INSERT INTO `Logs` ( `TimeKey`, `Component`, `ServerId`, `Pid`, `Level`, `Code`, `Message`, `File`, `Line` ) VALUES ( 1752268356.259864, 'zmc_m5', 0, 337118, -2, 'ERR', 'ONVIF Couldn\'t create subscription at http://10.1.6.15/onvif/
Re: Amcrest ONVIF events
My amcrest is working great, but the GW keeps locking on ALERT and gets stuck.
Code: Select all
zmc_m1 589677 ERR Failed to get ONVIF messages! 28 Connection refused