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

Would you be able to provide a parts list for your implementation (using the d1 mini)?
I’m curious where you got the main housing from.

Hey, I’ve added a parts list to my solution post above. Sing out if you have any Q’s.

2 Likes

This post is some info on the rj12 Bluetooth dongle port.

I’ve been able to decode the UART height messages coming from the controller to the dongle port (building on sseib’s work). They are similar to the ones on the rj45 port.

But there doesn’t appear to be dedicated wires for raising/lowering the desk on this port. You can see in the teardown link below that the Bluetooth dongle has 4 wires. Earth, power, tx and (very likely) rx. I asked the company for the protocol for controlling it but they would not provide it. And I don’t believe you can actually purchase the dongle to sniff commands coming from the dongle to the desk. Therefore there is no known way to control the desk over this port, only get height readings.

So I abandoned this port and went forward with my “pass-through” solution on the rj45 port.

But here is some consolidated info I have on the RJ12 port anyway.

The dongle:
https://en.jiecang.com/product/131.html
Someone else’s tear-down:
https://fccid.io/2ANKDJCP35NBLT/Internal-Photos/Internal-Photos-3727739

Jiecang, Desky, and Uplift apps on the Google play store give you some hints as to the commands possible.

https://www.upliftdesk.com/uplift-desk-connect/

This guy appears to have built something interesting:

To see messages coming from the bluetooth port youm can use this UART debugging config.
I’ve forgotten and lost the pin schema though unfortunately

uart:
  - id: uart_bus2
    tx_pin: GPIO17
    rx_pin: GPIO16
    baud_rate: 9600
    debug:
      direction: BOTH
      dummy_receiver: true
      after:
        bytes: 9
      sequence:     
        - lambda: UARTDebug::log_int(direction, bytes, ',');

Then desk height = ( byte 5 * 256 ) + byte 6
= (5*256) + 41 = 1321mm = 132.1cm

Sample messages:

[20:40:27][D][uart_debug:176]: <<< 242,242,1,3,3,63,15,85,126
[20:40:27][D][uart_debug:176]: <<< 242,242,1,3,3,56,15,78,126
[20:40:27][D][uart_debug:176]: <<< 242,242,1,3,3,48,15,70,126
[20:40:28][D][uart_debug:176]: <<< 242,242,1,3,3,42,15,64,126
[20:40:28][D][uart_debug:176]: <<< 242,242,1,3,3,38,15,60,126
[20:40:28][D][uart_debug:176]: <<< 242,242,1,3,3,35,15,57,126
[20:40:28][D][uart_debug:176]: <<< 242,242,1,3,3,31,15,53,126
[20:40:29][D][uart_debug:176]: <<< 242,242,1,3,3,29,15,51,126
[20:40:29][D][uart_debug:176]: <<< 242,242,1,3,3,29,15,51,126

Yeah I reached out to the company to see if they could point me at a retailer of the dongle here’s in the UK, but they weren’t particularly helpful.

My friend purchased one in Australia, and doesn’t use it :rofl:

Might have to try either steal it off him, or get him to analyze it for me some time.

In the middle of a house move at the moment, but I’ll be reporting back anything I find.

At the very least, knowing the height without passthrough would already be a win for me, but I’d love to tell Siri to set the desk height.

1 Like

Actually, just found these guys, giving this dongle a try, I suspect they’ll all work the same.

Ah you mention you’re paying AUD so you’re probably in Australia. I think you might be able to get the dongle from zendesks.com.au - might need to reach out to support though. I’ve contacted them too, will let you know if they respond.

1 Like

I believe you need to find a dongle for Jiecang controllers (which is what for example Desky and Uplift use) if that is what you have, as opposed to Linak (which I think it another manufacturer, and they’ll very likely have a different protocol)

Ah. Well I guess I’ll find out. Zendesks confirmed via support that they sell the dongle, bit not sure which one they have. I’ll let you know how things go with the dongle I ordered once it arrives. Hope you’re wrong! :rofl:

How did you go?

They informed me the dongle would be delayed :rofl:

Busy playing with Smart Meters at the moment, will let you know if/when their dongle arrives.

I have received a 2nd standing desk (from work) however, which I believe uses a different brand controller. I might take a look to see if the controls are compatible with each other, as that could be useful to know too.

1 Like

Hey! I got this working for myself!

Unfortunately I forgot to take a picture of the inside before I screwed it to the desk - but it looks the same as yours in there. I made holes in a Jiffy Box instead of 3D printing the enclosure, and it fits nicely.

I tested it with your config and it works great!

Thanks again for your (and ssieb’s) dedication and for sharing how you did it!

1 Like

That’s great!

I’ll share version 2 in a little bit.

I intercept and pass-through at the jst connector and am designing a second control panel to sit alongside the factory one!

More details later…

1 Like

Hey, @Mahko_Mahko i rebuilt your setup with ESPHome and the Ethernet connector. Works fine with my desk. It is from a german company called “Assmann”. My handset has the feature, that it can lower the speed when the desk is moving a few centimeters from the programmed stopping point. With my logic analyzer i couln’t find out how it lowers the speed, do you have any idea? My controller is
JCB36N2CA-230.

The Handset is custom branded from Assmann but on the backside its called JCHT35K28C-4-01V4.


1 Like

That’s great!

The Desky ones do the same slowing on target height approach, which is not currently implemented in the component (stops more abruptly)

Ssieb suggested the desk might do it with PWM (see the Discord thread).

I haven’t had a chance to look into it yet.

Right I’m not very good with Discord.

I think you want to first join the ESPHome Discord Server (If you haven’t already).

Then maybe try this link to the thread:

If you can’t find/access the thread via that link, just search for “Desky” under the ‘general-support’ channel.

I’ll see if I can upload the case to Thingiverse now. Never done that…

I’ve uploaded the enclosure to Thingiverse and linked to it in the main solution post.

I can’t see the preview of it yet. Maybe the cloud is still processing the preview? Let me know if you have issues with access or using it. First time I’ve published a Thing.

This thread is a fascinating one, as I believe I have the same controller and dongle, but mine came from a company in Australia called Zen Space Desks that rebranded the units (which added to the challenge).
Anyway, I happened to have a Raspberry Pi Zero 2 W under my desk for the UPS and found a super-helpful guy on GitHub who had the same frustrations as me.
I’ve hooked mine up to my Teams presense, and have the full write-up here: Automatically raise your desk when joining a Microsoft Teams call or meeting – Loryan Strant, Microsoft 365 MVP
However, now that I see this approach using ESP32, I’m tempted to switch.

Nice one!

So your approach sends commands to the Bluetooth dongle?

I was pretty keen to do what I think the author was originally planning which is to replace the Bluetooth dongle with an ESPHome one but there was no way to determine/sniff the messages between the actual dongle and controller pins without having a dongle.

You might have seen what I learnt here.

IIRC from my initial desk research Zen Space use Jiecang hardware as you’ve suggested…

Yeah that’s exactly what ine does.
I actually reached out to the manufacturer and spend quite a bit of time trying to figure out options, until I stumbled across the GitHub repo (linked in my blog post) where the guy has already done the hard yards to sniff out the commands.
He’s just added some functionality to read the height of the desk too.

1 Like

This is great stuff! I’m the guy DeLorean mentioned who reverse engineered parts of the bluetooth functionality on https://github.com/C-Lock/desk_control.

It’s worth mentioning here, that in the US at least, this desk was the Uplift Sit-to-stand desk sold by Staples. Hopefully that info will help other clever folks find this thread.

My initial thought was to use a raspberry pi as a ‘listener’ for the commands between the bluetooth dongle and the desk controller via the GPIO pins and some fancy (hacky) ethernet wiring. I only did it with bluetooth because a friend pointed out (rightfully so), that it was a great excuse to learn something about bluetooth.

On a side note, I guess that means I should probably finish cleaning up the code and remove some bugs…

3 Likes