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

Are you trying to read the buttons or trigger the buttons? The adc is an input, so you might use that for reading the pins, but it’s not going to do anything for sending. What level are the wires at when the buttons are not pressed and what are you measuring against?

2 Likes

I am trying to trigger the button. I meant the DAC (i.e. esp32_dac). My bad.

When the buttons are depressed, this is what happens for the “non-composite” buttons (that I referred to as “easy” earlier). Note that HIGH means 5v and low means ~0.1v or so (don’t know the exact value, but pretty close to 0, definitely reads as LOW on a binary GPIO).

Button: Up
Wires: [HIGH, LOW, HIGH]
Button: Down
Wires: [HIGH, HIGH, LOW]
Button: Slot 2
Wires: [LOW, HIGH, HIGH]

When I press one of the composite buttons Slot 1, Slot 3 or Slot4, the signal on two of the three wires drops to approximately ~0.8v, but not all the way down to 0.

Button: Slot 1
Wires: [HIGH, 0.8v, 0.8v]

Button: Slot 3
Wires: [0.8v, HIGH, 0.8v]

Button: Slot 4
Wires: [0.8v, 0.8v, HIGH]

I measured the LOW and 0.8v values with the ADC pins on my ESP32 board, but also verified them with an external multimeter. The ADC maxes out at 3-ish v even with attenuation set all the way to 11db. So the 5v reading I was only able to get from my multimeter.

I haven’t actually tried dropping two wires all the way down to true LOW level at the same time to see what that will do. Maybe the 0.8v is some weird artifact caused by the remote but it’s just interpreted as LOW on the controller side. It doesn’t seem unreasonable that that might work.

I doubt that those buttons would be significantly different. 0.8V should be read as low.

2 Likes

Very interested to hear how you get on with this. I previously gave up on the presets…

What are the wire colours in order?

Is it:

[ 1. green (up), 2. yellow (down), 3. purple (?) ]

And are the wires pulled that way momentarily or until the desk has reached its position?

@Mahko_Mahko They are pulled momentarily.

But I figured it all out. The 0.8v was indeed just a regular LOW signal.
Here’s the ESPHome configuration to allow me emulating any button on my Uplift Desk:

output:
  - platform: gpio
    pin: GPIO21
    id: pin_7_green
    inverted: true
  - platform: gpio
    pin: GPIO22
    id: pin_8_yellow
    inverted: true
  - platform: gpio
    pin: GPIO17
    id: pin_6_purple
    inverted: true
  - platform: gpio
    pin: GPIO16
    id: pin_1_transparent
    inverted: true
    
button:
  # Simple Buttons
  - platform: output
    output: pin_7_green
    name: Up
    duration: 300ms
  - platform: output
    output: pin_8_yellow
    name: Down
    duration: 300ms
  - platform: output
    output: pin_6_purple
    name: 2
    duration: 300ms
  - platform: output
    output: pin_1_transparent
    name: M
    duration: 300ms
  # Combination Buttons
  - platform: template
    name: 1
    on_press:
      then:
        - output.turn_on: pin_7_green
        - output.turn_on: pin_8_yellow
        - delay: 300ms
        - output.turn_off: pin_8_yellow
        - output.turn_off: pin_7_green
  - platform: template
    name: 3
    on_press:
      then:
        - output.turn_on: pin_6_purple
        - output.turn_on: pin_8_yellow
        - delay: 300ms
        - output.turn_off: pin_8_yellow
        - output.turn_off: pin_6_purple
  - platform: template
    name: 4
    on_press:
      then:
        - output.turn_on: pin_6_purple
        - output.turn_on: pin_7_green
        - delay: 300ms
        - output.turn_off: pin_7_green
        - output.turn_off: pin_6_purple

The GPIO outputs are named in line with this layout:

Obviously the Up and Down buttons would better be switches, rather than buttons. Good enough for demonstration purposes though.

1 Like

Nice!

I’ll probably implement myself and add your solution to the main posts.

Thanks for sharing this back!

1 Like

Does the desk slow on approach to the target height or stop more abruptly?

We haven’t cracked slowing yet for the main solution.

Hey all,

Nice thread! I have BDI Stance desk, it uses the same controller, or similar its

JCB36N2

Most of the tutorials the model number is

JCB35N2

Think this will work with mine?

Also, I see that there are 2 options, but I’m thinking option 1 is better for me (easier), just to have a passthrough. Is this still a viable option?

I see some talking about abrupt stops as opposed to easing it in, is there a solution to that?

thank you!

I think it is very likely it will work fine. But there are no guarantees.

Option 1 is a good way to get started. Most people are doing that.

You can build it quickly without an enclosure and do some testing, and then figure out where you want to go from there.

The “soft start/stop” hasn’t been solved yet. But it’s not really that a big a deal.

Thank you just put my order in through AliExpress basically bought $20 worth of hardware.

And if it doesn’t work I’ve always been meaning to get some d1s anyways!

Can’t wait to try this in the next two weeks or so.

Thanks for sharing

1 Like

Feel free to reach out for any help, and let us know if you have success and we’ll add your desk to the “works with” list.

1 Like

You bet! Cheers

1 Like

Anyone try this with TiMotion controllers yet?

Not that I’m aware of.

Do you have reason to believe they are Jiecang?

I’m going to get very soon what I need to make this happen for my newly installed Fully Jarvis! Will report back once I get it working (or not :D). Thanks for all your great work. guys <3

1 Like

I was just curious if anyone had tried it yet. I can’t seem to find much info on anyone that had done any hacking on Timotion. I did find one article about medical beds that indicated that Timotion and Jiecang are different controls, but even then it could be each company uses the same base hardware and they are unique in software and construction of the beds.

1 Like

From a quick Google around I’m doubtful that one would work. But you never know.

I think you’ve probably got something more like this.

Is there a label on the control box with model details etc you can share?

Looking at the schematics I’ve got a doubt regarding the connections, and because there’s a power line involved I thought I should ask before burning something :smiley:

I’ve prepared this image above. Do I understand the schematics correctly? So the position of the eth adapter and the colored cables go like this? so the first “screw” goes with stripe orange, the second screw goes with solid orange, and so on?

Thanks!

That’s correct…

What it basically means is that the order of the incoming wires is the same as the outgoing wires through that particular connector. It just “passes straight through”.

What you can do as an intermediate step is build the adapter but don’t hook up any of the wires to the esp (you can leave them “hanging”). Then plug the handset into the adapter, and the adapter into the controller, and just check that the handset still works with the new dongle in the middle.

Then you can work on getting the esp running.

1 Like