Legrand In One CPL Smart-Home-Integration, kostenlos und Open Source

Control Legrand In One (PLC) lights, dimmers and shutters through the 882 13 USB serial interface
Die Dokumentation dieser Integration wird von ihrem Autor geschrieben und ist bisher nur auf Englisch verfĂŒgbar.
Unofficial integration, not affiliated with Legrand. It controls the lights, dimmers and roller shutters of a Legrand In One (powerline, "CPL") installation from Gladys, and shows their state when someone presses a wall switch.
What you needâ
- A Legrand USB / RS232 interface, reference 882 13, plugged into the machine that runs Gladys.
- A small "serial gateway" container that exposes this USB device on a TCP port. Gladys integrations cannot access USB devices directly, so this container does it for them (see the project README for a ready-to-use
docker-compose.yml).
Setupâ
- Start the serial gateway container. By default it listens on
172.17.0.1:2000. - Install this integration and check the address and port in its settings.
- Press each wall switch once. The Legrand bus cannot list its devices, so the integration learns each circuit from the frames the switches send when they are pressed.
- Open the Discovery tab and run a scan. Each circuit seen on the bus appears as a light named
Legrand <id>-<unit>(or a shutterLegrand volet <id>-<unit>), followed in brackets by the kind of device:(inter)for a switch,(variateur)for a dimmer key,(inter volet)for a shutter switch,(inter scenario)for the on/off key of a scenario switch. This is deduced from the keys heard so far: a scenario switch whose on/off key alone was pressed first shows as(inter), then turns to(inter scenario)once one of its scene keys is heard. Create the circuits you want and rename them.
If a switch does not appear, press it again and rescan. The list of known circuits is kept across restarts.
What it doesâ
- Turns lights on and off from Gladys (dashboard, scenes, voice).
- Sets the level of dimmers (brightness 20 to 100 %, see "Dimmers").
- Raises, lowers and stops roller shutters (see "Shutters").
- Updates the state in Gladys when a wall switch is used.
- Shows each Legrand scenario button as a button in Gladys (
Legrand scenario <id>-<unit>). It clicks when the scenario is pressed on a wall key, so you can use it as a trigger in Gladys scenes. Conversely, a Gladys scene can click this button to launch the Legrand scenario (see "Launching a Legrand scenario from Gladys").
Linked devicesâ
The bus never reports the state of a receiver. When a button drives several lights (a group, a scenario), only the button sends a frame and the lights stay silent. The settings Rule 1 to Rule 12 (one rule per field) tell the integration which lights follow which button. Nothing is sent on the bus: only the state shown in Gladys is updated.
Use the circuit numbers printed in the logs (944559-1). One rule per field. If you need more than 12 rules, put several in one field, separated by ;:
648966-1 -> 944559-1, 944559-2
648966-2 -> 944559-1=on, 944559-2=off
Several rules in one field: 929520-1 -> 944561-1; 929523-1 -> 944561-1.
- With a light on the left, the lights on the right copy its state (on, off), whether it comes from a wall switch or from a command in Gladys.
- With a scenario button on the left, each light on the right takes the fixed state written after
=(onoroff).
Dimmersâ
An In One dimmer (672 10, 672 12, 672 14, plug-in dimmer 672 22, DIN dimmer 036 10...) speaks the same language as a switch, plus level orders (20 to 100 % in steps of 10) and dim up / dim down orders. As soon as the integration hears a level frame on a circuit, it treats it as a dimmer: run a scan again and the Gladys device gets a brightness of 0 to 100 % next to its on/off.
- If your dimmer never sends a level frame (short presses only), list its circuit in the Dimmers setting (
944559-1, 944560-2): the brightness is added at the next scan. - From Gladys, a brightness of 0 switches off; any other value is rounded to the nearest step (1 to 24 â 20 %, 55 â 60 %). The value really sent is shown back in Gladys.
- A wall "dim up" or "dim down" key does not say the level reached: Gladys keeps the last known level.
This part follows the Open Web Net specification but has not been verified on a real dimmer yet. If you own one, a report on the GitHub repository (frames seen in the logs, result of the commands) will validate it.
Shuttersâ
An In One shutter switch (672 51, 672 55, 672 56, controls 672 53 / 672 54) sends up, down and stop orders. Each key heard appears at discovery as a shutter Legrand volet <id>-<unit> with a three-position control in Gladys: open, stop, close.
- The state shown is the last order heard or sent, not the real position: the bus does not know it.
- On a shutter switch a short press starts a full travel and a long press is for adjusting; from Gladys the integration sends the order as is. A moving shutter stops with "stop".
- Shutters take no part in the "Linked devices" rules (lights only).
This part follows the Open Web Net specification but has not been verified on a real shutter yet. Same request: if you test it, say so on the GitHub repository.
Tested hardwareâ
This integration was developed on one installation, with:
- the Legrand PLC/USB interface ref. 882 13 (seen by Linux as a BTicino "SFERA Tele Loop" USB serial device);
- double transmitter-receiver switches ref. 672 02 (two directions: top key = on, bottom key = off);
- a single transmitter-receiver switch ref. 672 01 (frames received and decoded; command from Gladys not tested);
- a lighting scenario switch ref. 672 08 (on/off keys + two scenario keys);
- a scenario transmitter ref. 672 80 (four scenario keys);
- Gladys Assistant 5.3 on a Home Assistant Yellow (64-bit ARM).
How to read the devices in Gladysâ
In the In One system every product has a unique identifier, and every receiver learns the transmitters that drive it (LEARN key). Only transmitter orders travel on the bus: "direction 1 of transmitter 944559 says on". The receivers that learned this transmitter react, silently.
So a device Legrand 944559-1 in Gladys is a transmitter key (identifier 944559, direction 1), not a lamp. Driving it from Gladys is like pressing that key: every receiver that learned it reacts. This is why a transmitter learned by several receivers switches several lamps, and why the state of a receiver can never be read: it does not exist on the bus. The Linked devices setting describes these associations so that Gladys shows the right state.
References of the In One PLC rangeâ
From the Céliane technical guide. Only the four references above were tested; for the others the "Expected" column says what the protocol suggests, without verification. Since version 0.6.0 the whole PLC range for lighting, dimming and shutters is covered by the code: only testers are missing.
Lighting
| Reference | Product | Expected |
|---|---|---|
| 672 01 | Single transmitter-receiver switch 2,500 W | Tested for reception; command expected to work like the 672 02 |
| 672 02 | Double transmitter-receiver switch 2 Ă 1,000 W | Tested |
| 672 03 / 672 04 | Single / double switch with indicator | Like 672 01 / 672 02: should work (the indicator is local, nothing on the bus) |
| 672 08 | Lighting scenario switch (on/off + 2 scenarios) | Tested |
| 672 15 | Automatic switch 1,000 W (motion detector) | Should send on/off orders like a switch |
| 672 10 / 672 12 / 672 14, 036 10 | Dimmers 300 W, 600 W and DIN dimmer 1,000 W | On/off + brightness 20â100 % (see "Dimmers"); to be verified |
| 672 22 | Plug-in dimmer receiver | Like a dimmer; to be verified |
| 882 03 | Plug-in dimmer 500 W | Like a dimmer; to be verified |
| 882 00, 882 01, 882 15, 882 20 | Infrared/radio remotes and scenario controls | No: they do not use the PLC bus, except through a PLC/IR receiver that relays |
Scenarios
| Reference | Product | Expected |
|---|---|---|
| 672 80 | Scenario transmitter (4 scenarios) | Tested |
| 672 84 | Touch-screen scenario manager | Its scenarios should show up as buttons; not verified |
Roller shutters and blinds
| Reference | Product | Expected |
|---|---|---|
| 672 51 / 672 55 / 672 56 | Individual shutter switch (plain, with override, with programmable level) | Up / down / stop (see "Shutters"); to be verified |
| 672 53 / 672 54 | Central control / group control (4 zones) | Each key should appear as a shutter; to be verified |
| 672 62 | Radio central shutter switch | No: radio, unless relayed by the PLC/RF interface 036 06 |
Heating, detectors, interfaces: thermostats 674 40 / 674 42, cable outlet 674 45, local override 674 48, programmer 674 49, detectors 675 22 / 675 23 / 675 24, interfaces 036 06 / 036 07 / 036 18 â outside the scope of this integration. Filters 882 12 / 882 21 / 882 23 are passive accessories.
If you test one of these references, say so on the project's GitHub repository: the table will be updated.
Sending commandsâ
The 882 13 interface sends one command at a time on the power line and refuses one that arrives while it is still sending the previous one. The integration therefore sends commands one by one: it waits for the interface's answer (accepted or refused), then a short pause, before the next, and sends a refused command again up to three times. A command that is refused every time is reported as failed in Gladys, and the state shown does not change. A scene that drives ten lamps thus takes a few seconds.
Launching a Legrand scenario from Gladysâ
In a Gladys scene, add the "Control device" action, pick Legrand scenario <id>-<unit> and click the button. The integration sends one single frame on the power line (*25*11*#<address>##): the receivers that learned this scenario do the rest. It costs one frame whatever the number of lamps, which makes it the right way to switch many lamps on or off at once.
- A scenario that was not programmed on any receiver does nothing.
- Pressing the wall key only listens: the integration never sends anything in answer to a received frame.
- A scenario launched from Gladys does not click back in Gladys (no loop with a scene triggered by the same button). Linked devices are updated in Gladys as for a wall press.
- Scenario devices created with a version older than 0.5.0 are read-only: delete them in Gladys and run a discovery again so that they can be clicked.
Limits of this versionâ
- The bus never reports the real state of a receiver. The state shown in Gladys is deduced from the frames and from the commands sent, so it can drift (for example after a Legrand scenario that switches lights off). A command from Gladys always puts it back in line.
- To keep Gladys up to date after a Legrand scenario, use linked devices (rule
scenario -> light=on). - Dimmers and shutters: written from the Open Web Net specification, not yet verified on hardware. A dimmer level is only known after a level frame; a shutter position is never known (only the last order is).
- Scenarios can be launched but not programmed from Gladys: the receivers must have learned them (Legrand procedure).
Konfigurationseinstellungenâ
Diese Einstellungen fragt Legrand In One CPL in seinem Konfigurationsbildschirm in Gladys ab.
| Einstellung | Typ | Pflichtfeld | Beschreibung |
|---|---|---|---|
| Serial gateway address | string | Ja | |
| Serial gateway TCP port | number | Ja | |
| Dimmers | string | Nein | Circuits of dimmer keys (672 10, 672 12, 672 14, 672 22, 036 10...), separated by commas, so Gladys gets a brightness for them: e.g. 944559-1, 944560-2. A circuit that sends a level frame is recognised on its own; this field is for the others. Not yet verified on hardware: feedback welcome. |
| Linked devices | section | Nein | The bus never reports the state of a receiver. Each rule below tells which lights follow a button, in Gladys only (nothing is sent on the bus). Use the circuit numbers printed in the logs. A light on the left: the lights on the right copy its state, e.g. 648966-1 -> 944559-1, 944559-2. A scenario button on the left: give each light its state, e.g. 648966-3 -> 944559-1=off, 944559-2=off. More than 12 rules? Put several in one field, separated by ; |
| Rule 1 | string | Nein | |
| Rule 2 | string | Nein | |
| Rule 3 | string | Nein | |
| Rule 4 | string | Nein | |
| Rule 5 | string | Nein | |
| Rule 6 | string | Nein | |
| Rule 7 | string | Nein | |
| Rule 8 | string | Nein | |
| Rule 9 | string | Nein | |
| Rule 10 | string | Nein | |
| Rule 11 | string | Nein | |
| Rule 12 | string | Nein |
So installierst du Legrand In One CPL in Gladysâ
- Ăffne in Gladys Integrationen: Legrand In One CPL erscheint im Katalog neben den nativen Integrationen, mit einem Community-Badge.
- Klicke auf Installieren. Gladys lÀdt das Docker-Image (
ghcr.io/xdeco/gladys-integration-legrand-inone:0.6.0) herunter, startet es in einer vom Kern isolierten Sandbox und erzeugt die OberflĂ€che der Integration (GerĂ€te, Erkennung und Konfiguration). - Ăffne den Bildschirm Konfiguration der Integration, fĂŒlle die Einstellungen aus und speichere.
- Du kannst sie auch direkt ĂŒber die URL ihres Repositorys installieren: https://github.com/XDECO/gladys-integration-legrand-inone.
Legrand In One CPL benötigt Gladys >=4.86.0. Der Katalog in Gladys wird stĂŒndlich aktualisiert, eine neue Version ist also spĂ€testens eine Stunde nach ihrer Veröffentlichung verfĂŒgbar.
Du nutzt Gladys noch nicht? Es ist kostenlos und Open Source: folge der Installationsanleitung, um loszulegen.
Ăber externe Integrationenâ
Legrand In One CPL ist eine externe Integration: eine Community-Integration, die als Docker-Container verpackt und auf GitHub veröffentlicht wird. Gladys installiert sie mit einem Klick und fĂŒhrt sie in einer vom Kern isolierten Sandbox aus. Sie wird von XDECO veröffentlicht und gepflegt, nicht vom Gladys-Kernteam.
- Alle Integrationen durchsuchen, native und aus der Community
- Deine eigene externe Integration bauen und veröffentlichen
- Quellcode auf GitHub â Quelle dieser Dokumentation