The 'msg-erase' plugin is used to delete specific parameters from the messages of the designated devices. Plugin is applied to device messages during their registration phase and once applied the message will be cleared of parameters configured by the plugin in all other stages - MQTT events, streams, storage, telemetry, analytics, etc.
Note: Certain system parameters cannot be deleted from the message as they are essential for the proper functioning of the flespi platform. You can find the complete list of system parameters here.
How to use
To create a new plugin, navigate to the Telematics Hub > Plugins section and click on the '+' button. Name the plugin and select 'msg-erase' as the 'Type id'.
For example, let's configure the plugin to remove the 'can.fuel.level' parameter if the engine is off and the CAN bus is inactive, causing the device to mistakenly report a fuel level of zero.
Fill in the 'Parameters' field with 'can.fuel.level' and the 'Validate message' field with the following expression: 'engine.ignition.status=false && can.fuel.level=0'.
Now, you need to assign this plugin to a device. Navigate to the Devices tab, click on the green '+' icon, and select the required device from the list.
As the device sends new messages, they will be processed by the plugin. You can check the result in the plugin's Logs tab. If the processing is done correctly, the messages following the plugin's 'validate message' rule will have the required parameter cleared off. To verify, go to Telematics Hub > Devices > 'Your device' > Logs & Messages, and left-click on a message to see the details.
Done!
Change log
Subscribe to the erase plugin change log to stay in sync with any updates.
More plugin types
Find a comprehensive list of available plugins types here.