deconz-rest-plugin
deconz-rest-plugin copied to clipboard
Add support for Legrand ZGP kinetic switch (Self-e)
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"
}
Oups, fortunately you have retested the code before.
- Have corrected the typo
- Have used as model id "LEGRANDZGPSWITCH" to keep the older synthax
Sucessfully tested in Home Assistant (single press & double press). Thanks @Smanar for your work!

@fredericseiler are you still here ?
lgtm 👍
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.
Already done and successfully tested. 😉
Hi,
Any idea when this will be merged/released ?
Nop, I switched to Zigbee2MQTT where the support was added in few days 🤷♂️
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 😄
@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 ?
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 ?
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:
But from my last check, the battery switch part is not finished on DDF core, and nothing for ZGP device.
I'll ask manup to check
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?
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 ^^ ?
Any news ?
Any news since March ?
Hi, what is the status with this ? Can this be configured via DDF now ?
Nope, no support for ZGP device using DDF.
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 ?
DDF backend is not able to handle this kind of device at all
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.