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

Legrand Wireless Smart Dimmer with Netatmo WNRL63 #5343

Closed
stevenwfoley opened this issue Oct 3, 2021 · 24 comments
Closed

Legrand Wireless Smart Dimmer with Netatmo WNRL63 #5343

stevenwfoley opened this issue Oct 3, 2021 · 24 comments

Comments

@stevenwfoley
Copy link

Device

Screenshots

image
image
image
image
image
image

@stevenwfoley
Copy link
Author

FYI, this Legrand/Netatmo device also appears to require zigbee channel 11 as with other Legrand devices 883. My deconz instance was on channel 25 and the switch paired and worked for a couple minutes but then completely stopped working. I tried repairing several times but experienced the same exact behavior. I changed deconz to channel 11 and the device instantly started working properly and consistently.

@Smanar
Copy link
Collaborator

Smanar commented Oct 4, 2021

I think it will be easy to add it, it's just a battery powered switch with 2 positions "up" and "down" ? No special features ?

@stevenwfoley
Copy link
Author

Yes, battery powered dimmer switch, so it has 4 buttons total: on, off, dim-up, dim-dowm.
Thank you!

@Smanar
Copy link
Collaborator

Smanar commented Oct 4, 2021

4 buttons or 4 features on only 2 buttons ?
The actual one have only 2 positions on/off and it's the long press that make the dim up and dim down.

I m not sure with only the picture, the "design" is special.

If it have only 2 buttons, I can make it just with adding it in whitelist (just a clone), if it realy have 4 buttons, I think I will need somes logs later.

@stevenwfoley
Copy link
Author

stevenwfoley commented Oct 4, 2021 via email

@stevenwfoley
Copy link
Author

I'm not seeing a single event from the button presses of this device in the deconz debug log view. I've captured some wireshark data though. I can send it if its helpful.

@Smanar
Copy link
Collaborator

Smanar commented Oct 5, 2021

We will see, but I think it's standard, Legrand is realy zigbee compliant.
I haven't asked, you have a linux OS machine with full OS to test code modification ?

You have the procedure here https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Compiling-the-REST-plugin-for-device-specific-testing
So for you, after having installed deconz :

sudo apt install deconz-dev
git clone --branch Legrand_1 https://github.com/Smanar/deconz-rest-plugin.git
cd deconz-rest-plugin
qmake && make -j2
sudo cp ../libde_rest_plugin.so /usr/share/deCONZ/plugins

But you need to edit the json file too, do you know where to find it ? On raspberry it's /usr/share/deCONZ/devices/button_maps.json

Changes are just Smanar@95eb0b8#diff-a3adce467fe93b9c612c198c187dad34f5284d6c9adf66aa28127f0f619979b5

It can work on first try, else you will have some debug line starting by "[INFO] - Button" when using a button (with the "info" flag)

@stevenwfoley
Copy link
Author

I compiled the dev REST plugin, re-joined the switch to deconz, and the device was now identified by deconz and phoscon; although the phoscon gui shows the device as only having two buttons. The unfortunate part is that the buttons do not function, all I see with INFO and INFO_L2 debug view is this:

  • Warning duplicated zcl.cmd: 0x09, cluster: 0xFC01 with zcl.seq: 1 for Legrand / Remote dimmer switch
  • [WARNING] - Missing cluster in sensor fingerprint: 0x646266FFFE611E7C - 0xFA3B (Remote dimmer switch), endpoint: 0x01, cluster: 0xFC01, payload: 7C1E61FEFF66626401, zclSeq: 1
  • [INFO] - No button handler for: Remote dimmer switch, unicast to: 0x0000, endpoint: 0x01, cluster: 0xFC01, command: 0x09, payload: 7C1E61FEFF66626401, zclSeq: 1

@stevenwfoley
Copy link
Author

FYI, I confirmed with Legrand that this specific device is zigbee 3.0 compatible. https://developer.legrand.com/forums/topic/wnrl63-and-zigbee-3-0/

@Smanar
Copy link
Collaborator

Smanar commented Oct 6, 2021

the phoscon gui shows the device as only having two buttons

Phoscon is just an app using the API, I haven't impact on it, but BTW I think you will need a third app to use this device or wait for phoscon will support it too.

[WARNING] - Missing cluster in sensor fingerprint: 0x646266FFFE611E7C - 0xFA3B (Remote dimmer switch), endpoint: 0x01, cluster: 0xFC01, payload: 7C1E61FEFF66626401, zclSeq: 1

Up to now I never add the Legrand Cluster to the fingerprint, I never see an use for it

[INFO] - No button handler for: Remote dimmer switch, unicast to: 0x0000, endpoint: 0x01, cluster: 0xFC01, command: 0x09, payload: 7C1E61FEFF66626401, zclSeq:

Yeah it s exactly the log I need, but BTW they are all on cluster 0xFC01 ?
I need this log but for all 4 buttons.
But It s strange you have no logs on classic clusters, the 0x0008 and 0x0006

Perhaps something bad in binding, do you know how to make bind using the GUI, need to bind the cluster 0x0006 and 0x0008 to the coordinator (if the code don't do it itself, I m just seing this device don't support group)

@stevenwfoley
Copy link
Author

I had to manually bind cluster 6 and 8. I've tried repairing many times and the device never binds the clusters. Is there a way to compensate for this in deconz?

Here are the log entries after I bound the clusters.
On: [INFO] - Button 1002 - Remote dimmer switch, unicast to: 0x0000, endpoint: 0x01, cluster: ONOFF (0x0006), action: On, payload: None, zclSeq: 0
Off: [INFO] - Button 2002 - Remote dimmer switch, unicast to: 0x0000, endpoint: 0x01, cluster: ONOFF (0x0006), action: Off, payload: None, zclSeq: 0
Dim-Up: [INFO] - Button 1001 - Remote dimmer switch, unicast to: 0x0000, endpoint: 0x01, cluster: LEVEL_CONTROL (0x0008), action: Dimm up, payload: 00FF, zclSeq: 0
Dim-Up: [INFO] - Button 1003 - Remote dimmer switch, unicast to: 0x0000, endpoint: 0x01, cluster: LEVEL_CONTROL (0x0008), action: Dimm up stop, payload: None, zclSeq: 1
Dim-Down: [INFO] - Button 2001 - Remote dimmer switch, unicast to: 0x0000, endpoint: 0x01, cluster: LEVEL_CONTROL (0x0008), action: Dimm down, payload: 01FF, zclSeq: 3
Dim-Down: [INFO] - Button 2003 - Remote dimmer switch, unicast to: 0x0000, endpoint: 0x01, cluster: LEVEL_CONTROL (0x0008), action: Dimm down stop, payload: None, zclSeq: 4

@Smanar
Copy link
Collaborator

Smanar commented Oct 7, 2021

Ok, so all is working, but need to force the bind.
And yes I need to compensate that in deconz, but I don't remember where ^^, give me some time.

@Smanar
Copy link
Collaborator

Smanar commented Oct 7, 2021

Hello, can you show me the device Json ? Visible here http://phoscon.de/pwabeta in Help/Api information ?
And logs during the inclusion ? with ("info" and "info_l2") Because this device is exaclty like others, so I don't understand why it work for othersd and not this one.

@stevenwfoley
Copy link
Author

Here is the json. I'll try to get the inclusion logs tonight.
{
"config": {
"battery": 100,
"on": true,
"reachable": false
},
"ep": 1,
"etag": "0d3242778b1c7b6c958a53f5454fb290",
"lastannounced": "2021-10-07T02:34:52Z",
"lastseen": "2021-10-07T02:34Z",
"manufacturername": "Legrand",
"mode": 1,
"modelid": "Remote dimmer switch",
"name": "Legrand",
"state": {
"buttonevent": null,
"lastupdated": "none"
},
"swversion": "000e",
"type": "ZHASwitch",
"uniqueid": "64:62:66:ff:fe:61:1e:7c-01-0006"
}

@Smanar
Copy link
Collaborator

Smanar commented Oct 11, 2021

Ok so I think it s because the missing state/group (present on other Legrand stuff), Have updated the code again.

cd deconz-rest-plugin
git pull
qmake && make -j2
sudo cp ../libde_rest_plugin.so /usr/share/deCONZ/plugins

@stevenwfoley
Copy link
Author

It looks like that worked. The clusters are now paired properly during device inclusion. Do you still want the inclusion logs?
My json now includes the config:group.
{
"config": {
"battery": 90,
"group": "52",
"on": true,
"reachable": true
},
"ep": 1,
"etag": "e62b5b58d4a690cc9eeb229c841a1411",
"lastannounced": "2021-10-12T14:47:09Z",
"lastseen": "2021-10-12T14:46Z",
"manufacturername": "Legrand",
"mode": 1,
"modelid": "Remote dimmer switch",
"name": "Legrand",
"state": {
"buttonevent": 2002,
"lastupdated": "2021-10-12T14:47:13.885"
},
"swversion": "000e",
"type": "ZHASwitch",
"uniqueid": "64:62:66:ff:fe:61:1e:7c-01-0006"
}

@Smanar
Copy link
Collaborator

Smanar commented Oct 13, 2021

Do you still want the inclusion logs?

No, if it s working.
Just tell me if you miss something else I will make the PR

@stevenwfoley
Copy link
Author

Everything seems to be working as expected. Thank you for the quick updates!
Using the available clusters shown in the image, are there any other clusters besides 006 and 008 that should be bound to the coordinator? If so, how would I test?

@stevenwfoley
Copy link
Author

I just noticed that the only entity showing up in Home Assistant is the battery level. Is this an issue with deconz not exporting/exposing the capabilities of the switch or is this an issue with Home Assistant?

@Smanar
Copy link
Collaborator

Smanar commented Oct 15, 2021

I just noticed that the only entity showing up in Home Assistant is the battery level. Is this an issue with deconz not exporting/exposing the capabilities of the switch or is this an issue with Home Assistant?

I think it's from HA, not the first time I see this comment, I think if you take a look on the json I think you will see the "buttonevent" value.
But I don't use HA so I can't explain how to do, perhaps #1531

Using the available clusters shown in the image, are there any other clusters besides 006 and 008 that should be bound to the coordinator? If so, how would I test?

No don't worry, the most used cluster are on/off, setlevel, color, scene, I don't see an utility at using others.

@github-actions
Copy link

github-actions bot commented Nov 6, 2021

As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.

@github-actions github-actions bot added the stale label Nov 6, 2021
@github-actions
Copy link

As there has not been any response in 28 days, this issue will be closed. @ OP: If this issue is solved post what fixed it for you. If it is not solved, request to get this opened again.

@stevenwfoley
Copy link
Author

I just noticed a nuance with this hardware and I'm not sure if it matters, but the manufacturer and model text strings are technically both preceded with a single space. If you look at the Cluster Info image, the Manufacturer Name is " Legrand" and the Model Identifier is " Remote dimmer switch". I'm not sure if this effects the string matching logic, or if somewhere the strings are trimmed of whitespace before matching, but just FYI.

@Smanar
Copy link
Collaborator

Smanar commented Feb 11, 2022

or if somewhere the strings are trimmed of whitespace before matching,

Good question, I know last chars are trimmed, but never tested for firsts chars.

But if you have the device included, can just take a look in the device json (for exemple in phoscon / help / api Information / light ...)

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

Successfully merging a pull request may close this issue.

2 participants