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

Add support for Legrand ZGP kinetic switch (Self-e) #5111

Closed
wants to merge 12 commits into from

Conversation

Smanar
Copy link
Collaborator

@Smanar Smanar commented Jul 12, 2021

Tested devices are the 1, 2 gangs Toggle switch and the scene one.
see > https://forum.phoscon.de/t/legrand-self-e-batteryless-switches-zlgp1x/95

  • the 1 button switch (0 677 23L or ZLGP17)
  • the 2 buttons switch (0 677 24L or ZLGP18)
  • the 4 buttons switch (0 677 55L or ZLGP15)

(Just need to add a L at previous reference)


{
    "config": {
        "on": true
    },
    "ep": 242,
    "etag": "4a1be5089a93990eb183cecac8dc1e65",
    "lastseen": "2021-07-12T15:22Z",
    "manufacturername": "Legrand",
    "modelid": "LEGRANDZGPSWITCH",
    "name": "Self-e switch 4",
    "state": {
        "buttonevent": 224,
        "lastupdated": "2021-07-12T15:22:53.464"
    },
    "type": "ZGPSwitch",
    "uniqueid": "00:00:00:00:00:52:05:1b-f2"
}

de_web_plugin.cpp Outdated Show resolved Hide resolved
de_web_plugin.cpp Outdated Show resolved Hide resolved
@Smanar
Copy link
Collaborator Author

Smanar commented Jul 13, 2021

Oups, fortunately you have retested the code before.

  • Have corrected the typo
  • Have used as model id "LEGRANDZGPSWITCH" to keep the older synthax

@fredericseiler
Copy link

Sucessfully tested in Home Assistant (single press & double press). Thanks @Smanar for your work!

2021-07-13-17-42-10 Google Chrome Configuration - Home Assistant

@Smanar
Copy link
Collaborator Author

Smanar commented Jul 24, 2021

@fredericseiler are you still here ?

@fredericseiler
Copy link

lgtm 👍

@Smanar
Copy link
Collaborator Author

Smanar commented Jul 25, 2021

Lol, I dit not know this abbreviation.
I have put the "story" on the phoscon forum, but the code is modified to use "normalized" value now.
So you will need to change them again on your PR too.

@fredericseiler
Copy link

Already done and successfully tested. 😉

@Paul-DS
Copy link

Paul-DS commented Oct 22, 2021

Hi,

Any idea when this will be merged/released ?

@fredericseiler
Copy link

Nop, I switched to Zigbee2MQTT where the support was added in few days 🤷‍♂️

@upkanet
Copy link

upkanet commented Oct 25, 2021

Does it work without changing the Zigbee channel to 11 ?
I saw in the datasheet that the channel can be changed on the switch directly to match current channel.
Did you manage to add the switch and use it in HA "directly" ?

Thanks for your work, I have multiple switches that are waiting the your updates to be installed 😄

@Paul-DS
Copy link

Paul-DS commented Nov 12, 2021

@Smanar Is there something we are waiting before merging this PR ? Or you just need validation ?

@manup It looks like you are the one validating PRs. Does this look ok to you ?

@Smanar
Copy link
Collaborator Author

Smanar commented Nov 12, 2021

Is there something we are waiting before merging this PR ? Or you just need validation ?

For me it's ok, and IDK if we can use DDF (instead of code) for ZGP device ?

@Paul-DS
Copy link

Paul-DS commented Jan 9, 2022

Is there something we are waiting before merging this PR ? Or you just need validation ?

For me it's ok, and IDK if we can use DDF (instead of code) for ZGP device ?

It seems we should:

image

@Smanar
Copy link
Collaborator Author

Smanar commented Jan 9, 2022

But from my last check, the battery switch part is not finished on DDF core, and nothing for ZGP device.

@Mimiix
Copy link
Collaborator

Mimiix commented Jan 9, 2022

I'll ask manup to check

@manup
Copy link
Member

manup commented Jan 10, 2022

Indeed, unfortunately the ZGP stuff is not yet available in DDF, needs a bit more tinkering, the main problem is that it's so damn hard to uniquely identify these switches due the lack of manufacturer name and modelid.

For this particular one I wonder does it show up in the Hue bridge and if so how?

@Smanar
Copy link
Collaborator Author

Smanar commented Jan 10, 2022

You want to try to include the Legrand ZGP switch on the official HUE Gateway ?
Not sure if philips use a database to reconize other brand ?
You don't like the LEGRANDZGPTOGGLESWITCH name ^^ ?

@Paul-DS
Copy link

Paul-DS commented Mar 9, 2022

Any news ?

@yves19
Copy link

yves19 commented Jun 18, 2022

Any news since March ?

@rhoudinet
Copy link

Hi, what is the status with this ? Can this be configured via DDF now ?

@Smanar
Copy link
Collaborator Author

Smanar commented Jul 17, 2023

Nope, no support for ZGP device using DDF.

@maxenced
Copy link

So not sure, what is missing on DDF side ? Only the JSON definition or isn't DDF backend able to handle this kind of device at all ?

@Smanar
Copy link
Collaborator Author

Smanar commented Aug 28, 2023

DDF backend is not able to handle this kind of device at all

@manup
Copy link
Member

manup commented Aug 30, 2023

The problem with ZGP devices is that they can't be queried which the DDF system does in order to know which device it is via modelid, manufacturer name etc. Some ZGP devices send additional data that may be used for finger printing but not all do, and it's not a reliable indicator to know what device it really is.

In deCONZ there is a bit of code to expose ZGP switches to have things like long press, hold — if possible with x00x button events like 1003 (which are nice and generic). Without such a mapping the events are almost random 0x63, 0x12, .... could mean anything and it's not consistent for switches.

I think moving forward at a bare minimum we can expose all ZGP devices with their last received state/zgp_cmd, that's not a nice mapping but at least visible in the REST-API. Also expose other ZGP data that the device may send. I think it also makes sense to record all commands a ZGP device does send in a small sorted array to be used for coarse identification.

However things like "modelid": "LEGRANDZGPSWITCH" are dangerous and could be completely wrong since there can be other ZGP switches which look identical from what they send which aren't from Legrand.

@Smanar Smanar closed this Dec 22, 2023
@Smanar Smanar deleted the legrand__kinetic branch December 22, 2023 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants