The Tuya gateway periodically reads the Router devices in the network, and if it fails to receive a response after several attempts, it considers the device to be offline. When the gateway reads data from the device, or receives ZCL layer data reported by the device, the gateway will consider the device to be online.
Low-power devices will periodically report Power Configuration: Report Attributes as a heartbeat packet.
When devices in the network occasionally go offline or appear online, troubleshooting can be done from the following aspects:
Due to packet loss in the relay or other issues, the gateway fails to read the device, and can only rely on the device's report to refresh the online status. Packet capturing can be used to confirm whether the gateway's Read Attribute link can normally receive the Read Attribute Response.
If the device does not Report, it can only rely on the gateway's reading to refresh the online status. The Tuya gateway reads the attributes under Basic when the device joins the network to identify the device type. The joining device will confirm the network it joined is the Tuya gateway through this behavior, and will actively report data only under the Tuya gateway. If there is no Report data, please re-network the device.
Check whether the gateway and sub-device antennas are functioning properly. Incompatibility of the gateway antenna or disconnection of the sub-device antenna can lead to abnormal send and receive functions.
Confirm whether there is 2.4 GHz network interference or radio frequency interference near the sub-device and gateway. In an interference environment, data transmission may be intermittent, and the App will display the device as sometimes offline, sometimes online.