SleepNumber SleepIQ Integration?

I am also wondering how to implement this. I have created the handler in the IDE but what is the next step?

  1. Login here: https://graph.api.smartthings.com/
  2. Be sure to log into ā€œSmartThingsā€ using you app login information
  3. Once Logged in be sure to choose ā€œMy Locationsā€ and choose the location you want to install this app
  4. Now you can start to follow the instructions found here: SleepIQ Presence Sensors
  5. When installing the device type choose ā€œMy Device Handlersā€ then the green button ā€œ+ Create New Device Handlerā€
  6. Choose ā€œFrom Codeā€ and paste the code from the instructions and ā€œCreateā€
  7. Do a similar action to install the code for the smart app. Just go to ā€œMySmartAppsā€ then the green button ā€œ+ New SmartAppā€ Choose ā€œFrom Codeā€ and paste the code from the instructions and ā€œCreateā€.
  8. Now you are done with the website and need to go to your phone or tablet to make everything usable and enter your SleepIQ login information.
  9. In the App go to your ā€œAutomationā€ tab
  10. Go all the way to the bottom and chose ā€œAdd a SmartAppā€
  11. Go all the way to the bottom and chose ā€œMy Appā€
  12. Choose your ā€œSleepIQ Managerā€ App you created on the website
  13. Enter your SleepIQ user name, password, change your refresh interval a few minutes
  14. Then you need to create your devices so they will show in your ā€œMy Homeā€ tab and then you will have the choice to use it as a presence sensor. You can do both sides, individual sides or either. I would recommend doing all 4 combos to have maximum control.
  15. Choose one and Choose a descriptive name like SleepIQ - Both or SleepIQ - John, SleepIQ - Jane, SleepIQ - Either
  16. Then choose ā€œCreate Deviceā€, and ā€œDoneā€
  17. Then ā€œDoneā€ all the way out and visit your ā€œMy Homeā€ tab you should now see a sensor by the name you chose and should say ā€œNOT PRESENTā€. Just test it and you are good to go! You can now use the sensors in Routines etc.
  18. If you go into the setting you can add a picture. I used the sleep number logo!
2 Likes

Thanks Justin, I got it to work. Not sure what I was doing wrong, but following your instructions worked!

Natecj,
Are you still working on an update to sleepIQ control? I would love to see control of the bed firmness and also the nightlight feature. Thanks for all you have done so far!

I would as well. This would be awesome. I’m a great networking engineer but software engineer not so much haha.

1 Like

Got my bed today…set this up today…

Awesome thanks!!!

Hi @Natecj,

I wanted to loop back on this as I would still love to see this feature and I know there were a number of others on here that would as well.

I’m not a programmer at all, but I can certainly work with you to help get this working. I can try to somehow sniff the traffic between my phone and servers to find the calls to their server or between the wifi and iq module to see what commands are being sent to inflate/deflate the bed. I don’t know what’s involved with this, but If you could point me to the right software or app to get the information I can get it installed and report whatever data you need. I have quite a bit of extra time around the holidays, so please let me know if there is anything I can do to help you with this.

2 Likes

@txpower501 - I’ve got a working prototype of an Alexa skill that allows you to -

  1. Check if someone is in a side of the bed
  2. Check the sleep number of the side of the bed
  3. Change the sleep number of the side of the bed.

I don’t have an adjustable base, so didn’t put those functions in, but I think I understand how and could with someone to test.

If anyone is interested, let me know!

Tnx, Tuc

1 Like

Absolutely interested. How can I try it? I also have an adjustable base and would be happy to help test.

1 Like

Hi,

Ok, so heres the deal… I’m still prettying it up and working on it, probably have a few more days before it’d be ready for a rough intro into the world… But thats where I’m having problems.

I could post up a github. The code is regular plain PHP, nothing fancy (Ok, 1 fancy thing but I include the library so its not an issue) and the Alexa skill file(s). Thats a bit more of a hassle to get working, they don’t have a good import via the GUI. You’d have to start up a web server with an SSL certificate, drop the code in, create an AWS developer account, load in the skill and change the web server name. Thats a bit of a hassle. But for anyone that wants to do that, it’d be available. Its written for multi user but if you keep it in development mode that won’t interfere with anyone else. I could possibly create some automatic method of creating this, but, its probably the last thing on my list.

So for anyone that hasn’t a clue what any of thats about, there is option 2… I would get this skill mostly through the process of being an actual skill in the store, but then add people’s Amazon account as ā€œBeta Testersā€. The service knows who you are by your Echo’s subscribed account. But, there is a hitch that might really sour people. This is NOT an authorized app, and the way we interface with it is via Googling my brains out for examples from different people of how they did this for different implementations, tasks, etc (The biggest being https://github.com/natecj/sleepiq-php and https://github.com/technicalpickles/sleepyq .) Because its sorta ā€œunauthorizedā€ there is no good secure way for you to authorize from SleepNumber to the skill so that I don’t know any semblance of a userid/password. As such, one of the steps to set it up would require your userid/password (Yea, I hear the groans) There is just no way around it. There is no way for me not to have your userid/password. I can’t even figure out a way you could add a 3rd id to your account that if you ever wanted to stop our access, you would just delete that account. You could give a current account, and just change the password. Now, of course this means I TECHNICALLY have access, and yes, I could ask if someone was in bed, change the setting in the middle of the night, etc and so forth and so on. And I know ā€œBut I wouldn’tā€ isn’t really much of an assurance. Its just something that you will need to decide for yourself.

Finally, I actually work on the project all the way to it becoming a skill which you could freely load from the Skill store… but… alas… the same user/password exposure to me issue still exists.

If anyone knows an ā€œOAUTHā€ way to have the account linked to the skill, I’m very much interested. Until then, unless anyone has a suggestion… Exposing the userid/password is going to have to happen if you don’t want to implement the skill and webserver yourself.

So if anyone is a PHP dev and risk taker, I’d probably have the first version I’d be ready to let out in the wild early next week. Probably another week to rough in the base controls for anyone thats interested in testing those. (More pieces I’ve added, less time it takes as I understand the oddities of their code).

I’m also going to wander over to the /AmazonEchoDev group and see if they have suggestions…

Hope this explains it all.

Tuc

Hey Tuc,

I was checking to see if you had any more updates on the sleepiq and the alexa skill. Thanks

Hi,

So I’ve been using it for a few weeks now, seems pretty good. I still don’t have the code as pretty as I’d like it, but I’ll probably never be happy.

I’m still trying to find a way to make it more ā€œfriendlyā€ to having other people use it that aren’t technical. I have a developer I’ve commissioned to write a set of documentation and some software to handle the login part of it elsewhere, making sure I don’t have access to your credentials.

If you’re tech enough to want to put up your own webserver with SSL cert and all that, I probably could get a copy of it to you initially. Maybe I’ll start down the path of getting it onto the store for those that realize you can just change your password and I’d no longer have access. :slight_smile:

Tuc

1 Like

Not really tech savvy with coding but if i had instructions i could probably get it to work. I think the best way for me would be to wait till its more user friendly :slight_smile:
thanks for the reply back.

I would love any code you have. I’ve been researching this off and on for months and just saw these updates to try and do it myself. Perhaps we can trade code if we make it more elegant. Let me know if you are willing to share! Thanks!

@Natecj I have another hub and was trying to get your code to work and running into some prooblems? Is there anyway that you would help? Thanks

Can you send me details with the problem you are running into? It has been a long time since I have worked on any of this, but it has been working without issue all this time so we should be able to get you up and running too.

I have tried to get this to work, but when I choose ā€œCreate New Deviceā€ I get the dreaded ā€œSomething’s Wrongā€ screen. Has anyone ran across this before? I am using the classic app.

1 Like

I am having trouble getting my bed onto my wifi. I don’t have a sleep number account since I bought my bed used. I know I can get it online using a bam-init.conf file but I need help setting it up. Let’s assume my wifi password is abcdef123456 and my network name is TheDays.

accountNumber = -9999999999999999999
useOpenWifi=0
useHiddenSSID=1
ssid=TheDays
mfgEnable=false
bam-conf=http://svcsleepiq.sleepnumber.com/bam/device/getConfig.jsp
bam-prep=http://svcsleepiq.sleepnumber.com/bam/device/getSoftware.jsp
tunnelURL= devices.zepp.bamlabs.com
timeURL=https://svcsleepiq.sleepnumber.com/bam/device/getTime.jsp
bam-wpa=abcdef123456

Can anyone please tell me what I have wrong? I don’t have an original file to go from.

Interesting thread here!

I’m wondering if anyone has found out a way to turn off all wifi/bluetooth transmissions from the Sleep Number beds. I love smart home stuff, but I’m trying to keep RF and EMF out of the bedroom.

Or maybe is there an access port on Sleep Number Beds that might allow for a hardline connection?

If anyone is interest I made a video on how to turn your bed into a presence sensor. Game changer!

I just is noticed that this app is no longer working for me! :disappointed:

Is anyone still using this with any success, or is it dead?