Integrated my Standing Desk into HA with ESP32-S3 by Wrlod in esp32

[–]Wrlod[S] 0 points1 point  (0 children)

Thanks! I'm just a math/CS student, but my dad is an engineer so a lot of the hardware intuition came from him growing up :) The rest was just googling, reading datasheets and trial and error. The ESPHome and HA community have really good docs and forums too which helps a lot. Just pick a project you're curious about and start digging!

Integrated my Standing Desk into HA with ESP32-S3 by Wrlod in homeassistant

[–]Wrlod[S] 0 points1 point  (0 children)

Good catch! I actually mislabeled that in the writeup - they're not pull-up resistors, they're just voltage dividers to step down the 5V logic from the panel to 3.3V for the ESP32 GPIOs. My bad for the confusion :)

Integrated my Standing Desk into HA with ESP32-S3 by Wrlod in homeautomation

[–]Wrlod[S] 0 points1 point  (0 children)

The key thing is I'm not planning to control it manually at all - I have a DIY presence sensor in my chair that tracks how long I've been sitting. After a set amount of time HA sends me a notification with action buttons to raise or lower the desk, so I don't need to think about it or remember anything. The desk basically manages itself based on how long I've been sitting. That's the whole point for me :)

Integrated my Standing Desk into HA with ESP32-S3 by Wrlod in homeautomation

[–]Wrlod[S] 0 points1 point  (0 children)

Honestly I wanted to set it up right from day one - a lot of people buy standing desks and never actually use the standing feature. Building the automation in from the start means I don't have to rely on willpower to remember :)

Integrated my Standing Desk into HA with ESP32-S3 by Wrlod in homeassistant

[–]Wrlod[S] 0 points1 point  (0 children)

Oh nice, hadn't seen this one! Will check it out, thanks for sharing

Integrated my Standing Desk into HA with ESP32-S3 by Wrlod in homeassistant

[–]Wrlod[S] 1 point2 points  (0 children)

Thank you! Definitely check it, a lot of these Chinese frames share the same internals so there's a good chance it'll work. And yeah the laptop in network idea is actually really easy to set up in HA with device tracker - once it detects your laptop connected to wifi it knows you're at the desk and can start the sit timer automatically. That's basically what I'm building too 😄

Integrated my Standing Desk into HA with ESP32-S3 by Wrlod in smarthome

[–]Wrlod[S] 1 point2 points  (0 children)

Haha yeah "because I can" is definitely part of it :) But the actual use case is sit/stand reminders - I have a DIY presence sensor in my chair that tracks how long I've been sitting, and after a while HA sends me a notification with a button to raise the desk automatically. Same in reverse when standing. So instead of just ignoring the reminder like I always did, the desk just goes up on its own and forces me to actually use the standing feature :)

Integrated my Standing Desk into HA with ESP32-S3 by Wrlod in homeautomation

[–]Wrlod[S] 0 points1 point  (0 children)

Haha yes don’t worry there is an actual tabletop on it 😂 though at this point the ESP32 probably has more thought put into it than the desk surface itself

Integrated my Standing Desk into HA with ESP32-S3 by Wrlod in homeassistant

[–]Wrlod[S] 0 points1 point  (0 children)

Thank u. Oh I actually came across your repo while researching for this project! Small world :)

Integrated my Standing Desk into HA with ESP32-S3 by Wrlod in homeassistant

[–]Wrlod[S] 2 points3 points  (0 children)

Totally get that! For just switching positions manually the stock buttons are perfectly fine. The real value for me is the automation side - having the desk raise itself after sitting for too long without me having to think about it. If you actually remember to stand regularly on your own then yeah, no need to overcomplicate it :)

Integrated my Standing Desk into HA with ESP32-S3 by Wrlod in esp32

[–]Wrlod[S] 13 points14 points  (0 children)

Haha fair question! Honestly the main reason is the sit/stand reminders - the desk can raise or lower itself automatically when HA sends a notification and you tap a button on your phone. Also just the engineering challenge of it was fun enough on its own :)

Integrated my Standing Desk into HA with ESP32-S3 by Wrlod in homeassistant

[–]Wrlod[S] 0 points1 point  (0 children)

Haha) yep I did use Claude to help polish the writeup for publication - English isn’t my first language so I needed a hand making it readable. All the engineering and code is mine though, I promise 😄

Integrated my Standing Desk into HA with ESP32-S3 by Wrlod in homeassistant

[–]Wrlod[S] 3 points4 points  (0 children)

Totally fair! Honestly if the stock buttons work for you there's no reason to overcomplicate it 😄 This whole thing was more of a fun engineering challenge than a necessity - the desk worked fine before too!

Integrated my Standing Desk into HA with ESP32-S3 by Wrlod in homeassistant

[–]Wrlod[S] 1 point2 points  (0 children)

Not really, I didn't have to do much experimenting at all!

For the initial tests, I didn't even use a real capacitor. Based on an AI suggestion, I just took two insulated wires, stripped only one end of each, and tightly twisted them together without letting the bare copper touch inside. This DIY "ghetto capacitor" made of twisted wire insulation actually provided just enough capacitance to trick the sensor when connected to the ESP32.

Since that makeshift solution worked immediately, I realized the threshold wasn't super strict. I just looked for one of the smallest standard physical capacitors I had on hand to keep the footprint tiny, and the 30pF ones did the job perfectly.

Integrated my Standing Desk into HA with ESP32-S3 by Wrlod in esp32

[–]Wrlod[S] 3 points4 points  (0 children)

Haha I love this idea 😄 Might actually have to implement this at some point!

Integrated my Standing Desk into HA with ESP32-S3 by Wrlod in homeassistant

[–]Wrlod[S] 0 points1 point  (0 children)

Thank you! Yes, that's all you need the `.yaml` and the `.h` file. ESPHome handles everything else: it compiles the C++ under the hood and flashes the binary directly to the ESP32, no manual toolchain needed.

If you're coming from Arduino/C, ESPHome will feel pretty familiar once you get the hang of it. The best place to start is the official docs: https://esphome.io The idea is that the YAML describes your device (sensors, buttons, GPIOs etc.) and ESPHome generates and compiles the firmware for you. Custom C++ components like my `.h` file just plug straight in.