How to detect connection problems or check device state validity with calculators?

Using flespi analytics to detect GSM connectivity loss, GPS visibility loss, or other state change.

Add the "inactive" interval selector and specify the desired value of the inactivity threshold to instruct the flespi analytics engine to catch "gaps" in messages (caused by loss of GPRS connection or GPS visibility) that exceed the specified value:

inactive selector flespi calculator

Use the "activated" event (flespi/interval/gw/calcs/+/devices/+/activated topic) to catch the occurrence of the inactivity event.

Also, you can subscribe to the "flespi/state/gw/calcs/+/devices/+/last" topic and analyze the state of the counter of the "active" type — this way you will always have a message with the last valid device state. To catch invalid or unwanted state controlling for "active=false" value.

If you need to get access to historical data about all situations when devices fail to go online within the expected interval via the analytics API


Explore more capabilities of the flespi analytics engine filtering the KB by the “analytics” tag.

See also
Configuring custom parsing for NMEA-formatted GPS data to convert it into JSON message with standardized parameters.
Extracting specific bits of a HEX string and converting into integer.