- Dec 24, 2016
- 410
- 320
I've got Dahua cameras; I enabled Acupick and IVS and am seeing ONVIF messages like this:
I've got two rules; one for cars and one for people. The rules I came up with are:
Contains: IsInside="true"
Node path: Source/SimpleItem
Attribute: Rule="Car"
Memo: Car
Contains: IsInside="true"
Node path: Source/SimpleItem
Attribute: Rule="Person"
Memo: Person
That does work, but it would be more precise to use an XPath query like: /tt:Message[tt:Source/tt:SimpleItem[@Rule="Car"] and tt
ata/tt:SimpleItem[@IsInside="true"]]
That xpath doesn't match in BlueIris (but does with "real" xpath matching). The docs are not very clear about the paths.
<?xml version="1.0" encoding="UTF-8"?><s:Envelope xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:sc="http://www.w3.org/2003/05/soap-encoding"> <s:Header> <wsa5:Action>http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesResponse</wsa5:Action> <wsa5:To>http://192.168.1.114/onvif/Subscription?Idx=0</wsa5:To> </s:Header> <s:Body> <tev:PullMessagesResponse> <tev:CurrentTime>2025-07-24T02:50:57Z</tev:CurrentTime> <tev:TerminationTime>2025-07-24T03:00:02Z</tev:TerminationTime> <wsnt:NotificationMessage> <wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:RuleEngine/FieldDetector/ObjectsInside</wsnt:Topic> <wsnt:Message> <tt:Message PropertyOperation="Changed" UtcTime="2025-07-24T02:50:57Z"> <tt:Source> <tt:SimpleItem VideoSourceConfigurationToken="00000"/> <tt:SimpleItem VideoAnalyticsConfigurationToken="00000"/> [COLOR=rgb(184, 49, 47)] [/COLOR][COLOR=rgb(65, 168, 95)]<tt:SimpleItem Rule="Car"/>[/COLOR] </tt:Source> <tt:Key> <tt:SimpleItem ObjectId="19"/> </tt:Key> <tt:Data> [COLOR=rgb(65, 168, 95)]<tt:SimpleItem IsInside="true"/>[/COLOR] </tt:Data> </tt:Message> </wsnt:Message> </wsnt:NotificationMessage> </tev:PullMessagesResponse> </s:Body></s:Envelope>I've got two rules; one for cars and one for people. The rules I came up with are:
Contains: IsInside="true"
Node path: Source/SimpleItem
Attribute: Rule="Car"
Memo: Car
Contains: IsInside="true"
Node path: Source/SimpleItem
Attribute: Rule="Person"
Memo: Person
That does work, but it would be more precise to use an XPath query like: /tt:Message[tt:Source/tt:SimpleItem[@Rule="Car"] and tt
That xpath doesn't match in BlueIris (but does with "real" xpath matching). The docs are not very clear about the paths.
