openremote / fleet-management

The Fleet Management/Telematics implementation on top of the OpenRemote open-source IoT device management platform.
https://openremote.io/fleet-telematics/
Other
12 stars 3 forks source link

Custom asset type creation support #21

Closed pankalog closed 7 months ago

pankalog commented 7 months ago

This PR introduces the ability to create a custom asset type for the fleet management implementation. Specifically, by extending on the VehicleAsset, users can specify their own, custom AttributeDescriptors, for usage in both the normal OpenRemote UI for categorization, etc. But also allow the Teltonika Telematics integration to force the usage of the predefined AttributeDescriptor for creating an attribute. Specifically, If the name of the AttributeDescriptor is any of the AVL parameter IDs, it will use that attribute descriptor to create that attribute, overriding the dynamic attribute descriptor creation. This is already being used in CarAsset, where some parameters (Ignition Source, Movement Source) are being parsed as boolean values.

To select a custom asset type to be used for the integration, modify the class reference in the TeltonikaMQTTHandler:

TELTONIKA_DEVICE_ASSET_CLASS.

Everything else automatically uses that reference to adjust everything.