Device Health API Not Showing Correct Status


Currently I’m testing Device Health API and when I’m turning of my Smart Bulb via Manual Switch, it still showed up as ONLINE. Only when I tried to Turn On the device via App, it will Turn Offline. How do SmartThings decide whether a Device Online / Offline? Is there a way to get a Reliable Status?

“deviceId”: “DEVICE_ID”,
“state”: “ONLINE”,
“lastUpdatedDate”: “2022-11-08T09:40:28.595Z”

Thanks in advance.

Hi, @gpdipalmerahtimur!
How much time did it pass between you turning off the device and checking the health endpoint?

1 Like

This post was flagged by the community and is temporarily hidden.

Hi @nayelyz ,

It is around 2 hours, when I’m checking the Health Check configuration, it should update every 60 seconds:

“healthCheck”: {
“checkInterval”: {
“value”: 60,
“unit”: “s”,
“data”: {
“deviceScheme”: “UNTRACKED”,
“protocol”: “cloud”
“timestamp”: “2022-10-26T19:57:24.113Z”

I’m checking just now it is already OFFLINE:

“deviceId”: “a66640ce-abde-4b80-98d3-453c0664381a”,
“state”: “OFFLINE”,
“lastUpdatedDate”: “2022-11-08T19:57:17.149Z”

I think it is better if Health Check API really test to a device if it can communicate. This way we can correctly verify if a device offline or not.

Thanks in advance.

Best Regards,

Hi @nayelyz ,

It is happening again tonight, I’m calling device health API, but the API assuming all of my lights are Online even though they have been turned off for More Than 10 Minutes. It can be Offline only after I press the Power Button on the App.

Please be kindly advise.

Thanks in advance.

Best Regards,

Device health has never been well communicated to the users. It has rather been left to us to figure it out.

Your lights are using the Health Check capability which isn’t used by Edge drivers, suggesting either a DTH or a schema integration. The parameters suggest that it is a cloud connection and indicate that it is untracked. That suggests to me that it is down to the remote cloud to tell SmartThings when the device is online or offline and it sounds like it isn’t being proactive about it.

Hi @orangebucket ,

Is there a way for us to validate correctly if a device is Offline?

I don’t have any suggestions. It has never been of that great import to me. It only seems to be the mobile apps that turn it into a big deal by disabling functionality when devices are flagged as Offline instead of just noting that there could be a problem and trying anyway.

Almost all my Offline devices are actually working fine and will correct as soon as they have some activity, it is just that ST hasn’t been able to verify that.

Sorry for the delay, @gpdipalmerahtimur
Do you know what is controlling your device, a DTH or a Schema Connector?
This can be identified in the API (device list) and in the IDE. In the last one, if you see a device type different than “placeholder” it means it is using a DTH. Also, it would be useful to know if it uses a custom DTH or a stock one, if it’s the first, you’ll need to check which driver can replace it (due to the Groovy sunset) and see if the health check improves.

Also, the “untracked” value is key as @orangebucket mentioned. In Groovy DTHs we generally sent a command to “enroll” in the health check.