My findings getting this desk working with ESPHome
For anyone interested, my test code so far is here GitHub - shades66/Maidesite-standing-desk: My experimentations with connecting a Maidesite PRO 2 standing desk controller to HomeAssist
I was following another great thread on here around how to integrate with HA/ESPHome by tapping into the control & serial lines between the controller & handset but when I received my standing desk it looks like Maidesite changed the design so instead of a separate control box & handset everything is now contained within the handset itself. While I suspect a lot of what others have found would be do-able on this new handset it could easily void any warranties/guarantees pretty quickly I decided to see what could be done via the RJ12 socket which this machine does have. It has no mention Jiecang anywhere on the hardware/instructions I started playing with some information found off that thread and pretty quickly got the basics working. The hardest part was trying to get information to make the desk move to a specific position but eventually found someone had created a spreadsheet with a ton of useful information which suggests the controller is probably made by Jiecang or based on their design so is possibly usable by other brands that have an RJ12 connector.
So far working is
- Button to trigger any of the 4 presets
- Button to move UP/DOWN
- Slider to move direct to a height
- Get current settings for height & presets
Todo
- Tidy up code (remove test stuff)
- Make it retrieve the current height automatically (you need to press the test button at the start)
- Add buttons to create presets based on current height
- Look into automations to automatically lower after alarms/no-one at desk
hope it is of use to someone else with this desk.
Great work @Shades66.
I am planing to automate my Maidesite Desk, just waiting for the RJ12 cable to arrive.
By any chance could you add a photo / pic with the esp wiring. The devider for the TX connection is confusing me a bit.
Thanks a lot.
Edit: The cable arrived, but the colors are different. I think I have managed to work out the connections.
I have set up the eps32. Now when I trigger the TEST button, the desk control pannel lights up and the following is printed to the console. The rest of the sensors are unavailable.
It seem I’ve got some data send to the desk, but looks like nothing is getting from the desk to the ESP32.
[21:49:35][D][uart_debug:176]: >>> 241,241,7,0,7,126,241,241,8
[21:49:35][D][uart_debug:176]: >>> 0,8,126,241,241,9,0,9,126
[21:49:35][D][uart_debug:176]: >>> 241,241,12,0,12,126,241,241,14
[21:49:35][W][component:204]: Component api took a long time for an operation (0.05 s).
[21:49:35][W][component:205]: Components should block for at most 20-30ms.
[21:49:35][D][uart_debug:176]: >>> 0,14,12
Edit 2:
Got there at the end. Works well. Can’t wait to automate my daily standing routine
Thanks again for your work!!!
Hey, sorry I didn’t see anyone had responded to this, Glad to hear you got it working
I’ll add an image of the wiring to make it easier to identify the correct colours at some point over the weekend
anyone else wanting to know the circuit diagram I used the circuit from this page (just the resistors part into the ESP’s RX pin) Arduino Uno serial communication with ESP32 using voltage divider - #2 by groundFungus - Project Guidance - Arduino Forum
Nice work, i’ve got my cable and begin my work these days… thanks for your effort! Will tell you, if i was successful
Hi Mark,
I’m a bit lost as unfortunately not as technical as I once was… do you have a photo of your wiring etc please if possible linked to the ESP 32?
Do I flash desk.h onto the board and load dskcontrol.yaml into my configuration on Home Assistant?
Thanks
Richard
Hi guys!
I’m following the GitHub project to integrate my Maidesite desk as well.
Code on the ESP seems to be OK but I’m stuck at the very same first edit of @tomino
[21:18:05][D][button:010]: 'Desk test' Pressed.
[21:18:05][D][main:495]: TEST Pressed
[21:18:05][D][uart_debug:176]: >>> 241,241,7,0,7,126,241,241,8
[21:18:05][D][uart_debug:176]: >>> 0,8,126,241,241,9,0,9,126
[21:18:05][D][uart_debug:176]: >>> 241,241,12,0,12,126,241,241,14
[21:18:05][D][uart_debug:176]: >>> 0,14,126
No infos from the desk and as far as I can tell no other button are functioning. Any clues are welcome. What did I do wrong?
Hoping to read from you, as I revived this aging topic…
My bad!…
I was missing the home assistant’s entity to enable desk movement.
All’s up&running! Big up for the awesome work.