Why is an error of deviceBean = null reported during network pairing of a gateway sub-device?
Last Updated on:2025-02-27 07:28:38
To troubleshoot the error, perform the following steps:
Obtain the deviceBean of the gateway. deviceBean=TuyaHomeSdk.getDataInstance().getDeviceBean(deviceId);
Read the status (online/offline) of the deviceBean. deviceBean. getIsOnline = true/false
You can pair the gateway sub-device only when the gateway is online, that is, deviceBean. getIsOnline = true. Otherwise, an error of deviceBean = null will occur.