ZigBeeForDomoticZ plugin Wiki

Legrand / Netatmo corner

Tips for the Legrand devices “with Netatmo” (Céliane, Mosaic, Dooxie…).

A big thanks to @fgrimaldi, who contributed heavily to this work, and to @Thorgal789. Most of what is known comes from sniffing the Zigbee traffic between the Legrand hub and the devices, and from trial and error.

Before you start

Devices

Known to work:

Not working:

Pairing

  1. Remove the device cover to reach the factory-reset hole or button (don’t confuse it with the LED).
  2. Open the network for pairing (see Add a new device).
  3. Press and hold the reset button:
    • after a few seconds the LED flashes green/red (keep pressing);
    • after about 8 seconds it flashes red: release, and click the reset button once more;
    • when the LED turns green, the pairing is done.

Alternative: when the LED is red (not paired), press the reset button until the LED flashes green 3 times; when the LED comes back to red, click the reset button once.

While the network is open for pairing, the LED of the Legrand devices is green.

If a device has trouble joining, enable the LegrandCompatibilityMode setting (Settings > Pairing settings): the plugin then answers the Legrand devices like the Legrand hub does (operating time, attribute 0x0000/0xf000, see How the pairing works).

Device parameters

The Legrand options are device parameters, set per device in Management > Device Management, parameter editor (see Device parameters). They replace the old global settings EnableLedIfOn, EnableLedInDark, EnableDimmer…

Parameter Use Devices
netatmoLedIfOn 1: the LED is on (blue) when the device is on Connected outlet, mobile outlet, dimmer switch without neutral, shutter switch with neutral, micromodule switch
netatmoLedInDark 1: the LED is on when the device is off, to find it in the dark Same as above
netatmoLedShutter 1: LED of the shutter switch Shutter switch with neutral
netatmoEnableDimmer 1: enable the dimmer of the switch without neutral Dimmer switch without neutral
netatmoInvertShutter 1: invert open and close Shutter switch
netatmoReleaseButton 1: report the button release of the remotes Remote switches

Commanding devices directly

A Legrand remote switch can command a micromodule or a switch directly, without Domoticz: see Bind two devices, which uses the double gang remote and the micromodule as its example. The Remote Shutter doesn’t accept bindings.

Using a remote with a group

A Legrand remote switch is never a member of a Zigbee group: it has no Groups cluster, and it sends commands rather than receiving them. So it doesn’t appear in Management > Group Management, even with GroupOnBattery enabled. Instead, the remote is given a group address, and it sends its on, off and dimming commands to that group.

The plugin does this when the remote is paired. The remote asks for a group, and the plugin gives it one from a reserved range, starting at fefe and going down (fefd, fefc…). A double gang remote gets one group per gang. The plugin also creates the group widget in Domoticz, named Zigate Group fefe (with the group’s own address).

To have the remote command your lights:

  1. Pair the remote (see Pairing).
  2. Go to Management > Group Management (see Manage Zigbee groups). The group Zigate Group fefe is listed with no device selected: the remote itself isn’t shown, which is expected.
  3. Add the lights or switches the remote must command, and rename the group if you want.
  4. Click Validate.

The devices of the group now follow the remote directly, without going through Domoticz.

Notes:

Notes from the ZiGate era

These findings were made with a ZiGate coordinator and haven’t been checked with other coordinators:

Internals (protocol notes)

How the Pairing works

Wireless devices

Analysis of Double gangs remote switch

Scenes

Groups when pairing a remote with a wired devices

Wired devices

Plug-in Unit: Connected outlet

  1. Add Group 0xfff7
    1. Add SceneId 0x01 / Cluster 0x0006
  2. Add Group 0xfff5
    1. Add SceneId 0x01 / Cluster 0x0006
  3. Bind Cluster 0x0006
  4. Configure Report 0x0006 / 0x0001
  5. Bind Cluster 0x0b04
  6. Configure Report 0x0b04 / 0x050b
  7. Bind Cluster 0x0003

Micromodule: Micromodule switch

  1. Add Group 0xfff6
    1. Add Scene 0x01 / Cluster 0x0006
  2. Add Group 0xfff4
    1. Add Scene 0x01 / Cluster 0x0006
  3. Bind 0x0006
  4. Configure Report 0x0006 / 0x0001
  5. Bind 0x000f
  6. Bind 0x0003

Inter w/o neutral: Dimmer switch w/o neutral

  1. Add Group 0xfff6
    1. Add Scene 0x01 / Cluster 0x0006
    2. Add Scene 0x01 / Cluster 0x0008
  2. Add Group 0xfff4
    1. Add Scene 0x01 / Cluster 0x0006
    2. Add Scene 0x01 / Cluster 0x0008
  3. Bind 0x0006
  4. Configure Report 0x0006 / 0x0001 (Bind and Configure Reporting on 0x0008, will be done when enabling dimmer)
  5. Bind 0x000f
  6. Bind 0x0003

Shutter: Shutter switch with neutral

  1. Bind 0x000f
  2. Bind 0x0003
  3. Configure Report 0x0102
Commands

Status return ( 0xff: Open, 0x00: Closed, 0x50: in between ) Ad Hoc status can be obtain by a read Attribute

Other findings and decoding

Attributes

Suite à Device Annoucement after Power Off/On

After a main Power Off, On, the device is sending a Device Annoucement , in response the Legrand HUB is sending a Wrte Attribute No Response in Broadcast

Cluster 0x0003

__ATTENTION WIP / UNDER INVESTIGATIONS __

Command: 0x40

Cluster 0xfc01

Device Attribute Values Data Type
Dimmer switch w/o neutral 0x0000 0x0101/0x0000 enable/disbale Dimmer mode ( cluster 0x0008 should be binded) 0x09 (16bit data)
Dimmer switch w/o neutral 0x0001 0x01/0x00 enable/disbale Led in Dark 0x10 ( Bool )
Dimmer switch w/o neutral 0x0002 0x01/0x00 enable/disable Led if On 0x10
Connected outlet 0x0002 0x01/0x00 enable/disable Led if On 0x10
Shutter switch with neutral 0x0001 0x01/0x00 enable/disable Led if On 0x10
Fil Pilote 0x0000 0x0001/0x0002 enable/disable fil pilote 0x0x09 (16 bit data)

__ATTENTION WIP / UNDER INVESTIGATIONS __

Comamnd: 0x02
Command: 0x03
Command: 0x05 (wireless switch)
Command: 0x08 set group id (wireless single remote)
Commande: 0x09 (Checked)
Command: 0x0a
Commande: 0x0c set group id (wireless double remote)
Command: 0x0d
Command: 0x10

Cluster 0xfc40

Attribute Heating Mode Value Data Type
0x0000 Confort 0x00 0x30 (Enum8)
  Contort -1 0x01 0x30 (Enum8)
  Confort -2 0x02 0x30 (Enum8)
  Eco 0x03 0x30 (Enum8)
  Hors Gel 0x04 0x30 (Enum8)
  Off 0x05 0x30 (Enum8)

Specific Commands

Cluster Command Data Type Data Value Description
0xfc01 0x02 1 byte 0x00  

OTA

OTA Code Manuf Code Image Type Product Size (B.) App. Rel. App Build Stack Rel. Stack Build
NLF 0x1021 0x000e (14) Switch w/o neural 229319 0 43 0 0
NLM 0x1021 0x0010 (16) Micromodule 221655 0 32 0 0
NLP 0x1021 0x0011 (17) Hub Plug   0 35 0 0
NLP 0x1021 0x0011 (17) Mobile outlet     35 0 0
NLP 0x1021 0x0011 (17) Connected outlet     35 0 0
NLT 0x1021 0x0012 (18) Main Remote   0 33 0 0
NLV 0x1021 0x0013 (19) Shutter   0 43 0 0
NLD 0x1021 0x0016 (22) Double Remote Switch   0 6 0 0
  0x1021   Remote Shutter     18    
NLC 0x1021 0x0015 (21) Cable outlet     10    

More informations/scripts …. can be found here: https://github.com/pipiche38/Capture-OTA-from-Wireshark

Pairing mechanism

The HUB seems in addition of having Time Server, seems to store in the 0x0000/0xf000 the time since the HUB has been powered on. This attribute server as of time of operation. At Pairing, the HUB is broadcasting this value to other devices, and the up coming devices is requesting this attribute also from the oher already connected devices. The Operating time ( 0x0000/0xf000) is reset to 0 after Power Off/On

Reference