Automatically translate this page?

How To Get The Last State Of A Registered Device?

Getting device telemetry via REST API and in the flespi panel.

In some tasks, you don’t need to continuously receive messages from your device. But just get its state and last value of all parameters to answer the questions like:

  1. What was the last position of my device?

  2. When was the device online last time?

  3. What was the last value of the given sensor and when was it updated?

Telemetry is a structure that analyses each new message received by the registered device and stores the last value of each parameter and time when it was received. Following is the principle of device telemetry operation.

device telemetry scheme in flespi device

You can get telemetry via the appropriate REST API call. Telemetry will be returned as an object where the key is a parameter name, value is an object with fields value, and ts is a timestamp when the value was updated, e.g. 

     "telemetry": {
        "channel_id": {
          "ts": 1540982367,
          "value": 3300
        },
        "chat_id": {
          "ts": 1540982367,
          "value": 168488620
        },...etc

Telemetry can be viewed in TrackIt:

trackit telemetry

or the Telemetry device tab:

telemetry device tab

With telemetry feature, you don’t need to recall the latest messages to get device’s last state.

Also, check telemetry article on our blog.


See also
Helping you quickly go through the real-life issues.
Figuring out at what step in the connectivity chain the problem is and how to fix it.