[RELEASE] Sleep Number Controller - control your Sleep Number bed and use it for presence

Only the bed device has that method as the head and foot are generic (built in) devices (though looking at the code I think it may call on all). But I’m surprised that method generates any load at all, it’s just dispatching an event indicating whether or not the device is connected and it does so once per poll.

I don’t see this on mine, is there a chance you poll very often (what’s your refresh rate)?

In any case, I think I can likely make this a bit more efficient and will try to look sometime soon.

@mluck - I updated the setConnectionState method to only dispatch an event if there's a change. I don't know if that will resolve it for you or not but it's about the only tweak I can think of. I did confirm the app is only calling that on the bed devices (the custom ones) so it should be calling it once per side only and only during refreshes. So unless your beds are going online and offline with each refresh poll, I can't see how this is exerting any real load... in any case, try the new version and let me know how it goes.

humph, I don't know if it was your magic, or regression to the mean, but the errors stopped. Thank you. I think? lol

Will monitor and let you know if the gremlins return. Thank you so much for the help!

1 Like

I hope I am posting this in the right place. If not, please direct me. I’m an occasional user of HE, meaning that I get something working then I don’t pay much attention to it unless it quits working.

So. I am trying to get this Sleep Number Controller working and am getting an error when I go to select bed. Also, the app is not listed in my list of apps although it is listed under Hubitat Package Manager and I’m not sure how to get back to it.

While I was initially trying to set up the app, I was able to generate a debug log:

My bed is a split king P6 on an adjustable base.


I had an issue almost the same as yours and I uninstall and reinstall the app thru the Hubitat Package Manager and it works well now.

Thank you. I had tried that before, but just tried again. I still don’t see it on my apps list and I get the same errors:

I appreciate the suggestion.

I PMed you to get more info.

Hi! Just trying to get this integration off the ground and am having some trouble. When configuring the app for the first time after a successful package manager install, it’ll show online until I try to send a command and then goes into an “API Error” state.

Logs are showing “400 Bad Request”…

Error making request {uri=https://prod-api.sleepiq.sleepnumber.com, path=/rest/bed/-9223372018060107576/sleepNumberFavorite, requestContentType=application/json, contentType=application/json, headers={Host=prod-api.sleepiq.sleepnumber.com, User-Agent=SleepIQ/1669639706 CFNetwork/1399 Darwin/22.1.0, Cookie=AWSALB=3x0i7Kqwy5o9NCxDI63wBzSzmmKCCyT0dViQCaXmU+pTYCK2z9AiZaUyhLmCvglAvW0Z4xnIbNc2nDuXv8DexeyaV3cGT2G37l76ouZDPcEzxqWfNiHcrv1IG9qP;AWSALBCORS=3x0i7Kqwy5o9NCxDI63wBzSzmmKCCyT0dViQCaXmU+pTYCK2z9AiZaUyhLmCvglAvW0Z4xnIbNc2nDuXv8DexeyaV3cGT2G37l76ouZDPcEzxqWfNiHcrv1IG9qP;JSESSIONID=5882F195C0F50DBBF0A3D359E34FC84E;, DNT=1, Accept-Version=4.4.1, X-App-Version=4.4.1}, query={_k=mow8cWO9nheKg}}
groovyx.net.http.HttpResponseException: status code: 400, reason phrase: Bad Request

Ideas? Happens consistently with any command. I can read state from the bed, but won’t respond to commands at all. Thanks!

@jeff_laughter can you share what model of bed you have as well as a screenshot of the top half of the diagnostics page in the app?

Gladly. I have a P6 mattress, split top king with a flexfit 2 base. Attaching screenshot!

Let me know if you need a volunteer to troubleshoot/test the climate360 bed. I’m looking forward to that update!

1 Like

Since SN updated app I cannot change sleep number on Hubitat app. Any suggestions?

I’ve been traveling so haven’t had a chance to try this since the update. Maybe others can comment if it still works or not? I won’t be back until mid-December and can test a bit with my bed then.

I wonder if the update switched old beds to the new API somehow? If so I’ll try to step up my efforts to modify the code to handle both… I’ve got a few calls updated but it’s been going slowly.

Update: at least on my bed remotely, the API is still the old one and the app works.

@shircliffs - are you able to update logging level to debug and provide output from when you try to set the number?

I'll try that. Thanks for all your hard work!

Any idea if or when the support for the Climate 360 will be added? The presence is working currently, but nothing else.

1 Like

I started working on this a few months ago but progress has been slow (between work and kids). I’ll see if I can scrape up some time to look more.


Much appreciated! I've got some developer skills (php, mysql, js, html, etc...), but I've never done anything for hubitat and really wouldn't know where to start on my own. But if there's anything I can do to help out just let me know.

I just order a Climate360 so I'm happy to see this possibility on the horizon. Happy to help test when it's ready.

1 Like