All Products
Search
Document Center

IoT Platform:FAQ about device status

Last Updated:Jan 24, 2024

This topic provides answers to frequently asked questions (FAQ) about device status in IoT Platform.

Does the offline status indicate that the device is powered off?

No. The device status changes to offline in the IoT Platform console when any of the following scenarios occurs: a device closes the connection with IoT Platform, a device is disabled in IoT Platform, a device is powered off, or a device experiences a network outage.

How do I receive messages about device status changes?

You can use the server-side subscription or data forwarding feature of the rules engine to configure forwarding rules for messages about device status changes.

For more information, see the section about communication by using the rules engine.

Are there possible delays in the delivery of messages about device status changes?

Yes. You can receive messages immediately after devices connect to or disconnect from IoT Platform. However, when a device disconnects from IoT Platform due to exceptions, such as a network outage or power failure, IoT Platform needs to determine the device status before it sends a status change message. In this case, you cannot receive the message immediately after the device is disconnected.

Why is the delivery of messages about device disconnection delayed?

When you connect a device to IoT Platform by using the Message Queuing Telemetry Transport (MQTT) protocol, you must specify a heartbeat interval for the MQTT connection. The interval can range from 30 seconds to 1,200 seconds. For more information, see the example of connecting MQTT-based devices to IoT Platform.

IoT Platform checks the heartbeats of the MQTT connection every 30 seconds. The wait time for the heartbeat check is the period between the point in time at which a device connects to IoT Platform and the point in time at which the next heartbeat check will be performed. The maximum timeout period is calculated by using the following formula: Heartbeat interval x 1.5 + Wait time for the heartbeat check. If the server receives no messages from the device within the maximum timeout period, the server closes the connection with the device, and the device status changes to offline.

Therefore, when a device is disconnected due to an exception, IoT Platform needs to determine the device status before it sends a status change message. You cannot receive the message immediately after the device is disconnected.

Why is the actual device status different from the status that is indicated by messages about device status changes?

The points in time at which you receive the device status change messages are different from the points in time at which the changes occur. You must determine the latest device status based on the sequence of timestamps in the messages about device status changes. For more information, see data formats of messages about device status changes.