I had intentions of tying into the wired remote for an older adjustable bed to add control functions in home assistant. I have an esp32 and a separate switch relay control that I was going to use. It sounded easy enough until I cracked open the wired remote and found a serial communication between it and the control box.
I searched around for schematics on the control or the remote and didn’t find anything. I did however find the control box has a port for a cable to connect 2 beds together. I assume it will use the same serial communication that the wired remote uses.
Inside the remote, I have the RX, TX, ground, 5V, and USB. It has a USB port in the end of it for charging your phone.
If I connect the TX on the remote to the RX of the esp32 along with 5v and ground, what do I need to use in esphome and home assistant to read what the remote is sending to the control box when each button is pushed? If I can read and log this info, I hope I can transmit the same info to the control from the other port to do what I want.
Forget HA for a while, esphome logs is all you need here. You can use uart debug with dummy_receiver for that but you need to find uart parameters first. Guessing and trying… Also you need level shifting if uart is 5V.
Post a good photo of the remote.
ps. another approach would be connect to button contacts
I obviously don’t understand all the code behind it. Here is what I came up with. I loaded it to the ESP32 and booted it. I connected to it through the browser and ESPHome Web. It gives me basic bootup logs, so it did load and boot. I probably won’t get a chance to test it on the remote until sometime this weekend. Is this going to log what I want, or am I way off?
I got hex logs back from it with almost all baud rate settings. I didn’t have the resistors I needed on hand to convert the 5v to 3.3v. Using a meter I was getting a solid 5V while idle and it would pull down to about 2.6v while communicating. I think I will be able to get some info worth looking at once my logic level converter comes in.
Thanks for the help. I will post back when I have more info to share.
Correct, meter reads rapid high/low pulses as average.
You don’t need any specific resistor values as long as they make about 1:2 divider and stay in low kΩ range.
1.8k/3.3k or 4k7/10k for example