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

While the desk is moving, I see this every ~200 ms.

I’ve modified the decoding to not assume stop bits and now I’m getting 9 bytes per chunk, each look something like F2 F2 01 03 03 2E 0F 44 7E.
Which is the expected structure for height reports, I think.

Not yet, but this would be one of the next steps.

1 Like

This is good news. You have the expected protocol. Probably you just need to do a bit of debugging as to why your ESP isn’t recieving them properly and then you should be fully working.

I would suggest using a higher sampling rate. 20KHz is really minimal.

1 Like

Yeah, thought so myself and continued with 50 kHz.

Anyhow, I found that it works, if I specify the actual pins:

uart:
  id: uart_bus
  tx_pin: 21
  rx_pin: 20
  baud_rate: 9600
  debug:
    direction: BOTH
    dummy_receiver: true
    after:
      delimiter: [0x7E]

I have the strong suspicion that RX may be defined to be another pin for board: esp32-c3-devkitm-1 / variant: esp32c3 in the BSP, though I haven’t tried to verify that.

Next think I’ll look into is how to send a hearbeat / wakeup command before triggering a move, because when the controller goes to sleep, I have to send two messages for it to do anything.

Is that even when using this project and config?

You should generally avoid using the uart0 default pins on any ESP.

Mostly, with the board changed to match my ESP32-C3, of course (and changed wifi credentials).

Is that because they’re usually the debugging/logging pins, or is there another reason for that?

1 Like

I think it’s because serial logger is usually sitting on them. ssieb can probably explain better/ more correctly though.

1 Like

Yes, they’re the pins for serial logging, so you should keep them available. But also, if there is a USB converter on board, it can interfere.

1 Like

I’m not sure if it is the right way to do it but if you want to tinker you could try creating a local fork of the component and adding some kind of generic command before the main one.

You could send a hearbeat command via interval + uart.write or a uart switch but I’m not sure it is really a great idea to keep it awake? (if that is what it would do).

Currently reading through the commands in Desktopia Pro X Smart Control.
Looks like the “wakeup” mentioned there is the request settings command, which seems reasonable.

Yeah, I’d only want to send this command, if there wasn’t any received message from the desk for some time, e.g. 10 seconds.

Currently trying to figure out what other commands the desk supports, it has a reminder for standing time that you can set via software and similar things.

1 Like

First thing I can share is that I was able to set the desk memory positions to a specific height as follows:

        void JiecangDeskController::set_position(int pos, float height) {
            if (pos <= 0 || pos > 3) {
                ESP_LOGW("jiecang_desk_controller", "can't set desk position %d, only 1 through 3 are supported!", pos);
                return;
            }

            unsigned char cmd = 0xB0;

            unsigned char high_byte = ((int) height * 10) >> 8;
            unsigned char low_byte = ((int) height * 10) & 0xFF;

            unsigned char checksum = cmd + 0x03 + pos + high_byte + low_byte;

            write_array({ 0xF1, 0xF1, cmd, 0x03, pos, high_byte, low_byte, checksum, 0x7E });
        }

Though with the caveat that this did only work with the desk’s three “official” positions, 1 through 3.
I can set a fourth preset to the current height and later return to it, but don’t seem to be able to do so with this command.

Doesn’t that project already have that feature?

Yes, but for that you have to move the desk to the desired height first.

The commands I found allow you to set the position without having to move the desk.

1 Like

Hello all,

I have a Ergonice Pro+ desk, would this also work for this one?
The box is a “WP-H76-902”. with a typical RJ45 connector

Did you try these steps? If you post pictures of the controller and the label on it it can help.

@Rocka84 @Mahko_Mahko and all - Thank you!

I’ve successfully soldered a cable with rj11 to waveshare esp32-c3-zero and I can control my Ikea Uppspel desk with it.

The only change that I’ve made from the example script is to set the correct rx/tx_pin (GPIO20, GPIO21) in order to receive the initial information about the max/min/current height of the desk.

2 Likes

Hi, has there been any progress on the mittzon desk from ikea?

1 Like

Hi, now i have a signal analyzer but i have no clue what i need to do.

Suggest taking it apart and posting detailed photos.

But proceed at your own risk of voiding your warranty and damaging your controller.

Also be aware of what voltages you are dealing with.