Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request Device Support ] Legrand / BTicino Netatmo device #883

Closed
Smanar opened this issue Oct 18, 2018 · 701 comments
Closed

[Request Device Support ] Legrand / BTicino Netatmo device #883

Smanar opened this issue Oct 18, 2018 · 701 comments

Comments

@Smanar
Copy link
Collaborator

Smanar commented Oct 18, 2018

Hi, I have a new device who works strangely, All seems good, but the led on the device stay red (go off on normal full commissioning) and on deconz it go to yellow then red.
It's a device from the netatmo gamme from Legrand https://www.netatmo.com/partners/legrand. Called Mosaic, Celiane, Dooxie or Valena.
I m making my test with the switch without neutral (legrand 600081) , see as light and not switch (I think it's normal because it control light on/off+ dimmer)

basicattribute
cluster
nodeinfo

IDK if there is a special protection or not, I can send a complete sniff make with ubiqua from the power on to the final led change make with the offciel centrale. Here a sample
snif

I take all propositions and ideas.
BTW I have some others questions:

  • The firmware is closed or open source ?
  • How I can send custom command like for read a special attribute on an unknow cluster ?
@Smanar
Copy link
Collaborator Author

Smanar commented Oct 20, 2018

I have make a second try with sniffing with conbee key, and there is a lot of missing request.

zigbeeprotocol

Missing:
Request key B
Transport key B
Verify key B
Confirm key

Mgmt permit join request is not send by the device too after the key echange.

snif2

Do I need to enable master key in option, but how (not supported in the release ?)?

@manup
Copy link
Member

manup commented Oct 20, 2018

Looks like the communication and security is alright since there is some exchange of messages on ZDP level.

But the switch leaves the network for some reason, so I guess it waited for specific commands or configuration (binding?). Question is which :)

@Smanar
Copy link
Collaborator Author

Smanar commented Oct 20, 2018

Yep, but on the first "sniff" (this one with the official central) there is only classic request, so I think the specific expected command isn't an exotic command like a manufactured one.
But not using the 2 keys echange can be the problem, and it seems it s not implemented in this version yet. ATM Deconz only use a light key echange protocol.

For information, if you use this device out of the box, it works without problems, but with less functionnalities, you need to update it (with the central), but after the update it stops working.

On the application options, I m seeing a "master key" option, not implemeted yet, you know what is it ?

Here a screenshoot for the first sniff with filter on the good device with the official central. Easier to compare.
snifclean

@manup
Copy link
Member

manup commented Oct 20, 2018

They key and security setup is really finished here with the transport key command, a tunnel command would only be used if there was a router in between. deCONZ firmware has only enabled NWK layer security, APS layer security isn't used in ZLL/HA applications, albeit possible I wouldn't expect the switch to require APS layer security.

The two nodes wouldn't be able to exchange the further messages like node descriptor and the like if security wasn't established.

Therefore it would be interesting which messages the original central and the switch exchange after the key exchange, any bindings or read write attributes?

@Smanar
Copy link
Collaborator Author

Smanar commented Oct 21, 2018

I m comparing the 2 captures and I can say

  • the device leave 15 s after the association request on ConBee

  • On the both capture we have
    -- device announce
    -- Node descriptor request+Response

  • Only on the working
    -- Basic read attribute request+response
    -- Match descriptor request+response
    -- IEE address + response
    -- OTA upgrade request+response
    -- A message permit join request ( ? but it s from device to central so useless I think)
    -- Add group/scene
    -- Bind request+response (20s after the association request so I have stoped here)

  • Only on the no working
    -- Active Endpoint request+response
    -- Management lqi request+response
    -- Simple descriptor request+response

On the layer NWK, on the working mode We have
link status centrale > broadcast
Route request 0x270F centrale > broadcast
Route request 0x270F all devices> broadcast

I will make some tries with more request with conbee and forcing some commands like ota or attribute read.

@manup
Copy link
Member

manup commented Oct 21, 2018

-- Add group/scene
-- Bind request+response (20s after the association request so I have stoped here)

These are the ones I meant :) the switch might wait for this configuration to be done.
Can you please provide the sniffed details of these requests?

@Smanar
Copy link
Collaborator Author

Smanar commented Oct 21, 2018

[17:35:55.389280]	Groups: Add Group	61-88-84-AD-DA-86-BD-00-00-48-02-86-BD-00-00-14-62-28-2B-00-11-00-58-32-18-00-00-74-04-00-00-B3-03-43-A9-EA-9E-54-BA-25-28-02-9E-19-E6-9D-07-8F-1E-D4-36
Frame Information: (51 bytes)
	Packet ID: 219
	Protocol: ZigBee
	Date: 2018/09/26
	Timestamp: 17:35:55.389280
	Time Delta: 0.178480
	Channel: 11
	Length: 51
	RSSI: -60 dBm
	Source: COM8: NXP JN51xx / Rainforest Toucan@1000000
	Layer: ZCL
	Status: Decrypted
MAC Header: (9 bytes)
	Frame Control: 0x8861
		···· ···· ···· ·001 = Frame Type: [0x1] Data
		···· ···· ···· 0··· = Security Enabled: [0x0] No
		···· ···· ···0 ···· = Frame Pending: [0x0] No
		···· ···· ··1· ···· = Acknowledgement Request: [0x1] Yes
		···· ···· ·1·· ···· = Intra-PAN: [0x1] Yes
		···· ··00 0··· ···· = Reserved: 0x0
		···· 10·· ···· ···· = Destination Addr Mode: [0x2] 16-bit Short Address
		··00 ···· ···· ···· = Reserved: 0x0
		10·· ···· ···· ···· = Source Addr Mode: [0x2] 16-bit Short Address
	Sequence Number: 132
	Destination PAN ID: 0xDAAD
	Destination Address: 0xBD86
	Source Address: 0x0000
MAC Payload: (40 bytes)
	NWK Header: 0x62140000BD860248
		Frame Control: 0x0248
			···· ···· ···· ··00 = Frame Type: [0x0] Data
			···· ···· ··00 10·· = Protocol Version: [0x2] ZigBee Pro
			···· ···· 01·· ···· = Route Discovery: [0x1] Enabled
			···· ···0 ···· ···· = Multicast Flag: [0x0] Unicast or Broadcast
			···· ··1· ···· ···· = Security Enabled: [0x1] Yes
			···· ·0·· ···· ···· = Source Route Included: [0x0] No
			···· 0··· ···· ···· = Destination IEEE Address Included: [0x0] No
			···0 ···· ···· ···· = Source IEEE Address Included: [0x0] No
			··0· ···· ···· ···· = End Device Initiator: [0x0] No
			00·· ···· ···· ···· = Reserved: 0x0
		Destination Address: 0xBD86
		Source Address: 0x0000
		Radius: 0x14
		Sequence Number: 98
	NWK Aux Header: (14 bytes)
		Network Security Control: 0x28
			···· ·000 = Network Security Level: [0x0] None
			···0 1··· = Key NWK ID: [0x1] Network Key
			··1· ···· = Extended Nonce: [0x1] Yes
			00·· ···· = Reserved: 0x0
		NWK Frame Counter: 1114155
		Source Address: 00:04:74:00:00:18:32:58
		NWK Key Sequence Number: 0
	NWK Payload: (14 bytes)
		APS Header: 0x9401010400040140
			Frame Control: 0x40
				···· ··00 = Frame Type: [0x0] Data
				···· 00·· = Delivery Mode: [0x0] Normal Unicast Delivery
				···0 ···· = Acknowledgement Format: 0x0
					Format: [0x0] Data Frame
				··0· ···· = Security Enabled: [0x0] No
				·1·· ···· = Acknowledgement Request: 0x1
					Request: [0x1] Yes
				0··· ···· = Extended Header Present: [0x0] No
			Destination Endpoint: 0x01
			Cluster ID: [0x0004] General: Groups
			Profile ID: [0x0104] ZigBee Home Automation
			Source Endpoint: 0x01
			APS Counter: 148
		APS Payload: 0x00FFF6000711
			ZCL Header: 0x000711
				Frame Control: 0x11
					···· ··01 = Frame Type: [0x1] Command is Specific to a Cluster
					···· ·0·· = Manufacturer Specific: [0x0] Manufacturer Code Not Included in the ZCL Frame
					···· 0··· = Direction: [0x0] From Client to Server
					···1 ···· = Disable Default Response: [0x1] Yes
					000· ···· = Reserved: 0x0
				Transaction Sequence Number: 7
				Command ID: [0x00] Add Group
			ZCL Payload: 0x00FFF6
				Group ID: 0xFFF6
				Group Name: 0x00
					Length: [0] Empty String
	NWK MIC: 0x88A3970D
MAC Footer: 0x36D4
	Frame Check Sequence: 0x36D4
[17:35:58.683792]	Bind Request	61-88-90-AD-DA-86-BD-00-00-48-02-86-BD-00-00-14-6D-28-37-00-11-00-58-32-18-00-00-74-04-00-00-5F-76-21-97-9E-63-8E-72-D7-C7-9F-1E-F1-5C-02-2A-9D-B2-E5-64-3A-4A-6B-C8-5C-E3-CA-E3-EA-37-58-C9-36-B8-83-41
Frame Information: (67 bytes)
	Packet ID: 272
	Protocol: ZigBee
	Date: 2018/09/26
	Timestamp: 17:35:58.683792
	Time Delta: 0.690560
	Channel: 11
	Length: 67
	RSSI: -60 dBm
	Source: COM8: NXP JN51xx / Rainforest Toucan@1000000
	Layer: ZDP
	Status: Decrypted
MAC Header: (9 bytes)
	Frame Control: 0x8861
		···· ···· ···· ·001 = Frame Type: [0x1] Data
		···· ···· ···· 0··· = Security Enabled: [0x0] No
		···· ···· ···0 ···· = Frame Pending: [0x0] No
		···· ···· ··1· ···· = Acknowledgement Request: [0x1] Yes
		···· ···· ·1·· ···· = Intra-PAN: [0x1] Yes
		···· ··00 0··· ···· = Reserved: 0x0
		···· 10·· ···· ···· = Destination Addr Mode: [0x2] 16-bit Short Address
		··00 ···· ···· ···· = Reserved: 0x0
		10·· ···· ···· ···· = Source Addr Mode: [0x2] 16-bit Short Address
	Sequence Number: 144
	Destination PAN ID: 0xDAAD
	Destination Address: 0xBD86
	Source Address: 0x0000
MAC Payload: (56 bytes)
	NWK Header: 0x6D140000BD860248
		Frame Control: 0x0248
			···· ···· ···· ··00 = Frame Type: [0x0] Data
			···· ···· ··00 10·· = Protocol Version: [0x2] ZigBee Pro
			···· ···· 01·· ···· = Route Discovery: [0x1] Enabled
			···· ···0 ···· ···· = Multicast Flag: [0x0] Unicast or Broadcast
			···· ··1· ···· ···· = Security Enabled: [0x1] Yes
			···· ·0·· ···· ···· = Source Route Included: [0x0] No
			···· 0··· ···· ···· = Destination IEEE Address Included: [0x0] No
			···0 ···· ···· ···· = Source IEEE Address Included: [0x0] No
			··0· ···· ···· ···· = End Device Initiator: [0x0] No
			00·· ···· ···· ···· = Reserved: 0x0
		Destination Address: 0xBD86
		Source Address: 0x0000
		Radius: 0x14
		Sequence Number: 109
	NWK Aux Header: (14 bytes)
		Network Security Control: 0x28
			···· ·000 = Network Security Level: [0x0] None
			···0 1··· = Key NWK ID: [0x1] Network Key
			··1· ···· = Extended Nonce: [0x1] Yes
			00·· ···· = Reserved: 0x0
		NWK Frame Counter: 1114167
		Source Address: 00:04:74:00:00:18:32:58
		NWK Key Sequence Number: 0
	NWK Payload: (30 bytes)
		APS Header: 0x9800000000210000
			Frame Control: 0x00
				···· ··00 = Frame Type: [0x0] Data
				···· 00·· = Delivery Mode: [0x0] Normal Unicast Delivery
				···0 ···· = Acknowledgement Format: 0x0
					Format: [0x0] Data Frame
				··0· ···· = Security Enabled: [0x0] No
				·0·· ···· = Acknowledgement Request: 0x0
					Request: [0x0] No
				0··· ···· = Extended Header Present: [0x0] No
			Destination Endpoint: 0x00
			Cluster ID: [0x0021] Bind Request
			Profile ID: [0x0000] ZigBee Device Profile
			Source Endpoint: 0x00
			APS Counter: 152
		APS Payload: (22 bytes)
			ZDP Transaction Sequence Number: 3
			Bind Request: (21 bytes)
				Source Address: 00:04:74:00:00:7A:26:66
				Source Endpoint: 0x01
				Cluster ID: 0x0006
				Destination Address Mode: [0x03] Direct 64-bit Addr Mode and EP
				Destination Address: 00:04:74:00:00:18:32:58
				Destination Endpoint: 0x01
	NWK MIC: 0xCC37210B
MAC Footer: 0x4183
	Frame Check Sequence: 0x4183

[17:35:58.703167]	Bind Response	61-88-91-AD-DA-00-00-86-BD-48-02-00-00-86-BD-14-FE-28-21-00-1C-00-66-26-7A-00-00-74-04-00-00-61-C7-2E-27-6B-4C-73-5C-9E-88-A7-5B-4D-18-66-B7
Frame Information: (47 bytes)
	Packet ID: 274
	Protocol: ZigBee
	Date: 2018/09/26
	Timestamp: 17:35:58.703167
	Time Delta: 0.016848
	Channel: 11
	Length: 47
	RSSI: -60 dBm
	Source: COM8: NXP JN51xx / Rainforest Toucan@1000000
	Layer: ZDP
	Status: Decrypted
MAC Header: (9 bytes)
	Frame Control: 0x8861
		···· ···· ···· ·001 = Frame Type: [0x1] Data
		···· ···· ···· 0··· = Security Enabled: [0x0] No
		···· ···· ···0 ···· = Frame Pending: [0x0] No
		···· ···· ··1· ···· = Acknowledgement Request: [0x1] Yes
		···· ···· ·1·· ···· = Intra-PAN: [0x1] Yes
		···· ··00 0··· ···· = Reserved: 0x0
		···· 10·· ···· ···· = Destination Addr Mode: [0x2] 16-bit Short Address
		··00 ···· ···· ···· = Reserved: 0x0
		10·· ···· ···· ···· = Source Addr Mode: [0x2] 16-bit Short Address
	Sequence Number: 145
	Destination PAN ID: 0xDAAD
	Destination Address: 0x0000
	Source Address: 0xBD86
MAC Payload: (36 bytes)
	NWK Header: 0xFE14BD8600000248
		Frame Control: 0x0248
			···· ···· ···· ··00 = Frame Type: [0x0] Data
			···· ···· ··00 10·· = Protocol Version: [0x2] ZigBee Pro
			···· ···· 01·· ···· = Route Discovery: [0x1] Enabled
			···· ···0 ···· ···· = Multicast Flag: [0x0] Unicast or Broadcast
			···· ··1· ···· ···· = Security Enabled: [0x1] Yes
			···· ·0·· ···· ···· = Source Route Included: [0x0] No
			···· 0··· ···· ···· = Destination IEEE Address Included: [0x0] No
			···0 ···· ···· ···· = Source IEEE Address Included: [0x0] No
			··0· ···· ···· ···· = End Device Initiator: [0x0] No
			00·· ···· ···· ···· = Reserved: 0x0
		Destination Address: 0x0000
		Source Address: 0xBD86
		Radius: 0x14
		Sequence Number: 254
	NWK Aux Header: (14 bytes)
		Network Security Control: 0x28
			···· ·000 = Network Security Level: [0x0] None
			···0 1··· = Key NWK ID: [0x1] Network Key
			··1· ···· = Extended Nonce: [0x1] Yes
			00·· ···· = Reserved: 0x0
		NWK Frame Counter: 1835041
		Source Address: 00:04:74:00:00:7A:26:66
		NWK Key Sequence Number: 0
	NWK Payload: (10 bytes)
		APS Header: 0xD900000080210000
			Frame Control: 0x00
				···· ··00 = Frame Type: [0x0] Data
				···· 00·· = Delivery Mode: [0x0] Normal Unicast Delivery
				···0 ···· = Acknowledgement Format: 0x0
					Format: [0x0] Data Frame
				··0· ···· = Security Enabled: [0x0] No
				·0·· ···· = Acknowledgement Request: 0x0
					Request: [0x0] No
				0··· ···· = Extended Header Present: [0x0] No
			Destination Endpoint: 0x00
			Cluster ID: [0x8021] Bind Response
			Profile ID: [0x0000] ZigBee Device Profile
			Source Endpoint: 0x00
			APS Counter: 217
		APS Payload: 0x0003
			ZDP Transaction Sequence Number: 3
			Bind Response: 0x00
				Status: [0x00] Success
	NWK MIC: 0x29D5EE27
MAC Footer: 0xB766
	Frame Check Sequence: 0xB766

Hu !
I m seing something, (the device have the adress BD86) so it's the device itself who ask for "basic read attribute" (Request n 159) to the device router, not the coordinator. And this request is make in the first trame, so perhpas the blocking request is just between the commissioning frame (Request n 96 ) and this one.
In fact in normal mode the device is more active.

I have others devices ikea bulb, usb device, there is a way to force the installation to work like the original one ? In fact the central have a buildin device inside, it s 'not possible to use the original central without the router, the prb is perhaps from here.

I can send you the captured packet in ubiqua format if you have a public email ? But there is too much differences betwen the working mode with and without router.

@Smanar
Copy link
Collaborator Author

Smanar commented Oct 21, 2018

Yeah ^^.
I have make a try with an ikea bulb as router, and It works ^^, at least the on/off, not the dimmer but on normal usage you need to enable this option with application.

I will post a sniff soon.

@Smanar
Copy link
Collaborator Author

Smanar commented Oct 21, 2018

workingsniff

The sniff during a working process with Deconz. I can 't explain what happen, the device try 1 time, leave , retry and it works.
But on the same sniff, I have a working try and a not working. I can send the file if you have an email to send it.

Now New try with the centrale to get all the special command to enable led and dimmer.

@Smanar
Copy link
Collaborator Author

Smanar commented Oct 21, 2018

Now I need help, this is the missing cluster/attribute I need to control it, can you say me witch one files I can edit to make it working ? Do I need to make a full integration with the new manufacture too, or just add cluster ? It seem all is hard coded ?

Frame Information: (53 bytes)
	Packet ID: 13
	Protocol: ZigBee
	Date: 2018/10/21
	Timestamp: 15:31:03.061918
	Time Delta: 2.172160
	Channel: 11
	Length: 53
	RSSI: -90 dBm
	Source: COM9: NXP JN51xx / Rainforest Toucan@1000000
	Layer: ZCL
	Status: Decrypted
MAC Header: (9 bytes)
	Frame Control: 0x8861
		···· ···· ···· ·001 = Frame Type: [0x1] Data
		···· ···· ···· 0··· = Security Enabled: [0x0] No
		···· ···· ···0 ···· = Frame Pending: [0x0] No
		···· ···· ··1· ···· = Acknowledgement Request: [0x1] Yes
		···· ···· ·1·· ···· = Intra-PAN: [0x1] Yes
		···· ··00 0··· ···· = Reserved: 0x0
		···· 10·· ···· ···· = Destination Addr Mode: [0x2] 16-bit Short Address
		··00 ···· ···· ···· = Reserved: 0x0
		10·· ···· ···· ···· = Source Addr Mode: [0x2] 16-bit Short Address
	Sequence Number: 14
	Destination PAN ID: 0xDAAD
	Destination Address: 0x2EBE
	Source Address: 0x0000
MAC Payload: (42 bytes)
	NWK Header: 0x081400002EBE0248
		Frame Control: 0x0248
			···· ···· ···· ··00 = Frame Type: [0x0] Data
			···· ···· ··00 10·· = Protocol Version: [0x2] ZigBee Pro
			···· ···· 01·· ···· = Route Discovery: [0x1] Enabled
			···· ···0 ···· ···· = Multicast Flag: [0x0] Unicast or Broadcast
			···· ··1· ···· ···· = Security Enabled: [0x1] Yes
			···· ·0·· ···· ···· = Source Route Included: [0x0] No
			···· 0··· ···· ···· = Destination IEEE Address Included: [0x0] No
			···0 ···· ···· ···· = Source IEEE Address Included: [0x0] No
			··0· ···· ···· ···· = End Device Initiator: [0x0] No
			00·· ···· ···· ···· = Reserved: 0x0
		Destination Address: 0x2EBE
		Source Address: 0x0000
		Radius: 0x14
		Sequence Number: 8
	NWK Aux Header: (14 bytes)
		Network Security Control: 0x28
			···· ·000 = Network Security Level: [0x0] None
			···0 1··· = Key NWK ID: [0x1] Network Key
			··1· ···· = Extended Nonce: [0x1] Yes
			00·· ···· = Reserved: 0x0
		NWK Frame Counter: 1572954
		Source Address: 00:04:74:00:00:18:32:58
		NWK Key Sequence Number: 0
	NWK Payload: (16 bytes)
		APS Header: 0x03010104FC010100
			Frame Control: 0x00
				···· ··00 = Frame Type: [0x0] Data
				···· 00·· = Delivery Mode: [0x0] Normal Unicast Delivery
				···0 ···· = Acknowledgement Format: 0x0
					Format: [0x0] Data Frame
				··0· ···· = Security Enabled: [0x0] No
				·0·· ···· = Acknowledgement Request: 0x0
					Request: [0x0] No
				0··· ···· = Extended Header Present: [0x0] No
			Destination Endpoint: 0x01
			Cluster ID: [0xFC01] Private Cluster
			Profile ID: [0x0104] ZigBee Home Automation
			Source Endpoint: 0x01
			APS Counter: 3
		APS Payload: 0x0101090000021910
			ZCL Header: 0x021910
				Frame Control: 0x10
					···· ··00 = Frame Type: [0x0] Command Acts Across the Entire Profile
					···· ·0·· = Manufacturer Specific: [0x0] Manufacturer Code Not Included in the ZCL Frame
					···· 0··· = Direction: [0x0] From Client to Server
					···1 ···· = Disable Default Response: [0x1] Yes
					000· ···· = Reserved: 0x0
				Transaction Sequence Number: 25
				General Command Frame: [0x02] Write Attributes
			ZCL Payload: 0x0101090000
				Attribute 0: 0x0101090000
					Attribute ID: [0x0000] Reserved
					Data Type: [0x09] 16-bit Data
					Unknown Data Type: 0x0101
	NWK MIC: 0x09834125
MAC Footer: 0x5B3A
	Frame Check Sequence: 0x5B3A

Data 0101 > Enable dimmer
Data 0100 > Disable dimmer

Frame Information: (52 bytes)
	Packet ID: 97
	Protocol: ZigBee
	Date: 2018/10/21
	Timestamp: 15:37:11.730350
	Time Delta: 0.522464
	Channel: 11
	Length: 52
	RSSI: -83 dBm
	Source: COM9: NXP JN51xx / Rainforest Toucan@1000000
	Layer: ZCL
	Status: Decrypted
MAC Header: (9 bytes)
	Frame Control: 0x8861
		···· ···· ···· ·001 = Frame Type: [0x1] Data
		···· ···· ···· 0··· = Security Enabled: [0x0] No
		···· ···· ···0 ···· = Frame Pending: [0x0] No
		···· ···· ··1· ···· = Acknowledgement Request: [0x1] Yes
		···· ···· ·1·· ···· = Intra-PAN: [0x1] Yes
		···· ··00 0··· ···· = Reserved: 0x0
		···· 10·· ···· ···· = Destination Addr Mode: [0x2] 16-bit Short Address
		··00 ···· ···· ···· = Reserved: 0x0
		10·· ···· ···· ···· = Source Addr Mode: [0x2] 16-bit Short Address
	Sequence Number: 70
	Destination PAN ID: 0xDAAD
	Destination Address: 0x2EBE
	Source Address: 0x0000
MAC Payload: (41 bytes)
	NWK Header: 0x401400002EBE0248
		Frame Control: 0x0248
			···· ···· ···· ··00 = Frame Type: [0x0] Data
			···· ···· ··00 10·· = Protocol Version: [0x2] ZigBee Pro
			···· ···· 01·· ···· = Route Discovery: [0x1] Enabled
			···· ···0 ···· ···· = Multicast Flag: [0x0] Unicast or Broadcast
			···· ··1· ···· ···· = Security Enabled: [0x1] Yes
			···· ·0·· ···· ···· = Source Route Included: [0x0] No
			···· 0··· ···· ···· = Destination IEEE Address Included: [0x0] No
			···0 ···· ···· ···· = Source IEEE Address Included: [0x0] No
			··0· ···· ···· ···· = End Device Initiator: [0x0] No
			00·· ···· ···· ···· = Reserved: 0x0
		Destination Address: 0x2EBE
		Source Address: 0x0000
		Radius: 0x14
		Sequence Number: 64
	NWK Aux Header: (14 bytes)
		Network Security Control: 0x28
			···· ·000 = Network Security Level: [0x0] None
			···0 1··· = Key NWK ID: [0x1] Network Key
			··1· ···· = Extended Nonce: [0x1] Yes
			00·· ···· = Reserved: 0x0
		NWK Frame Counter: 1573010
		Source Address: 00:04:74:00:00:18:32:58
		NWK Key Sequence Number: 0
	NWK Payload: (15 bytes)
		APS Header: 0x17010104FC010100
			Frame Control: 0x00
				···· ··00 = Frame Type: [0x0] Data
				···· 00·· = Delivery Mode: [0x0] Normal Unicast Delivery
				···0 ···· = Acknowledgement Format: 0x0
					Format: [0x0] Data Frame
				··0· ···· = Security Enabled: [0x0] No
				·0·· ···· = Acknowledgement Request: 0x0
					Request: [0x0] No
				0··· ···· = Extended Header Present: [0x0] No
			Destination Endpoint: 0x01
			Cluster ID: [0xFC01] Private Cluster
			Profile ID: [0x0104] ZigBee Home Automation
			Source Endpoint: 0x01
			APS Counter: 23
		APS Payload: 0x01100001022F10
			ZCL Header: 0x022F10
				Frame Control: 0x10
					···· ··00 = Frame Type: [0x0] Command Acts Across the Entire Profile
					···· ·0·· = Manufacturer Specific: [0x0] Manufacturer Code Not Included in the ZCL Frame
					···· 0··· = Direction: [0x0] From Client to Server
					···1 ···· = Disable Default Response: [0x1] Yes
					000· ···· = Reserved: 0x0
				Transaction Sequence Number: 47
				General Command Frame: [0x02] Write Attributes
			ZCL Payload: 0x01100001
				Attribute 0: 0x01100001
					Attribute ID: [0x0001] Reserved
					Data Type: [0x10] Boolean
					Unknown Data Type: 0x01
	NWK MIC: 0xEBD68619
MAC Footer: 0xB231
	Frame Check Sequence: 0xB231

Data 01 > enable led in dark
Data 00 > disable led in dark

@Smanar
Copy link
Collaborator Author

Smanar commented Oct 23, 2018

Ok so It seem it's not hardcoded.
I have make this part in general.xml

	<cluster id="fc01" name="Legrand - Specific clusters">
		<description>Legrand Specific clusters.
		</description>
		<server>
			<attribute id="0x0000" name="Dimmer" type="dat16" default="0" access="rw" required="m">
				<value name="Disable dimmer" value="0x0100"></value>
				<value name="Enable Dimmer" value="0x0101"></value>
            </attribute>
			<attribute id="0x0001" type="bool" name="LED" required="m" access="rw" default="0"></attribute>
		</server>
		<client>
		</client>
	<!-- TODO -->
	</cluster>

It seem working, at least for LED, but I can't display the 2 options for dimmer with dat16 type, I can display values with other type (for exemple u16), but I have an error when I try to read/write, no error with dat16, but I can only read the value and I can see it nowhere.

I have tried with enum16, I can set the value, not possible to read it, but after close/open the dialog sa issue, read come possible but nothing to see, except the message "reading done"

setting1
Invisible value ???? And how to set it.

Edit1:
<attribute id="0x0000" name="Dimmer Enable/Disable" type="dat16" default="0x0100" access="rw" required="m" showas="hex"></attribute>
Display "0x" ^^. I rly need explaination how it work !

@manup
Copy link
Member

manup commented Oct 23, 2018

I've checked the code, this datatype is not yet supported in the deCONZ GUI, I'll add it in the next version.

@Smanar
Copy link
Collaborator Author

Smanar commented Oct 23, 2018

Lol, I have spend 1 hour trying all datatypes.
I think this device can work "out of the box" with somes littles hacks (and all other from this gamme). I will wait for next version to continue my tests.

BTW thx a lot for answers :)

@Smanar
Copy link
Collaborator Author

Smanar commented Oct 26, 2018

Just for information I m seing on "about deCONZ" option, I m using this one from the website, it s the V2_05_20
And from https://www.dresden-elektronik.de/deconz/win/ I m seing there is more in date version. Do you want I make tries with this version or better to wait for version > V2_05_42

Edit:
Ok, found the new version, making tries.

@Smanar
Copy link
Collaborator Author

Smanar commented Oct 29, 2018

Hi, I m making tries with the version 2.05.44, it's better but when I try to write some data (datatype = dat16, other are working), it's always "0x0000" on sniff (or 0x0100, the last read value).
Do I need to wait for a future version, or it's another problem ?

@Smanar
Copy link
Collaborator Author

Smanar commented Oct 30, 2018

So, waiting for the correction in the GUI, I have used the deconz-cli-plugin with the command
zclattr 0x0eF4 1 0xFC01 020000090101

And now all is perfect, on/off/dimmer/group/led, integration in phoscon is perfect, no bug yet.

The code I have changed in the xml file in
<domain name="Manufacturer Specific" useZcl="true"
part

		<!-- Legrand -->
		<cluster id="0xfc01" name="Legrand - Specific clusters" mfcode="1021">
			<description>Legrand Specific clusters.</description>
			<server>
				<attribute id="0x0000" name="Dimmer" type="dat16" default="0x0101" access="rw" required="m" showas="hex">
					<description>0100 = Dimmer Off, 0101 = Dimmer On</description>
				</attribute>
				<attribute id="0x0001" type="bool" name="LED" required="m" access="rw" default="0">
					<description>Enable LED in dark</description>
				</attribute>
			</server>
			<client>
			</client>
		</cluster>

Tell me if you want more information for integration.

@manup
Copy link
Member

manup commented Nov 3, 2018

Cool, can you please submit a PR for the general.xml addition?

Hi, I m making tries with the version 2.05.44, it's better but when I try to write some data (datatype = dat16, other are working), it's always "0x0000" on sniff (or 0x0100, the last read value).

Do you mean the write attribute isn't filled with the data provided in Cluster Info Panel?

@Smanar
Copy link
Collaborator Author

Smanar commented Nov 3, 2018

Exactly, I can put any values in the editbox, if I press write, I have the message "sucessfull", but the ConBee always send the same value at the device, and if I press the "read button" it come back to the old value again.
The problem is not from the device, because I have "snif" the request and it rly send the same value whatever is the value in the editbox.

Sure I will make the PR, but I m waiting for the GUI is working again, because without this correction, impossible to enable dimmer without deconz-cli-plugin, so my addition can't work.

@Smanar
Copy link
Collaborator Author

Smanar commented Nov 14, 2018

Just tested 2.05.47, bug still here, GUI don't support DAT16.
And I haven't checked but it seem there is exactly the same prb for int24 cf #812

@manup
Copy link
Member

manup commented Nov 14, 2018

Yes sorry hasn't made it yet, looking forward to fix it in the next release around Friday.

@Smanar
Copy link
Collaborator Author

Smanar commented Nov 15, 2018

No problems, I will make tries on futures versions.
But this github is for only the rest plugin or all the deCONZ application ? Because it's a bug in the GUI, nothing to see with the plugin.

@Smanar
Copy link
Collaborator Author

Smanar commented Nov 19, 2018

It works, thx again for your app and support :).

So to resume, It s a switch with wire, but without neutral (zero line) with on/off AND dimmer.

  • if you use it "out of the box" it works without problem but I don't think dimmer will work.
  • if you update its firmware with the gateway, it will be harder to pair, you need to use another device as router to make it possible, I have used an ikea bulb.
  • You need to use the attribute in special cluster to enable dimmer

After that, the device is see as bulb (not a switch) so easier for integration, it works without problem in phoscon too.
The return state works too, use the bind fonction for that.

@Smanar
Copy link
Collaborator Author

Smanar commented Jun 2, 2019

Ok so just for information the values I m using for attribute report, after somes tests.

For on/off : I have set 1 - 300
For level control : I have set 1 - 600 - 0

@WhistleMaster
Copy link
Contributor

WhistleMaster commented Aug 31, 2019

So are all the Legrand connected switch series are now supported with this change ?

Why is it seen as a light instead of a switch ?

EDIT: is this product supported: https://www.legrand.fr/catalogue/interrupteur/interrupteur-micromodule-declairage-onoff-pour-rendre-votre-eclairage-connecte-installation-with-netatmo

@Xylomid
Copy link

Xylomid commented Jul 20, 2021

In the meantime, do you know if with latest Legrand firmware we can change from zigbee channel 11 ? Where can we find a changelog, or the list of latest firmware in order to know if i should upgrade with the legrand gateway?

@pipiche38
Copy link

pipiche38 commented Jul 20, 2021 via email

@Smanar
Copy link
Collaborator Author

Smanar commented Jul 20, 2021

I did test connected plug, switch dimmer, micro module and switch shutter. And with recent update they work on all Zigbee

Seriously, new firmwares with news features are already out ?

@samsam-rolon
Copy link

I did test connected plug, switch dimmer, micro module and switch shutter. And with recent update they work on all Zigbee channels

Envoyé de mon iPhone

Le 20 juil. 2021 à 08:44, Xylomid @.***> a écrit :


In the meantime, do you know if with latest Legrand firmware we can change from zigbee channel 11 ? Where can we find a changelog, or the list of latest firmware in order to know if i should upgrade with the legrand gateway?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

Whaaaaaaaaat ????? How did you get new firmware ? Repairing to the Legrand gateway ?

@samsam-rolon
Copy link

Update from Legrand :
image

@Smanar
Copy link
Collaborator Author

Smanar commented Oct 12, 2021

Haaa ^^.

You know if we need to make a form by user, or If I can make one for all deconz user ? Else we will see when the page will be available.

BTW thx a lot, long time I have no news from them ....

@samsam-rolon
Copy link

samsam-rolon commented Oct 14, 2021

Hello all !
First firmware is available ! Ask access here : https://developer.legrand.com/documentation/operating-manual/
image
UPpdate works with deCONZ :-)

@JohnKiller
Copy link

@samsam-rolon how did you update? I've got the firmware, now how do I upload it to the device? Following guides found online the update goes to "Idle" and never begins. Do I need to press something on the device? Thanks

@Smanar
Copy link
Collaborator Author

Smanar commented Sep 2, 2022

Hello, can you show a picture of the OTA windows in deconz to check params ?

It's a wired or a battery device ? On wired, it start itslef.

@JohnKiller
Copy link

deconz

The file I've download is named "17" with no extension. I see that the image type is 0x0011 instead the device reports 0x000f, might this be the issue?

@Smanar
Copy link
Collaborator Author

Smanar commented Sep 2, 2022

Yeah, I think it's the problem, on Legrand the image type 0x0011 mean the file is for plug/outlet, and your device have image 0x0007 that is marked as "unknow" on my side for this firmware ^^, it s a covering or the measurement device ?

@JohnKiller
Copy link

Oh now I see... it's the wrong device. No firmware is released yet for mine :(

@Smanar
Copy link
Collaborator Author

Smanar commented Sep 4, 2022

I have perhaps an old one from pipiche

Image type : 0xf Manufacturer Specific
File version : 0x1a4203 > App release:3 App Build:66 Stack release:26 Stack Build:0

Version 26 = 0x1A

What is your device and why you need a firmware update ?

@JohnKiller
Copy link

BTICINO Living Light L4003C and L4003CW (the first one is wired the second is wireless).

The wireless one works but the wired doesn't, so I was hoping a FW update would fix it.

@Smanar
Copy link
Collaborator Author

Smanar commented Sep 5, 2022

From my memory the L4003C is working, and the working mode is strange, if I remember the device mesure the current consumption to know if the device is on or off, so can't work without load.

What is your issue ? It don't work on local or with deconz ?

#2707 (comment)

@cobch
Copy link
Contributor

cobch commented Oct 24, 2022

deconz

The file I've download is named "17" with no extension. I see that the image type is 0x0011 instead the device reports 0x000f, might this be the issue?

How did you save the file from your computer to show it in the list? I am using hassio on a raspberry Pi and do not manage to find where to save the new firmware to update my Legrand firmware /-:

@Smanar
Copy link
Collaborator Author

Smanar commented Oct 24, 2022

This capture was taken on a windows machine, you can install deconz on windows, make a backup/restore of your zigbee network and use the conbee on the windows machine, the time of manipulation.

Else can use the folder you want, even not persistent.
If you want a persistant one, make a try with the "otau" folder in the "data" folder in the deconz docker, this one is persistent if I have understand, cf https://forum.phoscon.de/t/how-to-add-edit-a-ddf-on-home-assistant-using-text-editor/1839

@cobch
Copy link
Contributor

cobch commented Oct 24, 2022

I actually want only to upgrade the firmware of my " Legrand Light switch with Neutral" to the version 31 updated on the Legrand API. I do not manage to find how to access the following folder "data/otau" to save the newest firmware version downloaded to my mac. See below:

Screenshot 2022-10-24 at 18 55 47

BTW maybe it is easier to just update from another switch already inside Deconz that i using the latest firmware (v.39) directly?

Screenshot 2022-10-24 at 19 01 33

@Smanar
Copy link
Collaborator Author

Smanar commented Oct 24, 2022

BTW maybe it is easier to just update from another switch already inside Deconz that i using the latest firmware (v.39) directly?

You can't retreive the firmware from a device.

I do not manage to find how to access the following folder "data/otau"

You have the command "docker cp" to copy file to a docker https://forum.phoscon.de/t/how-to-add-edit-a-ddf-on-home-assistant-using-text-editor/1839/8

Perhaps it's possible too with application like fillezilla, but I never use docker on y side.

@jiquem
Copy link

jiquem commented Nov 5, 2022

Hello @Smanar
I've recently switched from deconz to z2m. (issue with the conbee key + unsupported devices (aqara TRV)). I unfortunately notice that the Legrand switch don't have the same behavior. For both single and double switch, there is a delay (up to 2-3 seconds) very often. This has been analyzed by @celestianx in Koenkk/zigbee2mqtt#14256 (comment).
Did you do something special in your implementation to avoid this with deconz ?
Thanks

@Smanar
Copy link
Collaborator Author

Smanar commented Nov 5, 2022

The code is available on the github, but no, nothing in my memory.

@SilentT-FR
Copy link

Hi, all firmware was available at this repo : Koenkk/zigbee-OTA#322

@SilentT-FR
Copy link

SilentT-FR commented Jun 10, 2023

Legrand was officialy make available all firmware 👍
legrand
Screen too small

@Smanar
Copy link
Collaborator Author

Smanar commented Jun 10, 2023

Yeah ^^.

Thx a lot for the information.

@g1za
Copy link

g1za commented Dec 15, 2023

Sorry for posting below a closed ticket, but can anybody let me know where I can find the procedure to update a (Legrand) device firmware?
I owe a Light switch with neutral (NLL) and it seems I also need to check the installed version first.
Can anybody help and guide me?
Or is deconz able to identify the firmware and install the right one automatically? In this case again... how to start it?
Thanks!

immagine

@Smanar
Copy link
Collaborator Author

Smanar commented Dec 15, 2023

Or is deconz able to identify the firmware and install the right one automatically? In this case again... how to start it?

He can, if you configure it for that, for router only.
https://github.com/dresden-elektronik/deconz-ota-plugin
And you have an option to enable too, but I found this option only in the old webapp.

If you want to be sure it's the good one, go in the OTA panel on deconz and compare "image" (the Hexa number 0xXXXX), you can see the actual one, and the one on the file (you can load file to have information).
But don't worry with Legrand it work, or it don't work (there is a not working version), but you can't break something, even if you use a bad firmware.

Some users have reported me they need to power cycle the device to make the OTA start.

@g1za
Copy link

g1za commented Dec 15, 2023

Thank you very much @Smanar, I managed to update the firmware successfully (I was still checking the file and at some point the update started by itself, so I assumed the file version was correct - and in any case the switch is working correctly :) )
Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests