I have been maintaining the SleepNumber Integration and recently found my devices offline and disconnected. I have gone through the reauthentication process
and engaged in the in-app diagnostics which has shown results indicating either that I am not connected to Wifi (which my phone is) or that SmarThings isn’t connected with linked services:
There are no errors or failures in my server logs. stateRefreshRequest shows as successfully responding and no failed interactionResponse messages. Clicking Check Connection starts the cycling for “Checking device connection” again, but results in the “Couldn’t connect to Wi-Fi network error”, which doesn’t make sense.
Select the time period and confirm - In this step, please select “Until turned off”, once the team finishes, we’ll let you know so you can disable it again.
Hi Itati, Yes it happened to me as well; but it seems to be back online now however there are refresh issues. Meaning it is not auto-refreshing automatically and I need to manually resync the Linked account many times so that it refreshes the current device settings to show the accurate results. Maybe the issue is still being worked on. But I wanted to share my experience and results. Thank you for all your assistance in this matter.
We reviewed your case with our engineering team, and they confirmed that the issue is related to a failed refresh token request to your OAuth server, which caused the service to be marked as disconnected. Once that happens, SmartThings can no longer access your Schema devices, which is why they appear offline.
You should have received a push notification informing you that the account was disconnected, along with a deep link to re-authenticate via Linked Services.
Just a note: since this is a cloud-to-cloud (C2C) integration, the issue cannot be resolved through the device diagnostic menu, the correct path is through Linked Services in the app.
To fix this, please:
Open the SmartThings app
Go to Menu → Linked Services
Look for SleepNumber, and if it’s disconnected, remove and re-link the account
@Itati I had already gone through the re-authentication process. The service shows as linked and my two devices appear. I click Refresh and the Refresh icon disappears and everything else remains the same. Do I have to unlink and relink fully? I’m hoping that’s not necessary since the devices will disappear from my account and all associated automations will require repairing as a result.
Thanks again for the update. Just to clarify how SmartThings determines whether a device is online or offline in cloud-connected (ST Schema) integrations:
SmartThings relies entirely on the partner’s cloud to report the device status. After an account is reauthenticated, SmartThings does not automatically assume the devices are online, it must receive that information explicitly.
To update the device health status, the partner must:
Include the "st.healthCheck" capability in the stateRefreshResponse.
Report the full current state of the device, including whether it’s online.
Ideally, also include this information in commandResponse and stateCallback.
Ah. I see. Some of that must be newly added to the docs. It would also be good if the examples on the page all used that capability to help further demonstrate.
I’ll add that to my service responses. Thanks @Itati .
Just following up, our engineering team mentioned that the issue you’re seeing seems to be due to stateCallback not working.
That means the partner is either not using stateCallback, or there are issues managing the callback tokens.
The recommendation is that you contact the partner so they can check why the devices aren’t being updated without needing a manual refresh from SmartThings.
@Itati I’m not sure what you mean about not using the stateCallback. I have that implemented, and it has worked fined in the past. Again, no errors server side. I make these requests if the device has changed on my end. Are you saying that I need to send this in order for SmartThings to no longer view my device as offline?
I’ve added the st.healthcheck capability in the states response with a value of online and I’m still getting deviceError":[{"errorEnum":"BAD-RESPONSE","detail":"nodeFetch error for SleepNumber Bed Integration"}]. I’m not sure what’s going on here.
Here is a request ID 1956f54f-f2d5-4bf2-805b-08f93e933f1e