LoctekMotion IoT puts a Flexispot desk on Home Assistant over its RJ45 port
Learn how to connect your Flexispot (LoctekMotion) desk to the internet. This repository contains a collection of scripts to get your started, combined with research and instructions.
At a glance
- What is it?
- Most Flexispot standing desks use control boxes made by LoctekMotion, and those boxes expose a serial connection on an RJ45 socket that nobody uses. This repository documents the pin-out and ships ESPHome packages so an ESP32 can drive the desk up, down and to its presets from Home Assistant, and it is unusually careful about the hardware caveats.
- Who is it for?
- LoctekMotion IoT fits a person with a Flexispot or LoctekMotion column desk who wants the height in Home Assistant, the four presets as buttons and a warning after sitting too long, and who is comfortable with a soldering iron and a USB serial console.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository received new commits within the last day.
- What is it written in?
- Mainly C++, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 24, 2026, and from our analysis. They are not legal advice.
Editorial analysis
The serial port was already in the desk
The origin story is short and it explains the whole project. When the author assembled a Flexispot standing desk, the control panel turned out to have an RJ45 cable and a second RJ45 port, and the question that followed was whether the desk could be connected to the internet. Most Flexispot models use components from LoctekMotion, a manufacturer that specialises in lifting columns for height adjustable desks, and although LoctekMotion previously advertised a Bluetooth receiver for their control boxes, the author was not able to obtain one. That gap is what the project fills, using the serial communication ports instead. The intended result is a desk that can be controlled by voice or that can notify you when you have been sitting too long. The repository also points to a similar projects section for alternative solutions, and the README opens with a plain warning that tinkering with electronics can be risky and that the guide is used at your own risk.
What Home Assistant actually gets
The entity list is short and each entry maps to a real capability of the control box. There is a cover entity that controls the desk up, down and stop. The four desk presets are exposed as button entities, which is the part that matters in practice, because a preset button is an absolute height the control box performs itself, which is more accurate than a relative move. A sensor entity reports the current desk height, and a number entity lets you request a height in centimetres, though that one is marked experimental. The known issues section explains why, and the explanation is worth reading before you wire the number entity into an automation. The desk moves until the height sensor matches the requested height, and because reporting is delayed the desk can overshoot. The recommendation is to use the presets for accurate positioning, which is a good example of a project documenting the difference between a feature that works and a feature that works reliably.
The pin-out is the real documentation
The wiring table is the part of the repository that saves the most time, and it is presented against the T-568B RJ45 pin numbering. The desk side signals map to the ESP32 as follows. Pin 8 is the +5V supply and goes to VIN, pin 7 is ground and goes to ground, pin 6 is the desk's TX and goes to the ESP32 TX2 on GPIO17, pin 5 is the desk's RX and goes to the ESP32 RX2 on GPIO16, and pin 4 carries the panel's PIN 20 signal and goes to D23 on GPIO23. Pin 3 is unknown, while pin 2 is the SWIM line and pin 1 is the reset line. The table is worth reading literally, because the two data lines are named TX and RX on both sides of the table and a swap will not produce a working link. The implementation was written for the ESP32 nodemcu but is described as easy to adapt to other boards, and the substitutions named for that purpose are tx_pin, rx_pin and screen_pin. The guide also suggests an RJ45 adapter board if you would rather not solder directly onto the cable.
Pass-through for a control box with one port
Not every desk has the luxury of a second RJ45 socket, and the second package in the tree deals with exactly that case. The ESPHome Pass-through configuration is for desks which have only one RJ45 port, and it works by connecting the RJ45 of the keypad to the pins of the ESP32 rather than replacing the connection. The wiring changes accordingly. The desk transmit line on pin 6 goes to the ESP32 RX0 on GPIO3, the desk receive line on pin 5 goes to RX2, and the supply on pin 8 and ground on pin 7 are split, meaning each of those lines connects to the ESP32 pin, the desk controller and the keypad at the same time. The SWIM and reset lines on pins 2 and 1 are passed straight through between the controller and the keypad, and PIN 20 is not required in this arrangement. The current implementation does not use PIN 20, although the README notes it could be used to sense whether the screen is on.
ESPHome packages, and an archive of earlier versions
The delivery mechanism is configuration rather than firmware source, which is the right choice for a project that has to be adapted to different boards. The tree has an ESPHome package that controls the desk through an ESP32 module connected to Home Assistant and can be adapted to ESP8266 or another ESP32 variant, and a second ESPHome Pass-through package for the single port case described above. The README points you at the ESPHome documentation for the basics and offers the provided YAML as a boilerplate for your own implementation. Earlier work is kept in an archive directory, which covers the v1 packages, meaning Arduino, Raspberry Pi, older ESPHome packages and different pin-outs, so a builder who used the first version of this project can still find the wiring they had. The repository also ships a components/ directory, tests/ and a pyproject.toml, so the configuration is treated as something that can be checked rather than a loose file.
The tooling is Python even though the firmware is configuration
The repository is described as a C++ project, and the language tag reflects the Arduino heritage of the original approach, but the tooling you actually run is Python. The project metadata names the distribution loctekmotion-iot, requires Python 3.11 or newer, and declares no runtime dependencies at all, with everything in the development group:
[dependency-groups]
dev = [
"esphome==2026.6.5",
"pre-commit>=4.6.2",
"ruff>=0.16.1",
]The pinned esphome version is the one that compiles the YAML packages into firmware, which means the build of the firmware is reproducible, and pre-commit and ruff handle the repository hygiene. The lint configuration selects a broad set of rule families and ignores only the line length check:
[tool.ruff.lint]
select = [
# pydocstyle
"D",
# flake8-async
# "ASYNC",
# pycodestyle
"E",
# Pyflakes
"F",The docstring convention is set to google, which suggests the Python code here is documentation heavy, in keeping with a project whose main deliverable is instructions as much as code. There is a uv.lock for reproducible environments and a .devcontainer/ directory, so the intended development loop is a container with esphome already installed.
Hardware, enclosures and the risk warning
Because the project involves wiring into a desk's control box, the physical side is documented with some care, and the warning at the top of the README is not boilerplate. The desk controller and the keypad are both on the same low voltage side of the control box, but the guidance for anyone without electronics experience is to use an RJ45 adapter board connected with Dupont cables rather than soldering the cable directly. Two enclosure options are offered, both 3D printable. The first is a custom enclosure for an ESP32 DevKit with an Ethernet breakout, with ventilation slots to prevent overheating and a design that keeps the wiring tidy, and the model is available at makerworld.com. The second exists because the pass-through arrangement needs two RJ45 jacks, which the first case does not have, so it fits a DevKit between two RJ45 breakout boards, with the desk controller on one side and the keypad on the other, and the models directory holds the STL and the Fusion 360 source for that case. The README also has a troubleshooting section for the case where the height sensor does not report the correct value.
Editorial conclusion
LoctekMotion IoT fits a person with a Flexispot or LoctekMotion column desk who wants the height in Home Assistant, the four presets as buttons and a warning after sitting too long, and who is comfortable with a soldering iron and a USB serial console. It does not fit someone with a single RJ45 port on the control panel who does not want to rewire the keypad, since that case needs the pass-through wiring, and it does not fit a desk from another vendor whose control box speaks a different protocol. Before you start, read the pin-out table twice and check that your keypad matches it, note that the number entity may overshoot because the desk keeps moving until the reported height matches, and use the preset buttons for accurate positioning as the known issues section advises.
Frequently asked questions
What does LoctekMotion IoT do?
It documents how to connect a Flexispot or LoctekMotion standing desk to Home Assistant over the serial communication port on the control panel RJ45 socket, using an ESP32 module and ESPHome packages.
Which pins does the ESP32 connect to?
Desk TX on RJ45 pin 6 goes to the ESP32 TX2 on GPIO17, desk RX on pin 5 goes to RX2 on GPIO16, PIN 20 on pin 4 goes to D23 on GPIO23, pin 8 supplies +5V to VIN and pin 7 is ground. The tx_pin, rx_pin and screen_pin substitutions can be changed for other boards.
Can I set the desk height to a specific number in Home Assistant?
There is a number entity for height in centimetres, but it is marked experimental. The known issues section says the desk keeps moving until the height sensor matches the request, so it can overshoot, and it recommends using the preset buttons instead.
What if my desk only has one RJ45 port?
Use the ESPHome Pass-through package, which connects the keypad RJ45 to the ESP32 pins. The supply and ground are split, TX goes to GPIO3, RX to the RX2 pin, and the SWIM and reset lines pass straight through between controller and keypad.
Is LoctekMotion IoT still updated?
The repository is not archived and the last push was on 2026-10-19, and the project version in the package metadata is 1.0.0. No GitHub releases have been published.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/imicknl-loctekmotion-iot)Was this useful?