Protocol by Gurtam that receives messages from other flespi channels, caches the specified message parameters and adds them to all the subsequent messages if missing. Please read a special article about protocol usage in our blog.
The protocol helps when your tracking devices send some messages with the position data but some without. To solve this issue you may create a pipe-cache-params channel and add "position.latitude" and "position.longitude" to the list of parameters to cache in its configuration. The channel may cache any parameter, not only position but, for example, any sensor value.
To make it work you have to fill out the channel configuration:
After that, the pipe-cache-params channel will subscribe to the messages from the source channels. It will copy each new message from the source channels and add the missing parameters you have listed using the last value from the cache.
If you also set the "Generate messages only when ALL listed parameters are cached" option, newly received messages will be discarded until ALL listed parameters are cached again.
If you enable the "Add cached value ignoring timestamp" switch, the cached values will be added to all new coming messages disregarding timestamp. NOTE! Messages with older timestamps may have cached parameter values from future messages which may lead to data corruption on the receiving side!
IMPORTANT! The cache is cleared and all listed parameters in it are lost either when it expires (see "Cache expiry interval" parameter below), or our servers are rebooted, or the channel is stopped.
You may control how long the channel will preserve the cache for the listed parameters using the "Cache expiry interval" parameter.