Hello everyone,
I’m sharing an external integration to control a Legrand In One lighting installation (powerline communication, “PLC”) from Gladys, via the Legrand USB interface ref. 882 13, which speaks Open Web Net.
Transparency first. I am not a developer. The code was written by Claude (Anthropic’s AI), with whom I worked step by step: capturing frames from my installation, testing in real conditions, making corrections as we went along. I validated each version on my hardware, but I am not able to review the code as a developer would. If experienced developers want to take a look and give me feedback, that’s exactly what I’m looking for: architecture, quality, questionable choices, everything is welcome. The repository is public and under Apache-2.0.
What it does
- Turns lights on and off from Gladys (dashboard, scenes, voice), with the status updated when a wall switch is pressed.
- Exposes each Legrand scenario button as a Gladys button, usable as a trigger in your scenes.
- Discovers devices on its own: just press the switches, the integration learns each circuit seen on the bus.
- “Linked devices” rules: as the In One bus never returns the status of the receivers, we describe in a few lines which lamps follow which button or which scene, and Gladys displays the correct status.
Tested hardware (my installation, 22 devices): double switch 672 02, single switch 672 01, lighting scenario switch 672 08, scenario emitter 672 80, on a Home Assistant Yellow running Gladys 5.3. The rest of the range shares the protocol but has not been tested: the on/off switches should work, the dimmers only in on/off, the shutters are not yet supported. The details are in the documentation.
Prerequisites: a small socat container that exposes the serial port of the 882 13 in TCP (a ready-to-use docker-compose.yml is in the README), as external integrations do not access USB devices.
Installation: it is in the Gladys integrations catalog, under “Legrand In One CPL”. Otherwise, via the repository URL: GitHub - XDECO/gladys-integration-legrand-inone: Unofficial Gladys Assistant integration to control Legrand In One (PLC) lights through the Legrand 882 13 USB interface. · GitHub
Known limitations: the status of the lamps is inferred (frames from the transmitters and link rules), never read on the bus; this is a limitation of the In One system, not of the integration. Version 0.4.0, tested on a single installation.
What I’m also looking for: testers with other In One modules (dimmers 672 10/12/14, shutters 672 51/55, cable outlet 674 45, auto switch 672 15). Open a ticket on the repository with a few lines from the integration log, which displays each received frame: that’s enough to add support.
The code is covered by 126 unit tests. It is not affiliated with Legrand and does not reuse anything from the Jeedom Boxio plugin.
Thanks in advance for your feedback!
For GitHub tickets: the Issues tab of the repository is active by default, people will be able to write there. If someone proposes a modification (pull request), send it to me: I will read it with you before you accept it.
