I was researching community for similar or exact manufacturers, but I discovered that mine desk is quite different from others (Uplift, Desky, Jiecang, etc.)
Here are some images from my desk motors (black box) and desk controller (display height with buttons)
I would try to clean up your logs like this and see if logging it as integers helps you spot the height values… it’s probably those last three (?) bytes.
uart:
- id: xx
tx_pin: xx
rx_pin: xx
baud_rate: 9600
debug:
direction: RX
dummy_receiver: true
after:
bytes: 5
sequence:
- lambda: UARTDebug::log_int(direction, bytes, ',');
I tried this code, but I have no readings in my debug console on button press.
But I noticed that my height display is “broken”. It shows whole digits like this:
I just reversed it GPIO pins for tx and rx, and now my display is blinking, but I have some kind of readings:
this two arrays are repetitive:
165,0,0,255,255
255,165,0,0,255
But I dont know what is the height because my display shows whole digits as I posted on post above, but now its just blinking.
test#1: 255,165,0,32,223 should refer to 88-89cm height
test #2: 165,0,64,191,255 => should refer to height 78.0 cm
test#3: 165,0,32,223,255 => should refere somewhere arround 90 cm
I’m not sure if we have quite narrowed in on the right messages and packet structure just yet.
@ssieb has seen quite a few of these desks now and is way more experienced than me with UART decoding. Perhaps he may give you some more pointers in the right direction;) .
Simplistically, you’re trying to guess a packet structure by looking at the messages and configuing your debug values until they clean up, then you’re looking for specific data bits which are most likely the desk height. Then you may need to guess how the relevant bits convert to your desk height using what’s proabably simple arithmetic or combining them.
First job is probably to find and read desk height. So I would focus on only having one wire connected to your ESP at a time (eg only T wire or R wire, plus ground).