How to fill missing message parameters with telemetry values?

Using plugins to add cached telemetry values in place of missing device message parameters.

The "item-telemetry" plugin type is used to add missing message parameters during its registration by taking their latest values from cached device telemetry. This can be effectively used to fill gaps with certain parameters not reported by the device in, for example to restore position.latitude and position.longitude from previous latest message and always has last known position data in all messages.

Note. Plugin restores parameter values from actual device telemetry. Even when message that is currently being registered is from the past - for example when it comes from black-box storage. To prevent incorrect data injections from the future into past messages we suggest to specify "previous("timestamp") != null" in the validate_message configuration option of plugin. This will ignore plugin activation for any message from the past. Also for some devices you may correctly configure in their settings the order of messages to send earliest messages first.

If item-telemetry plugin behavior does not suit your needs take a look at msg-pvm-code plugin which provides you the access to raw device telemetry and actual per-parameter timestamp.

How to use

Click on the "+" button in the Telematics Hub -> Plugins section to create a new plugin:

flespi panel telematics hub plugins

Let's define a new plugin that will add certain CAN parameters that are missing from the message:

add plugin of item telemetry type

Then we need to assign this plugin to the right devices. Go to the Plugins tab for the required device and click the "+" button:

assign plugin to flespi device

And then you should be able to see the new calculated field in the new device messages. Go to the Logs & Messages tab for the given device to check:

missing parameter in device messages

Done.

Change log

Subscribe to the telemetry plugin change log to stay in sync with any updates.

More plugin types

Find a comprehensive list of available plugins types here.


See also
Explore the pros and cons of various reverse geocoding services supported by flespi.
Getting plain parameters’ values from array-structured ‘ble.beacons’ parameters