Desky Standing Desk (ESPHome) [Works with Desky, Uplift, Jiecang, Assmann & others]

Good evening,
I came across this thread and have been trying to automate my Desktronic height-adjustable table. I also use the esp8266 d1mini chip.

The Ethernet cable from the touchpad to the controller was 10-pole. After unscrewing an already broken controller, I found out which cables are actually used. However, the arrangement in the Ethernet cable differs from the one in this project:

Sequence in power supply | G     | TX    | RX    | Key2 | Key1 | G      | B-C1 | SWD  | 5V    | DC
--------------------------------------------------------------------------------------------------------
Color                    | brown | black | white | free | red  | purple | free | free | green | yellow

Unfortunately, I can’t find any information about Desktronic products online. So unfortunately I also don’t know what stands e.g. up / down.

At the moment I have a working bridge. So I can still manually raise and lower my table with the two adapters (Adapter1: 10-pole Ethernet cable from touchpad to 8-pole Ethernet cable, Adapter2: 8-pole Ethernet cable to 10-pole Ethernet cable from touchpad). I also managed to read out the RX output. (I took the G cable and the TX cable of the 8-pole Ethernet cable from Adapter1 and connected it with the corresponding pins of my d1mini) However, I did not get any further at this point. Can anyone help me with this issue?

Hi.

Does the desk appear to have Jiecang controller?

See first post for tips on identifying if so…

If it does not, it is unlikely this solution will work.

Some photos may help too.

Cheers.

The desk does not have a Jiecang controller. This is the controller I use.

Thats the setup I have right now. (The colors from Adapter to chip does not match the actual colors, but you should be able to recognise it. → I did not had all cable colors).

1 Like

And another perspective:

1 Like

If it doesn’t use the jiecang controller then you’ll be starting from scratch. The solution is doing more than simply sending a hi/lo to certain ports. It also reads the serial data coming in to understand desk state.

So you’ll have to id all that from your controller then reverse engineer that into something that can be built into a module to translate what the desk is telling you. For the jiecang controllers all that is in a desky module that is imported and loaded into the Esp32

Because yours isn’t a desky/jiecang compatible You’ll have to provide that.

Its basically like trying to drive a ZWave device with a Zigbee controller. It simply Doesn’t work no matter how similar they are.

2 Likes

Also please start another thread to seek further support. This thread is for Jiecang/Desky.

Here are some other examples of standing desk threads.

The ESPHOME Discord is another great place to get support. ssieb is particularly skilled and helpful.

Cheers.

2 Likes

Hi Mahko!

First of all, great work by you and ssieb!
I’ve been on the discord server already, read literally everything but I am lost :expressionless:

I have a Fully Jarvis Model with the actuator JCB36N2CA-230 and a JCHT35K3-V3-B-H-2D0 keyboard.
I’m trying to make it work with a D1 Mini Pro ESP8266 board and it’s a bit all over the place.
I can make the desk go up, down and so on but I can’t read the values from the output… If I change the debug it gets all weird and numbers start flowing all over the place - meaning I can get the output but it doesn’t really make sense nor it looks anywhere formatted like the ones I see in the thread.

Essentially it can’t read with the desk moves nor what’s the desk position.
I believe my model’s really close to the one from @Anto79-ops and @Nico_DreamzZ - but somehow I just can’t figure out what’s wrong in this picture.

Passthrough (if I remove the ESP off the way) works perfectly fine and I can raise and lower the desk through the ESP when that’s connected.
I can read debug if I change the rx_pin to 3 and turn off the logger… however it becomes a mess… numbers all over the place and doesn’t make any sense.

Help? Please?

1 Like

Could you uncomment the debug part and provide some sample logs with rx connected to gpio1, and then gpio3 please (i.e try both pins).

Like here…

I don’t understand why you would use pin 1. GPIO 3 is the RX pin and lets you use the hardware uart.

1 Like

Yeah I agree it’s weird. I think there is something odd going on with some of the D1 mini clones.

When I was using a D1 mini clone (before I moved to a QuinLED) I could only get it working using the pin marked as tx and :

rx_pin: 1 #Labelled TX on my D1mini clone (mislabelled?)

That’s not mislabelled. You’re telling esphome to use pin 1 and that’s the TX pin. If you were powering the device with USB, then the USB uart converter was probably interfering with the RX pin.

1 Like

Gottcha. There were a few of us on this thread that could only seem to get it working with pin 1. Three of us iirc…

Thanks for replying back and helping me Mahko and @ssieb :slight_smile:

I have configured the D1 through ESPHome in Home Assistant, initially with the debug on GPIO3 (RX) and when I do that, basically the desk stops showing the values on the screen of the controller keyboard. Buttons work normally but there’s no display.

I’ve placed the configuration here: config rx3 4bytes debug - Pastebin.com to not overload the post I’m doing here, and the log is here: pastebin.com/aLFVua55 .

After this attempt, I went and changed the bytes from 4 to 9 on the config, everything else remained the same. Config here: pastebin . com/VCebH2dA and output here: pastebin . com/D0Rr2Nyn .

Both outputs were logged with me just pressing up or down in the controller keyboard.
This (pastebin . com/LBRYKkP7) 3rd output was from the 2nd memory slot when I pressed it until the desk stopped.

Question: Could it be that my controller is different somehow and the wiring is different as well?

PS: Can only put 2 links in a post… had to separate the pastebin from the TLD.

Couple of random thoughts. My gut feel is this will be ok but you’ve got to work through some buggy UART thing.

First step would probably be to work on getting some clean/consistent UART messages and then see if they are the same or different. You’ll need to tinker. You seem to be receiving something roughly resembling the right data, so that’s a start. As you mentioned it seems noisy.

I don’t have much depth of understanding of these things but here’s some things I would try:

  • Repeat the previous steps but power the ESP via a separate good quality power supply and USB cable (best ones you have from your phone etc).
  • Rewire your whole set-up and make sure all connections are really good. Especially the rx wires and grounds. Ground not being right can create noise.
  • Did you have a go at trying the previous steps with rx_pin: 1 #Labelled TX ?

This is how I got it working using Bluetooth, but without ESPHome or any of the goodness in this thread: Automatically raise your desk when joining a Microsoft Teams call or meeting – Loryan Strant, Microsoft 365 MVP

I’ve actually since replaced the Bluetooth-based solution with this one, and have my code up here for the various sensors and components:

1 Like

I finally got around to testing accessing the native memory presets as per a few posts above this one.

I can confirm the soft start/stop works with this, which is nice.

I might even move over to this approach as my main “go to height” method.

You only really need to connect up one more wire - the purple pne.

Presumbly this wouldn’t interfere with any other native functionality like collision detection etc too.

The Jarvis project also gives a nice overview of the control lines, which I believe are the same.

The project also has known commands for things like setting each memory slot to the current height, which I haven’t looked into and probably am not motivated enough to;)

The thread for turning your Desktronic desk into a smart desk can be found here: Turn your Desktronic standing desk into a smart desk!

1 Like

Thank you @Mahko_Mahko and @ssieb for your work.

I can confirm that this works on the (new) version of the BOHO OFFICE Basic Line desk.

I can also confirm that I could only get it working by using Pin D1 (5) on my ESP8266 D1 Mini.
I could not get it working by using Pin RXD (3).

I also got @dev0 method working (minus button 4 because it does not exist on my desk) and I plan on controlling the buttons via their method and get the current hight via @ssieb custom component.

The only thing I am still trying to figure out with @dev0 method is how I can e.g.: press the button “Up” with my mouse for a long(er) time which results in the button actually being pressed for a longer time. So that the behavior is the same as when I keep pressing down on the actual physical control panel button with my finger.


image


(image of the control box of my BOHO OFFICE Basic Line desk)

1 Like

Nice! I’ve added your desk to the “works with” list.

I don’t believe there is a way to mimic a “hold down button” action in ESPHome.

I think the best you can do is making a gpio switch for that wire/pin, which you’d to turn on while you want the desk to move and then turn off to stop it. Not the best but it works.

1 Like

Hello,
I have an issue with setting up my desk to esphome.
My esphome yaml file for testing purposes:

uart:
  - id: desk_uart
    baud_rate: 9600
    rx_pin: GPIO25  # R pin
    debug:
      after:
        timeout: 10ms
      dummy_receiver: true
      sequence:
        - lambda: UARTDebug::log_hex(UART_DIRECTION_RX, bytes, ':');
  - id: desk_uart1
    baud_rate: 9600
    rx_pin: GPIO27  # T pin
    debug:
      after:
        timeout: 10ms
      dummy_receiver: true
      sequence:
        - lambda: UARTDebug::log_hex(UART_DIRECTION_TX, bytes, ':');

Im using quin-esp32 board, and I soldered on my display controller T,R and GND wires and connected them to my esp32.
After run command, in my debug console, hexdecimal values are just running in infinite loop.
When I press some button on my display controller, I can see that these numbers are changed, but Im stuck from this point on, Im not sure what I need to do? I can see some reptetive pattern, but still Im not sure what is the correct block of hexdecimal values to extract some important inormation from it?
Any help would be apprecieted,
tnx