dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.9k stars 502 forks source link

Lidl Melinera Smart LED string lights #3716

Closed sonar98 closed 3 years ago

sonar98 commented 4 years ago

Device

Screenshots

cluster-of-node node-info basic-cluster-1 basic-cluster-2 cluster-colorcontrol-1 cluster-colorcontrol-2 cluster-colorcontrol-3 cluster-colorcontrol-4 cluster-colorcontrol-5
ebaauw commented 3 years ago

Did you delete the resource before re-pairing the device? Did it get a new resource ID? I double-checked on v02.07.00: the device is recognised correctly.

Smanar commented 3 years ago

I realy hate this feature that set manufacture name according to manufacture number ...

mawa85 commented 3 years ago

sorry, I updated deconz but forgot to flash the new firmware, my bad. working now. thanks

sonar98 commented 3 years ago

I tried on my windows 10 computer and now it is working. Have to check what went wrong with my RPi.

ebaauw commented 3 years ago

Above commit provides some minor enhancements and bug fixes:

While it's possible to control the Xmas light strip directly by adding it to a controller group, this does cause some weird behaviour. When in effect mode, the light strip will revert to white or colour mode, but this is not reflected in the API (effect isn't reset to "none"). Also, any colour setting is not reflected in the API. Brightness and On/Off changes should be reflected correctly in the API.

It might be preferable to use gateway rules instead of direct control for the Xmas lightstrip, hence the added support for bri_inc. Any update through the API should be reflected correctly.

canim60 commented 3 years ago

i will buy one tommow, i will check it up

Somberland commented 3 years ago

thanks for your great work @ebaauw! bought one like 20 minutes ago due to the changelog on homebridge-hue :D will test after work

canim60 commented 3 years ago

@ebaauw how can i change the effects? I have only these objects on iobroker

grafik grafik

ebaauw commented 3 years ago

Thru the API. I have no clue about iobroker.

chris3600410 commented 3 years ago

einfach dort den effekt eigeben .... das klappt

canim60 commented 3 years ago

einfach dort den effekt eigeben .... das klappt

tut aber leider nichts, habe snow oder etliche andere die oben auf liste stehen eingegeben, ohne funktion

grafik

canim60 commented 3 years ago

Thru the API. I have no clue about iobroker.

can you tell me how i do it ? with Node?

gentoair commented 3 years ago

Hallo can you explain me please, where i can insert this code? If i right understand this is for Conbee. Where i can find last version of this mode? Thank you verz much ;) @ebaauw

ebaauw commented 3 years ago

My first PR has been released in v2.7.0-beta. For my second PR you need to wait or compile the REST API plugin yourself, see README.

For help on the API, see https://dresden-elektronik.github.io/deconz-rest-doc/.

Krolykke commented 3 years ago

Wow @ebaauw your work and efforts impress me time after time, THANK YOU! I am currently @ 2.05.88 / 15.10.2020 and not very keen on implementing beta software. Do you have an idea when this will be released as non beta and come as an update in HA?

dasoho commented 3 years ago

Thank you very much @ebaauw for spending lots of effort for getting this thing supported. It worked just out of the box :-) There is just one "mode" which is selectable on the controller but which I cannot reach by the API: If I select the colour mode on the controller (by "F" button) and then using the colour button ("C") to switch through the colours I get: red, green, blue, white, yellow, purple, cyan, coldwhite, and multicolour. In multicolour it seems that there are 6 colors defined which are randomly spread over the LED chain. Is there a possibility to reach this "steady" multicolour mode via the API? Actually, this mode is the one I would like most as it is the most classical christmas tree lighting :-) Logically, I would assume that it would fit to the "steady" mode and additionally specify up to 6 "effectColours". Currently, the "steady" mode takes just the first colour out of the "effectColours" array.

Hedda commented 3 years ago

@ebaauw you do not happen to use ZHA in Home Assistant (depends on zigpy and zha-device-handlers) as well as deCONZ?

Anyway, for reference, there is a similar discussion about these Xmas-lights for ZHA here -> https://github.com/zigpy/zha-device-handlers/issues/604

Hedda commented 3 years ago

Does anyone have much better pictures of the Christmas lights themselves and all their control/power-adapters to help a search Chinese online stores in China for a product that use the same internals so people in any country can order directly from China?

https://www.lidl.de/de/melinera-lichterkette-zigbee-smart-home/p360021

https://www.lidl.nl/nl/p/smart-home/200-rgb-led-verlichtingsketting/p43246

It sounds like most if not all of Lidl's Zigbee products are rebranded OEM or while-label version devices that are actually manufactured by Tuya or others in China, so thinking that for people not living in Europe it might be easiest to find the same product sold under a different brand from a Chinese online store and order it to the USA directly from China?

Just a few other companies who are known for rebranding and selling at least a couple OEM or while-label Zigbee devices (and WiFi devices) from example Tuya and HEIMAN are Zemismart, Alecto, Bandi, Binthen, Blitzwolf, Malmbergs, Gosund, Eachen, Moes, Sonoff, Teckin, Earda, LEELKI, Larkkey, Lonsonho, LoraTa, Norklmes, SHOJZJ, Samotech, Smart9, Somgoms, TUYATEC, UseeLink, Vrey, Woox, Yushun, and CR Smart Home,

Many such rebranded OEM or while-label Zigbee devices manufactured by Tuya can be found in zigbee2mqtt and deconz lists:

https://www.zigbee2mqtt.io/information/supported_devices.html

https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Supported-Devices

Somberland commented 3 years ago

@Hedda hope those helps :) from the lights I bought yesterday in Lidl Germany. If you need more just ping me :D

IMG_6069 IMG_6068 IMG_6067 IMG_6066 IMG_6065 IMG_6064 IMG_6063 IMG_6062 IMG_6060 IMG_6059 IMG_6061 IMG_6058

Hedda commented 3 years ago

Slightly off-topic, love the Twinkly app concept of using the phone's camera to AR 3D mapping similar Christmas light strings:

https://www.twinkly.com/knowledge/map-your-lights-2/

Twinkly's app uses Augmented-Reality together with your phone's camera to first 3D map each and every lightbulb in the Christmas light string and then let you "paint" each and every one of those lightbulbs individually with their app on your phone.

https://www.youtube.com/watch?v=xMJ3bLBtGaQ&ab_channel=Twinkly-SmartDecoration

Krolykke commented 3 years ago

I tried to open mine but gave up. It's two boxes, the outer one can be forced apart, the inner one seems filled with hot glue and seems impossible to open without destroying anything.

image

Hedda commented 3 years ago

@Hedda hope those helps :) from the lights I bought yesterday in Lidl Germany. If you need more just ping me :D

Any chance that you would be willing to also open up the control-box and take pictures of the circuit board inside it? Chances are that pictures of the circuit board (both sides if possible) could lead to us faster finding matching OEM/white-label product(s).

eric1905 commented 3 years ago

My first PR has been released in v2.7.0-beta. For my second PR you need to wait or compile the REST API plugin yourself, see README.

For help on the API, see https://dresden-elektronik.github.io/deconz-rest-doc/.

So I am using deconz with Phoscon and conbee. How can I update everything that it is working? In Phoscon it says: Version: 2.05.84 / 14.9.2020 Firmware. 26660700

Krolykke commented 3 years ago

So I am using deconz with Phoscon and conbee. How can I update everything that it is working? In Phoscon it says: Version: 2.05.84 / 14.9.2020 Firmware. 26660700

Are you yousing deCONZ as Homeassistant integration?

eric1905 commented 3 years ago

I use it as a OpenHAB integration

ebaauw commented 3 years ago

Is there a possibility to reach this "steady" multicolour mode via the API?

Can you reach it through the LIDL app? As far as I can tell, the Steady scene only takes a single colour. The strip does not report its actual state, so our only change would be catching the LIDL app and gateway in the act of setting this mode.

The LIDL gateway does some magic when pairing the device (writing some manufacturer-specific attributes, sending some Tuya commands with a very small payload). The LED strip responds with some Tuya commands as well. However this doesn't seem to influence the working of the strip. I tried sending all Tuya commands from 0x00 to 0x1F (using the CLI plugin), to see if one of them could lure the strip into reporting its state, but no joy.

you do not happen to use ZHA in Home Assistant (depends on zigpy and zha-device-handlers) as well as deCONZ?

No, I only use HomeKit. I don't even use Phoscon.

Any chance that you would be willing to also open up the control-box and take pictures of the circuit board inside it?

The circuit board would likely contain a Zigbee chip and a microcontroller (or a single chip combining both functions). The microcontroller generates the serial signal to the LEDs, controlling each LED individually. However, it only accepts a fixed number of effects over Zigbee, so we cannot control each LED individually over Zigbee. The serial signal is write-only by nature. The microcontroller is write-only by (poor) design, maybe limited by the resources on the board. So there's no way to get the current state of the microcontroller.

dasoho commented 3 years ago

Can you reach this "steady" multicolour mode through the LIDL app?

Actually, I don't have a LIDL gateway, just operate it via deconz, so I can't crosscheck. Anyway, thank you very much for having this checked from you side.

Smanar commented 3 years ago

Someone can tell me if RGB color are working fine using phoscon ? Using "sat" slider.

Somberland commented 3 years ago

BTW if using those Lights with HomeKit (homebridge): do I need iOS 14 for them? Get this "not supported" error

image

grrrmml commented 3 years ago

First of all thanks to @ebaauw and everybody participating here to add support for the new 'xmas' device!

There ist one issue with the device identification: according to the initial data the manufacturername currently has to be "_TZE200_s8gkrkxk".

I have seen this name only once, when i included the device for the FIRST time, on my Hue bridge (luckily I did not yet delete the device data). All other recent inclusions on the Conbee II ended up with manufacturername "Heiman", like also seen in the json data from @sonar98 (from 9 days ago). On the screenshot from @Somberland it is shown (translated? raw data?) as "Melinera".

I can confirm the modelid is "TS0601". But I have no knowledge if modelid TS0601 alone would be sufficient to identify the device (and whether using the effect routine on other devices could harm them).

After building the code locally with an additional OR condition with Heiman and TS0601 within isXmasLightStrip, i can use the effects via API. (Before that I had already updated Conbee II firmware to version 26680700, no idea if that was also a requirement for it to work.)

Maybe @ebaauw could add a fix to his code. [UPDATE: not required]

Thanks again for all the efforts - if I can aid with some tests, I'd be glad to participate, as I am used to squeeze all out of the (Hue) API - deconz is still very knew to me. And because I haven't written any C code for the last 5 years, that would not yet be a point to contribute.

@Smanar: "sat" basically works, but the colors (I just tested red) were only saturated when "bri" was between 16 and 39. Increasing "bri" from 39 to 40 then lead to a green tone with very low brightness. The color changes do really behave a bit odd. I will probably do some more (scripted) tests using the API, to see what is really going on and what is "good" to do and what is "bad".

With best regards, grrrmml

Smanar commented 3 years ago

"Heiman" again ? I have removed it for VENDOR_EMBER how it can be possible again ?

Because of the tuya code where I m looking in the database ? but it need to be writted inside before ...

And we realy need to use manufacture name, because you can have different device with the same model id "TS0601"

Have you tried to :

ebaauw commented 3 years ago

BTW if using those Lights with HomeKit (homebridge): do I need iOS 14 for them? Get this "not supported" error

Not a clue where that comes from. Could you attach Homebridge Hue’s debug dump file?

On the screenshot from @Somberland it is shown (translated? raw data?) as "Melinera".

That’s courtesy of Homebridge Hue.

I can confirm the modelid is "TS0601". But I have no knowledge if modelid TS0601 alone would be sufficient to identify the device (and whether using the effect routine on other devices could harm them).

No, other devices use that model id as well. We need the manufacturer name (which obviously isn’t) to identify the device.

"sat" basically works, but the colors (I just tested red) were only saturated when "bri" was between 16 and 39. Increasing "bri" from 39 to 40 then lead to a green tone with very low brightness. The color changes do really behave a bit odd.

Then you’re not running my code, or the device isn’t recognised so my code doesn’t kick in. Be sure to re-pair the light strip after upgrading to v2.7.0.

grrrmml commented 3 years ago

Hello again, and thank you for your quick and helpful replies. @Smanar I haven't worked with the sql db of deconz yet (is there some documentation for it?) so I just reset the gateway. Now I got "_TZE200_s8gkrkxk" on the first and second inclusion, and model TS0601 resolved to "Thermostat". @ebaauw The mentioned effect with the "sat" works better now. Changing brightness is another story, but I assume this is also work in progress.

jannnfe commented 3 years ago

"sat" basically works, but the colors (I just tested red) were only saturated when "bri" was between 16 and 39. Increasing "bri" from 39 to 40 then lead to a green tone with very low brightness. The color changes do really behave a bit odd.

Then you’re not running my code, or the device isn’t recognised so my code doesn’t kick in. Be sure to re-pair the light strip after upgrading to v2.7.0.

After upgrading to v2.7.0 and re-pairing the device i still have the situation described above. I deleted the fairy lights via Phoscon and added new. Do I have to delete directly via the deconz GUI?

ebaauw commented 3 years ago

What does the /lights resource for the Xmas light strip look like? It should look like https://github.com/dresden-elektronik/deconz-rest-plugin/issues/3716#issuecomment-735467996

Deleting it from Phoscon and re-pairing should be enough, I think, but maybe you need to delete the record physically from the database.

jannnfe commented 3 years ago

The /lights resource looks like this:

"26": {
        "etag": "52a4c605a656533d9be0f8670d2f6ce0",
        "hascolor": true,
        "lastannounced": null,
        "lastseen": "2020-12-05T21:51Z",
        "manufacturername": "Heiman",
        "modelid": "TS0601",
        "name": "Wohnzimmer Weihnachtsbaum",
        "state": {
            "alert": "none",
            "bri": 254,
            "colormode": "xy",
            "effect": null,
            "hue": 4128,
            "on": false,
            "reachable": false,
            "sat": 16,
            "xy": [
                0.5499,
                0.393
            ]
        },
        "swversion": null,
        "type": "Color dimmable light",
        "uniqueid": "84:2e:14:ff:fe:05:dd:2c-01"
    }

Can you give me a little instruction please what i should do next? :)

ebaauw commented 3 years ago

The manufacturername has been mutilated to "Heiman", causing my code not to recognise it as the Xmas lightstrip. I don't quite know what's causing this, I think I read a report that it fixes itself after restarting deCONZ. I don't know if this is the old database record being restored or a new record. Do you know what was the previous resource id? It should get a new id after deleting the resource and re-pairing the light strip.

jannnfe commented 3 years ago

I think I remember that the device was called Color dimmable light 25 at the beginning and after deleting and adding it was also called Color dimmable light 25. Maybe I have to try again?

ebaauw commented 3 years ago

I'm sorry your guess is as good as mine. Your list above shows id 26 instead of 25, suggesting its a newly created resource, rather than a restored one.

jannnfe commented 3 years ago

I've just tried again using the REST API. The ID changes but is still recognized incorrectly. Shouldn't I have the right foundation with these specifications? Bildschirmfoto 2020-12-05 um 23 31 42

ebaauw commented 3 years ago

That's the right version, afaik.

SwoopX commented 3 years ago

Try reading the manufacturer name from basic cluster in deconz GUI. That should update the name in the DB as well as in Phoscon.

Somberland commented 3 years ago

The Thermostate-thing is also something that occurred (or better is still present) in phoscon. After adding the device to an group I can control it via phoscon. Maybe that's also the reason why homebridge is kinda Buggy for me. Will dump homebridge tomorrow.

BTW: first updated to 2.07. before added those lights the first time.

{
    "etag": "87a89542bf9b9d0aa8134919056844f8",
    "hascolor": true,
    "lastannounced": null,
    "lastseen": "2020-12-05T22:57Z",
    "manufacturername": "_TZE200_s8gkrkxk",
    "modelid": "TS0601",
    "name": "xmas light",
    "state": {
      "bri": 25,
      "colormode": "hs",
      "effect": "none",
      "hue": 53691,
      "on": false,
      "reachable": true,
      "sat": 141
    },
    "swversion": null,
    "type": "Color dimmable light",
    "uniqueid": "58:8e:81:ff:fe:db:7b:be-01"
  }

image

image

jannnfe commented 3 years ago

Try reading the manufacturer name from basic cluster in deconz GUI. That should update the name in the DB as well as in Phoscon.

That worked for me! Thanks everybody for your help :)

SwoopX commented 3 years ago

@Somberland The model identifier is also exposed by some thermostats, so that's the reason why.

https://github.com/dresden-elektronik/deconz-rest-plugin/issues/3304

Smanar commented 3 years ago

BTW I m interested by the log when including the device, if someone still have "heiman" as manufacture name.

jd-network commented 3 years ago

Für die einzelnen Effekte können auch mehrere Farben definiert bzw. übermittelt werden: { "effect": { "effect": "snake", "speed": 100, "colors": [ { "r": 255, "g": 0, "b": 0 }, { "r": 0, "g": 255, "b": 0 }, { "r": 0, "g": 0, "b": 255 } ] } }

https://github.com/Koenkk/zigbee2mqtt.io/blob/master/docs/devices/HG06467.md

OptiMael commented 3 years ago

BTW I m interested by the log when including the device, if someone still have "heiman" as manufacture name.

image image

Mimiix commented 3 years ago

Hi there,

As this topic is slowly turning into a generic help topic, i am closing this off. Phoscon needs to add support by itself, please open a issue in their repository.

@ebaauw told me he wanted to have another PR in regards to this issue. He will keep this issue updated with the latest developments.

If anyone has a issue with this device, feel free to open a user question issue or stop by in our discord server!

Thanks for anyone involved 👍 !

ebaauw commented 3 years ago

The PR is already there, https://github.com/dresden-elektronik/deconz-rest-plugin/issues/3716#issuecomment-736789205. I just want it to be merged in the next (beta) release.