Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type Mismatch Between Axis ONVIF XML Descriptions and Internal KVS Data #329

Open
Cacsjep opened this issue Jan 24, 2025 · 0 comments
Open

Comments

@Cacsjep
Copy link

Cacsjep commented Jan 24, 2025

In my goxis library (see: goxis repository), I encountered an issue where the ONVIF XML event definitions provided by Axis devices via get_event_list.py do not match the actual data types stored in the axevent kvs.

When retrieving values from the KVS using the expected types defined in the XML (e.g., tt:ReferenceToken), the system raises errors indicating a type mismatch. For example, fields expected to be string according to the xml ONVIF specification are stored as int in the KVS, causing unmarshalling errors.

2025-01-24T18:04:49.476+01:00 axis-b8a44f914a20 [ ERR     ] axeventmsubscribe[1758924]: Error unmarshalling DeviceTriggerDigitalInputEventKvs: error getting string for key InputToken: The value found is not of the expected type., AxEventError: AXEventErrorIncompatibleValue, Value Type: 0
2025-01-24T18:04:49.521+01:00 axis-b8a44f914a20 [ ERR     ] axeventmsubscribe[1758924]: Error unmarshalling DeviceHardwareFailurePowerSupplyFailurePTZPowerFailureEventKvs: error getting string for key Token: The value found is not of the expected type., AxEventError: AXEventErrorIncompatibleValue, Value Type: 0
2025-01-24T18:04:49.299+01:00 axis-b8a44f914a20 [ ERR     ] axeventmsubscribe[1758924]: Error unmarshalling DeviceTriggerRelayEventKvs: error getting string for key RelayToken: The value found is not of the expected type., AxEventError: AXEventErrorIncompatibleValue, Value Type: 0
2025-01-24T18:04:49.158+01:00 axis-b8a44f914a20 [ ERR     ] axeventmsubscribe[1758924]: Error unmarshalling VideoSourceMotionAlarmEventKvs: error getting string for key Source: The value found is not of the expected type., AxEventError: AXEventErrorIncompatibleValue, Value Type: 0
2025-01-24T18:04:49.189+01:00 axis-b8a44f914a20 [ ERR     ] axeventmsubscribe[1758924]: Error unmarshalling VideoSourceGlobalSceneChangeEventKvs: error getting string for key Source: The value found is not of the expected type., AxEventError: AXEventErrorIncompatibleValue, Value Type: 0

For example, the Source field in the MotionAlarm is defined as a tt:ReferenceToken, which should be a string:

<MotionAlarm wstop:topic="true">
	<tt:MessageDescription IsProperty="true">
		<tt:Source>
			<tt:SimpleItemDescription Name="Source" Type="tt:ReferenceToken"></tt:SimpleItemDescription>
		</tt:Source>
		<tt:Data>
			<tt:SimpleItemDescription Name="State" Type="xsd:boolean"></tt:SimpleItemDescription>
		</tt:Data>
	</tt:MessageDescription>
</MotionAlarm>

However, querying this field from the KVS reveals that the stored type is int rather than the expected string. This results in the following error:

Error unmarshalling VideoSourceMotionAlarmEventKvs: error getting string for key Source: The value found is not of the expected type., AxEventError: AXEventErrorIncompatibleValue, Value Type: 0

AXIS M3215-LVE 12.0.91, embeddedSdkVersion: 3.5, manifest v 1.7.0

After switching the types to int, the errors are no longer present, confirming that the values are indeed stored as integers in all cases. While the XML definitions specify the type as string, the actual data retrieved from the KVS is of type int.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant