Devices
Device Status
How Sensorclouds decides whether a device is online or offline
Every device shows a connection status:
| Status | Indicator | Meaning |
|---|---|---|
| ONLINE | Green, pulsing | The device is connected or has reported recently |
| OFFLINE | Red | The device disconnected or has been silent too long |
| UNKNOWN | Grey | No status yet, typically a device that has never connected |
How status is detected
Sensorclouds combines two signals.
1. Status messages (Last Will)
The device tells the platform when it connects, and the broker tells the platform when it drops:
- On connect, the device publishes
{"status": "online"}to its/statustopic. - When connecting, the device registers a Last Will message
{"status": "offline"}on the same topic. - If the connection drops unexpectedly, the broker publishes the Last Will automatically, and the device goes OFFLINE within moments.
See Connecting Your Device for the settings.
2. Message activity
Every telemetry message the device sends counts as a sign of life. If no message arrives for 1.5 × the profile's keep-alive (90 seconds with the default keep-alive of 60 seconds), the device is marked OFFLINE. It goes back to ONLINE with its next message.
If your device reports less often than that, for example once every 5 minutes, it will flip to OFFLINE between messages. Raise the profile's keep-alive to more than your reporting interval. See MQTT Settings.
| Device reports every… | Set keep-alive to at least… |
|---|---|
| 10–30 seconds | 60 seconds (default) |
| 1 minute | 60–90 seconds |
| 5 minutes | 300 seconds |
Where status appears
- Device lists, as colored dots
- The workspace home page, with online/offline counts
- Application overviews
- Indicator widgets in Staleness mode
- Notifications and integrations (Device online / Device offline events)
Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
| Flips between ONLINE and OFFLINE | It reports less often than 1.5 × keep-alive | Raise the profile's keep-alive |
| Shows ONLINE after being unplugged for a while | No Last Will configured, so it goes offline only when the activity window expires | Configure the Last Will |
| Stays UNKNOWN | It has never connected successfully | See Connection Troubleshooting |