Pipe-cache-params protocol

Integration level: params
Channel with this protocol will consume messages from other channels, store the last values of specified parameters and add them into new messages if missing.
flespi parses the Pipe-cache-params protocol messages into a JSON object with the fields listed below in the Parameters tab.

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.

Usually, 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 the channel configuration:

  1. list of the channel id's with source messages
  2. the token with ACL to the source channel messages
  3. the list of parameters you want to cache.

After that, the new 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 "Add cached value ignoring timestamp" switch, then cached values will be added to all new coming messages disregarding timestamp. NOTE! Messages with older timestamp 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.

ID of channel that received a message
Any custom parameter
ID of device that received a message
Name of device that received a message
ID of device type of device that received a message
Device unique identifier like serial number, IMEI, etc
ID of protocol
Timestamp when server received a message
Message timestamp