I have been searching the internet and cannot find a reliable way of connecting home assistant to Sleep Tracker AI. This is the software that Tempur-Pedic beds use and allows for control of the bed and the lights under the bed. The software can be controlled using Google or Alexa so I assume it has some sort of API although I am not an expert at programming.
I do know about This github post but it did not work for me, the python scripts there refer to local control but when I use a packet sniffer it looks like the Sleep Tracker app is a remote service.
This is the best workaround I have found (although it is still sub-optimal).
Connect the bed to Alexa using the sleeptracker skill.
Get an echo dot that you do not use, because this will involve the echo speaking randomly, so I just shoved one into my networking closet with the volume on level 1.
Install the Alexa Media Player Integration from HACS
Create template buttons for all 4 bed positions and a template toggle for the bed lights.
Create an automation for each that sends the following command to the echo “Ask Sleeptracker” then waits 1.5 seconds and then sends the command “Set the bed to X position” (Or “Turn the bed lights on/off”). After both commands the echo will say “Okay” which is why I wanted it in the networking closet.
There is about a 3 second delay between when I press the button in home assistant and when the bed responds.
Few Notes:
No Vibration Control, the Alexa Skill doesn’t do this and I asked Sleeptracker to add it, they are looking into it.
Obviously no local control, requires internet.
It doesn’t matter what command you send regarding the lights “Turn On” or “Turn Off” the lights just toggle anyway.
You might be curious about the 1.5 second delay when we could just ask the entire statement in a single command. The reason is the command works verbally but when sending the command as text for some reason Alexa tries to find a device called “Bed Light” rather than just pass the command to the skill. I am not sure why. But separating it into two commands ensures the 2nd command is executed within the sleeptracker skill.
This same process could possibly be done with Google Assistant, but I cannot find a good add-on for sending commands to Google.
I am guessing the github is using one of the old Tempur wifi bases and not the Sleeptracker AI.
I tried configuring the .py files for my bed and got no where, I also converted the HEX code he listed to Binary and sent to my bed with my ISY and got nothing.
I would love to control this with my IoX platform. Anyone make any progress?
I’m building an integration for SleepTracker AI - I have an Ergo Smart Base, so anyone with an Extend or Split base out there would be very helpful to figure out capabilities.
For folks wishing to help out with the data collection and help testing what I’ve built so far please let me know and I’ll DM you an invite to my discord server.
Very cool! Just got it to work. I just had to add the repo to the add-on store https://github.com/richardhopton/smartbed-mqtt and add my username/password to the config. MQTT auto configured. I am using Mosquito Broker for MQTT.
I have been searching for this topic every few months an just happened to find this post!
Hi @richardhopton, do you think you can help me with some code to create a program that allows the bed to go from whatever position it’s currently in to completely flat after a certain amount of time? I appreciate it.
If you haven’t already please jump on the discord - it should be simple to setup a home assistant automation you can kick off that, using this addon, will flatten the bed after a pre-determined time.
What’s the current state of support for TEMPUR-Ergo® Smart Base? It’s the WiFi model with mobile app. I’m looking at getting the smart base but would like good HA integration.
Hey @richardhopton it looks like the discord invite link is expired. I have a new tempur-ergo smart base (just got it yesterday) that I would love to hook up to Home Assistant. I added your repo and your addon and it looks like its working. I’m getting this in the logs:
info [2023-11-28T18:04:02.452Z] [Sleeptracker] Fetching data for bed 582475
But I’m not seeing any entities that were added with it. Should there be something else after that log entry? What should the entities be called?