Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.