Tempurpedic Adjustable bed frame

I agree - The fact that Tempur has two products with almost the same name and a totally different control system certainly confuses folks looking for integrations.

The only reason I opted for the Sleeptracker name originally was that not just Tempur uses them, and BeautyRest/Tomorrow/Serta also use them and I believe they also offer some remote control (although I don’t know for certain!)

I had planned to do a Typescript integration that uses MQTT rather than a native python, because python is not my core language, and I have some Typescript experience in my professional life.

1 Like

I’ve done a few MQTT scripts in python. that’s how I control all my Raspberry Pi nodes and ESP8266 lights. I had considering writing an MQTT python app to run all the IP commands. I have such an app to interface pianobar from a separate server.

@richardhopton I hesitate on creating yet another MQTT app. I have been looking at how to create an integration and may work towards creating a pure python integration for the bed controls. Why don’t we both work, each on our own integrations, keeping in contact on progress and testing. I was looking at the BeautyRest/Tomorrow/Serta device and may get one. I have been concerned that my memory foam mattress might inhibit the readings and about what effect the massage would have on it. I have so damn much MQTT going on right now I feel a pure direct python integration would be best. Using the Button Entity | Home Assistant Developer Docs as the primary entities of the integration. I don’t want to step on or hinder your effort so keep on it and keep me in your loop.

@noodlon @tamorgen Would you like to get involved in testing this new integration I’m building for Sleeptracker controlled beds? Head over to this thread where I’ll post more information on getting involved. Tempur-Pedic Sleep Tracker AI

Hi @wymand. I think I have the same bed frame as you. I tried 1 or 2 of the scripts and they work for me also - only changed the IP. Left message/preamble the same. Have you figured out how to get away from using the android device? I have an android device but thinking of running a docker container that emulates the android device and running the app inside that.

I’d be interested in helping if needed (sniff packets, etc) but might need some understanding of how you do it. I’ve setup wireguard for remote monitoring but it’s not capturing the calls so maybe android tcpdump (or however you’re doing it) is the only way.

Also since you’ve sniffed the packets why aren’t you able to emulate the running app with some type of (python?) server?

(Finally a side note: from the tempur ergo doc, it also communicates on TCP 2000. Not sure if that does anything of importance)

@richardhopton why is your integration not able to raise/lower head/feet when @wymand’s can (need to test this script for myself)?

Good Morning @dg123,
Since my scripts are called from the command line, it works fine with Home Assistant in a Docker container. Yes, you need to change the IP address but that should be all. The entity I use is command line switch. It looks to Home Assistant like an ON/OFF switch instead of a normally open push button. Thus each time you use a command it shows as either on or off even though it is just a one time command. Any way I can help you work, I will be glad to pitch in but at 80 years, the brain is getting tired. Welcome to the community
Doug

You’re running an android phone plugged in 24/7 in order to keep the Tempur ergo app open? The only way the scripts seem to work is when the app is open.

(Also congratulations on 80!)

I don’t have the android app open on my phone. The TCP/IP command is all the bed needs. That is unless I am missing something… To test, I just now powered off my phone and Home Assistant is still able to control it. With your phone app off, try to open the bed’s web page on port 80. It should return a packet of data on the bed controller. The only reason I can think of why it would need the app open is if there were some security (??login??) needed but I really doubt it. Speaking of 80, I worked on my first computer in 1962 at the NSA’s JSPC. An IBM 1401. Quite a long career in computers and telecom. This sort of low level packet control is what I did a lot of. Before computer consoles, I used to write level 2 TTY code for interfacing the FBI Crime Information Center. I play with this stuff to keep my brain agile. Please let me know about your progress. It gives me a good feeling to help the community.

@dg123 I forgot to add the file name for the web page. http://192.168.0.155/sys is mine. Here is the return:{"uuid":"c86408621b8230326c71d9f7dc1d","interface":"station","prov":{"types":[]},"connection":{"station":{"mac_addr":"6c:71:d9:f7:dc:1d","configured":1,"status":2,"ssid":"hiddenridge2","bssid":"bc:a5:11:1c:ae:0e","channel":4,"security":5,"ip":0,"rssi":-46,"ipaddr":"192.168.0.155","ipmask":"255.255.255.0","ipgw":"127.0.0.1","ipdns1":"127.0.0.1","ipdns2":"127.0.0.1"}}}

@wymand Thank you! It’s working.

Background: You were right, no app was needed. I had to packet sniff on my iPhone b/c 1 or 2 messages were different. This is probably bc I have a twinxls connected base vs a single base…maybe? Also bc I have 2 bases I have to send messages to 2 IPs to keep them in sync. Otherwise everything works.

I think there’s probably more to raising/lowering legs though. I have a Hue dial I’m turning it to raise/lower and it’s very jerky. Maybe a timing issue or race condition with the ACK messages. This is small and there’s a lot of workaround options now that I can script it in HA (or in python).

Also that’s a varied career. You were around for the good old days when people could hack just by playing back phone tone sounds! :grinning:

Anyways thank you for this contribution! It really got this working.

My integration doesn’t support logicdata beds yet at all - so it can’t do anything that @wymand’s scripts can. Happy to discuss more details on the why in the discord if you care to join. TLDR; I didn’t need anything more than recalling the memory presets and turning on the massage… didn’t fancy the bed being able to fold me like a pretzel while I slept, or risk someone doing something like that accidentally to themselves with my integration.

If logicdata uses TCP/IP or UDP/IP like the Tempurpedic then someone could sniff the packets and write their commands. I am personally happy that you created an integration no matter whether it is limited or not. People can build on if they want. Just an 81 year-old’s opinion…

My message was in reply to dg123, but logicdata make the controller on the bed you have. I’ve been working with someone to collect all the commands for all the different presets and will have an almost fully featured solution in place in my next release

1 Like