A number of months ago I integrated my standing desk with Home Assistant, so that it would automatically raise when I would join a call using Microsoft Teams.
Unfortunately, the solution was rather crude and limiting as it only worked for one of my two powered standing desks (in separate rooms), didn’t capture the desk current state or height, and relied on having a Raspberry Pi Pico W under the desk to act as a message relay to the Bluetooth module plugged into the controller.
As one of my colleagues says, I’m more of a software guy. Because of this, that same colleague (Lee Stevenson) had to help me by building the modules that allowed my desks to actually connect directly to Home Assistant.
The new solution is built using ESP2866 PCBs with RJ45 sockets that sit in between the physical panel as well as the desk controller.
What this allows me to now see is the current status and height of desk, as well as data and history.
And because it is now a sensor, I can do a bunch of things with it using templating and automations, such as aggregating the time spent between desks and displaying it as a visual.
The full code for the ESPHome modules, templates, sensors, automations, and dashboard card is available up on GitHub.
Also published on Medium.