deconz-rest-plugin icon indicating copy to clipboard operation
deconz-rest-plugin copied to clipboard

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

Open Smanar opened this issue 3 years ago • 18 comments

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"
}

Smanar avatar Jul 12 '21 18:07 Smanar

Oups, fortunately you have retested the code before.

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

Smanar avatar Jul 13 '21 15:07 Smanar

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

fredericseiler avatar Jul 13 '21 15:07 fredericseiler

@fredericseiler are you still here ?

Smanar avatar Jul 24 '21 18:07 Smanar

lgtm 👍

fredericseiler avatar Jul 25 '21 08:07 fredericseiler

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.

Smanar avatar Jul 25 '21 08:07 Smanar

Already done and successfully tested. 😉

fredericseiler avatar Jul 25 '21 08:07 fredericseiler

Hi,

Any idea when this will be merged/released ?

Paul-DS avatar Oct 22 '21 12:10 Paul-DS

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

fredericseiler avatar Oct 22 '21 13:10 fredericseiler

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 😄

upkanet avatar Oct 25 '21 20:10 upkanet

@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 ?

Paul-DS avatar Nov 12 '21 17:11 Paul-DS

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 ?

Smanar avatar Nov 12 '21 17:11 Smanar

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

Paul-DS avatar Jan 09 '22 12:01 Paul-DS

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

Smanar avatar Jan 09 '22 12:01 Smanar

I'll ask manup to check

Mimiix avatar Jan 09 '22 16:01 Mimiix

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?

manup avatar Jan 10 '22 01:01 manup

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 ^^ ?

Smanar avatar Jan 10 '22 16:01 Smanar

Any news ?

Paul-DS avatar Mar 09 '22 19:03 Paul-DS

Any news since March ?

yves19 avatar Jun 18 '22 10:06 yves19

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

rhoudinet avatar Jul 17 '23 16:07 rhoudinet

Nope, no support for ZGP device using DDF.

Smanar avatar Jul 17 '23 16:07 Smanar

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 ?

maxenced avatar Aug 28 '23 07:08 maxenced

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

Smanar avatar Aug 28 '23 15:08 Smanar

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.

manup avatar Aug 30 '23 10:08 manup