ONVIF dynamic event not recognized

We are developing an ANPR camera that supports ONVIF events and we currently are in the partner program to get our camera certified by Milestone. Before we can finalize our firmware, there is an issue that we need to solve first.

Our camera can generate LicensePlate recognition events. The event properties are exposed in GetEventPropertiesResponse (the contents of the response is attached to this ticket) and also detected by Milestone.

In Milestone we added a rule to create a log entry in case this event occurs. We are aware that Milestone does not (yet) support handling LicensePlate recognition events, but for this initial test we are only interested in the event being detected.

The ONVIF log however shows that the event is not recognized:

0000145 2024-02-01T16:04:15.800738+01:00 WARNING 0x000018a4@0x00002d7c NmONVIFDevice::CmOnvifEventPolling::MatchDynamicEvent()@ONVIFEvent.cpp:1247	Unrecognized dynamic event received and will not be processed: [<NotificationMessage><Topic>tns1:RuleEngine/Recognition/LicensePlate</Topic><Message PropertyOperation="Changed" UtcTime="2024-02-01T15:04:15Z" tns1="http://www.onvif.org/ver10/topics" tt="http://www.onvif.org/ver10/schema" wsa5="http://www.w3.org/2005/08/addressing" wsnt="http://docs.oasis-open.org/wsn/b-2"><Source><SimpleItem Name="VideoSource" Value="VideoSourceToken_1"/>
<SimpleItem Name="Rule" Value="LicensePlateRecogitionRule"/>
</Source><Data><SimpleItem Name="Likelihood" Value="0.96"/>

To rule out a possibly malformed detailed message, in this example we stripped the contents of the field to only send the Likelihood.

Is it possible the enable more advanced logging to find the reason why the event is unrecognized? Or could we get some assistance in finding the cause?

Any help would be appreciated.

For reference, I’ve attached the full wireshark logging of the onvif messages.

Michael

Hi Michael,

I think in this case the reason for not matching the event from PullMessagesRespose is that the event is missing attributes declared in GetEventPropertiesResponse like AnaliticsConfiguration in the Source tag and most of the elements in Data tag. You can harcode some values there is you don’t have it now but the structure of the declared event should be the same to match.

For extended logging you can increase log level. To do it add this:

[Logging]

level=5

sink=3

at the beginning of Devices.ini file located here

[C:\ProgramData\VideoDeviceDrivers\C_\Program](file:C:/ProgramData/VideoDeviceDrivers/C_/Program) Files (x86)\Milestone\XProtect Recording Server\Drivers\NativeDrivers

Save it and restart Recording Server.

Hi Kalin,

Thank you for your reply. Regarding the missing attributes: I synchronized the attributes in GetEventPropertiesResponse and the LicensePlate NotificationMessage in the following way:

  • AnalyticsConfiguration has been added to the NotificationMessage.
  • Label, LicensePlateInfo and VehicleInfo have been added to the NotificationMessage, all containing dummy data.
  • Optional BoundingBox field and all *Image* fields have been removed from both messages. According to the Analytics Service Specification these event fields are not mandatory. In the final solution we do need those fields, but for this test these are not required.

Unfortunately, Milestone reports the same ‘Unrecognized dynamic event’ warning.

I’ve added the suggested lines to the Devices.ini file. This indeed makes logging more verbose, however no hints are shown why the message is rejected.

I’ve attached the full messages from the wireshark logging in GetEventProperties_2.xml and PullMessagesResponse_2.xml.

Any more ideas what could go wrong?

Thanks in advance.

Best regards,

Michael

For some reason uploading two attachments to the same message did not work, therefore the GetEventProperties_2.xml file is posted in this message.