retract
(R. E. Tract)
July 22, 2024, 6:21pm
1
Hello,
I observed the below message in the logs while attempting to configure motion detection on a VivoTek FD9388-HTV IP Camera in OH4. Seems to indicate that the binding needs to be updated for this to work, no?
2024-07-22 10:56:07.935 [TRACE] [amera.internal.onvif.OnvifConnection] - ONVIF reply is: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tet="http://www.onvif.org/ver10/events/wsdl" xmlns:tnsvvtk="http://www.vivotek.com/2009/event/topics" xmlns:vev="http://www.vivotek.com/api/ws/event" xmlns:tnsvca="http://www.vivotek.com/vca/xml/topics" xmlns:ivs="http://www.vivotek.com/vca/xml/schema" xmlns:trc="http://www.onvif.org/ver10/recording/wsdl"><env:Header><wsa:Action>http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesResponse</wsa:Action></env:Header><env:Body><tet:PullMessagesResponse><tet:CurrentTime>2024-07-22T18:03:39.393Z</tet:CurrentTime><tet:TerminationTime>2024-07-22T18:03:48.885Z</tet:TerminationTime><wsnt:NotificationMessage><wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:VideoAnalytics/Motion</wsnt:Topic><wsnt:Message><tt:Message UtcTime="2024-07-22T18:03:37.900Z"><tt:Source><tt:SimpleItem Name="VideoSourceToken" Value="VideoSource1"></tt:SimpleItem><tt:SimpleItem Name="MotionWindowIndex" Value="0"></tt:SimpleItem></tt:Source><tt:Data><tt:SimpleItem Name="Level" Value="Normal"></tt:SimpleItem><tt:SimpleItem Name="Percentage" Value="0"></tt:SimpleItem></tt:Data></tt:Message></wsnt:Message></wsnt:NotificationMessage></tet:PullMessagesResponse></env:Body></env:Envelope>
2024-07-22 10:56:07.935 [DEBUG] [amera.internal.onvif.OnvifConnection] - ONVIF Event Topic: VideoAnalytics/Motion, Data: Level, Value: Normal
2024-07-22 10:56:07.935 [DEBUG] [amera.internal.onvif.OnvifConnection] - Please report this camera has an un-implemented ONVIF event. Topic: VideoAnalytics/Motion
Let me know if there is any additional information I can provide regarding this. Additionally, I can help with development / testing as convenient, modulo specific languages / technologies (I mostly do embedded).
matt1
(Skinah)
August 3, 2024, 1:01pm
2
retract:
VideoAnalytics/Motion
thanks for posting, Can you post what changes when there is motion please? Does Value: Normal
change to a different value, if so what values can it change to so it can be added.
retract
(R. E. Tract)
August 6, 2024, 11:56pm
3
Seems to report ONVIF Event Topic: VideoAnalytics/Motion, Data: Level, Value: Trigger
on detection and then returns to ONVIF Event Topic: VideoAnalytics/Motion, Data: Level, Value: Normal
after.
I also see ONVIF Event Topic: VideoSource/MotionAlarm, Data: State, Value: true
(and the corresponding set to false
). A more complete log is included behind the fold below.
I will be out of town until next week but will be available for further debugging / testing after, as desired.
Thanks!
Log
2024-08-06 15:28:47.699 [DEBUG] [amera.internal.onvif.OnvifConnection] - No ONVIF Events occured in the last 8 seconds
2024-08-06 15:28:47.699 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request: PullMessages to http://xxx.xxx.xxx.xxx:80/Subscription?Idx=0
2024-08-06 15:28:47.759 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request: Renew to http://xxx.xxx.xxx.xxx:80/Subscription?Idx=0
2024-08-06 15:28:48.559 [TRACE] [amera.internal.onvif.OnvifConnection] - ONVIF reply is: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"><env:Header><wsa:Action>http://docs.oasis-open.org/wsn/bw-2/SubscriptionManager/RenewResponse</wsa:Action></env:Header><env:Body><wsnt:RenewResponse><wsnt:TerminationTime>2024-08-06T22:36:25.892</wsnt:TerminationTime><wsnt:CurrentTime>2024-08-06T22:36:15.892</wsnt:CurrentTime></wsnt:RenewResponse></env:Body></env:Envelope>
2024-08-06 15:28:49.134 [TRACE] [amera.internal.onvif.OnvifConnection] - ONVIF reply is: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tet="http://www.onvif.org/ver10/events/wsdl" xmlns:tnsvvtk="http://www.vivotek.com/2009/event/topics" xmlns:vev="http://www.vivotek.com/api/ws/event" xmlns:tnsvca="http://www.vivotek.com/vca/xml/topics" xmlns:ivs="http://www.vivotek.com/vca/xml/schema" xmlns:trc="http://www.onvif.org/ver10/recording/wsdl"><env:Header><wsa:Action>http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesResponse</wsa:Action></env:Header><env:Body><tet:PullMessagesResponse><tet:CurrentTime>2024-08-06T22:36:16.467Z</tet:CurrentTime><tet:TerminationTime>2024-08-06T22:36:25.892Z</tet:TerminationTime><wsnt:NotificationMessage><wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:VideoAnalytics/Motion</wsnt:Topic><wsnt:Message><tt:Message UtcTime="2024-08-06T22:36:14.871Z"><tt:Source><tt:SimpleItem Name="VideoSourceToken" Value="VideoSource1"></tt:SimpleItem><tt:SimpleItem Name="MotionWindowIndex" Value="0"></tt:SimpleItem></tt:Source><tt:Data><tt:SimpleItem Name="Level" Value="Trigger"></tt:SimpleItem><tt:SimpleItem Name="Percentage" Value="50"></tt:SimpleItem></tt:Data></tt:Message></wsnt:Message></wsnt:NotificationMessage></tet:PullMessagesResponse></env:Body></env:Envelope>
2024-08-06 15:28:49.134 [DEBUG] [amera.internal.onvif.OnvifConnection] - ONVIF Event Topic: VideoAnalytics/Motion, Data: Level, Value: Trigger
2024-08-06 15:28:49.134 [DEBUG] [amera.internal.onvif.OnvifConnection] - Please report this camera has an un-implemented ONVIF event. Topic: VideoAnalytics/Motion
2024-08-06 15:28:49.134 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request: PullMessages to http://xxx.xxx.xxx.xxx:80/Subscription?Idx=0
2024-08-06 15:28:49.871 [TRACE] [amera.internal.onvif.OnvifConnection] - ONVIF reply is: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tet="http://www.onvif.org/ver10/events/wsdl" xmlns:tnsvvtk="http://www.vivotek.com/2009/event/topics" xmlns:vev="http://www.vivotek.com/api/ws/event" xmlns:tnsvca="http://www.vivotek.com/vca/xml/topics" xmlns:ivs="http://www.vivotek.com/vca/xml/schema" xmlns:trc="http://www.onvif.org/ver10/recording/wsdl"><env:Header><wsa:Action>http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesResponse</wsa:Action></env:Header><env:Body><tet:PullMessagesResponse><tet:CurrentTime>2024-08-06T22:36:17.204Z</tet:CurrentTime><tet:TerminationTime>2024-08-06T22:36:25.892Z</tet:TerminationTime><wsnt:NotificationMessage><wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:VideoSource/MotionAlarm</wsnt:Topic><wsnt:Message><tt:Message UtcTime="2024-08-06T22:36:14.871Z" PropertyOperation="Changed"><tt:Source><tt:SimpleItem Name="Source" Value="VideoSource1"></tt:SimpleItem></tt:Source><tt:Data><tt:SimpleItem Name="State" Value="true"></tt:SimpleItem></tt:Data></tt:Message></wsnt:Message></wsnt:NotificationMessage></tet:PullMessagesResponse></env:Body></env:Envelope>
2024-08-06 15:28:49.871 [DEBUG] [amera.internal.onvif.OnvifConnection] - ONVIF Event Topic: VideoSource/MotionAlarm, Data: State, Value: true
2024-08-06 15:28:49.872 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request: PullMessages to http://xxx.xxx.xxx.xxx:80/Subscription?Idx=0
2024-08-06 15:28:50.432 [TRACE] [amera.internal.onvif.OnvifConnection] - ONVIF reply is: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tet="http://www.onvif.org/ver10/events/wsdl" xmlns:tnsvvtk="http://www.vivotek.com/2009/event/topics" xmlns:vev="http://www.vivotek.com/api/ws/event" xmlns:tnsvca="http://www.vivotek.com/vca/xml/topics" xmlns:ivs="http://www.vivotek.com/vca/xml/schema" xmlns:trc="http://www.onvif.org/ver10/recording/wsdl"><env:Header><wsa:Action>http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesResponse</wsa:Action></env:Header><env:Body><tet:PullMessagesResponse><tet:CurrentTime>2024-08-06T22:36:17.739Z</tet:CurrentTime><tet:TerminationTime>2024-08-06T22:36:25.292Z</tet:TerminationTime><wsnt:NotificationMessage><wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:VideoAnalytics/Motion</wsnt:Topic><wsnt:Message><tt:Message UtcTime="2024-08-06T22:36:15.206Z"><tt:Source><tt:SimpleItem Name="VideoSourceToken" Value="VideoSource1"></tt:SimpleItem><tt:SimpleItem Name="MotionWindowIndex" Value="0"></tt:SimpleItem></tt:Source><tt:Data><tt:SimpleItem Name="Level" Value="Normal"></tt:SimpleItem><tt:SimpleItem Name="Percentage" Value="18"></tt:SimpleItem></tt:Data></tt:Message></wsnt:Message></wsnt:NotificationMessage></tet:PullMessagesResponse></env:Body></env:Envelope>
2024-08-06 15:28:50.433 [DEBUG] [amera.internal.onvif.OnvifConnection] - ONVIF Event Topic: VideoAnalytics/Motion, Data: Level, Value: Normal
2024-08-06 15:28:50.433 [DEBUG] [amera.internal.onvif.OnvifConnection] - Please report this camera has an un-implemented ONVIF event. Topic: VideoAnalytics/Motion
2024-08-06 15:28:50.433 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request: PullMessages to http://xxx.xxx.xxx.xxx:80/Subscription?Idx=0
2024-08-06 15:28:50.976 [TRACE] [amera.internal.onvif.OnvifConnection] - ONVIF reply is: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tet="http://www.onvif.org/ver10/events/wsdl" xmlns:tnsvvtk="http://www.vivotek.com/2009/event/topics" xmlns:vev="http://www.vivotek.com/api/ws/event" xmlns:tnsvca="http://www.vivotek.com/vca/xml/topics" xmlns:ivs="http://www.vivotek.com/vca/xml/schema" xmlns:trc="http://www.onvif.org/ver10/recording/wsdl"><env:Header><wsa:Action>http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesResponse</wsa:Action></env:Header><env:Body><tet:PullMessagesResponse><tet:CurrentTime>2024-08-06T22:36:18.309Z</tet:CurrentTime><tet:TerminationTime>2024-08-06T22:36:25.824Z</tet:TerminationTime><wsnt:NotificationMessage><wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:VideoSource/MotionAlarm</wsnt:Topic><wsnt:Message><tt:Message UtcTime="2024-08-06T22:36:15.206Z" PropertyOperation="Changed"><tt:Source><tt:SimpleItem Name="Source" Value="VideoSource1"></tt:SimpleItem></tt:Source><tt:Data><tt:SimpleItem Name="State" Value="false"></tt:SimpleItem></tt:Data></tt:Message></wsnt:Message></wsnt:NotificationMessage></tet:PullMessagesResponse></env:Body></env:Envelope>
2024-08-06 15:28:50.976 [DEBUG] [amera.internal.onvif.OnvifConnection] - ONVIF Event Topic: VideoSource/MotionAlarm, Data: State, Value: false
2024-08-06 15:28:50.977 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request: PullMessages to http://xxx.xxx.xxx.xxx:80/Subscription?Idx=0
2024-07-22 10:56:07.935 [TRACE] [amera.internal.onvif.OnvifConnection] - ONVIF reply is: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tet="http://www.onvif.org/ver10/events/wsdl" xmlns:tnsvvtk="http://www.vivotek.com/2009/event/topics" xmlns:vev="http://www.vivotek.com/api/ws/event" xmlns:tnsvca="http://www.vivotek.com/vca/xml/topics" xmlns:ivs="http://www.vivotek.com/vca/xml/schema" xmlns:trc="http://www.onvif.org/ver10/recording/wsdl"><env:Header><wsa:Action>http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesResponse</wsa:Action></env:Header><env:Body><tet:PullMessagesResponse><tet:CurrentTime>2024-07-22T18:03:39.393Z</tet:CurrentTime><tet:TerminationTime>2024-07-22T18:03:48.885Z</tet:TerminationTime><wsnt:NotificationMessage><wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:VideoAnalytics/Motion</wsnt:Topic><wsnt:Message><tt:Message UtcTime="2024-07-22T18:03:37.900Z"><tt:Source><tt:SimpleItem Name="VideoSourceToken" Value="VideoSource1"></tt:SimpleItem><tt:SimpleItem Name="MotionWindowIndex" Value="0"></tt:SimpleItem></tt:Source><tt:Data><tt:SimpleItem Name="Level" Value="Normal"></tt:SimpleItem><tt:SimpleItem Name="Percentage" Value="0"></tt:SimpleItem></tt:Data></tt:Message></wsnt:Message></wsnt:NotificationMessage></tet:PullMessagesResponse></env:Body></env:Envelope>
2024-07-22 10:56:07.935 [DEBUG] [amera.internal.onvif.OnvifConnection] - ONVIF Event Topic: VideoAnalytics/Motion, Data: Level, Value: Normal
2024-07-22 10:56:07.935 [DEBUG] [amera.internal.onvif.OnvifConnection] - Please report this camera has an un-implemented ONVIF event. Topic: VideoAnalytics/Motion
matt1
(Skinah)
September 1, 2024, 1:17am
4
Thats all the information I need, just need some time to add this and create a build.
retract
(R. E. Tract)
September 1, 2024, 2:56pm
5
Sounds good!
Would it be possible to get a link to this commit when done for edification purposes? There are a number of features I intend to get working with this device; I suspect this won’t be the last ONVIF event to be implemented. Seems like a good excuse to learn more about the nuts and bolts of ONVIF at the protocol level.
matt1
(Skinah)
September 8, 2024, 9:08am
6
If you want to learn, then start reading this PDF.
That was already implemented, so your camera should already had/has working motion detection, just link up the channel for motion to an item.
See the PR for this here
openhab:main
← Skinah:ipcamera
opened 09:07AM - 08 Sep 24 UTC
Added a missing motion detection topic for VivoTek cameras as reported on the fo… rum by a user here:
https://community.openhab.org/t/unimplemented-onvif-event-videoanalytics-motion/157364
Signed-off-by: Matthew Skinner <matt@pcmus.com>
I wont be creating a build for this as your camera should already be working via the other topic for motion.
retract
(R. E. Tract)
September 8, 2024, 2:36pm
7
Apologies if the error was mine in setup; still new to OpenHAB.
Thanks for taking a look at this and providing a detailed write-up of the pieces involved. This should be more than enough for me to sort out why I still don’t get a detection event and whatever I have set up wrong to cause that.
Thanks again!