Page 1 of 1

Yeelight - control from LUA

Posted: Saturday 19 January 2019 16:50
by manjh
I just received my first Yeelight RGBW lamp.
First step was to test from the Yeelight app in Android: works fine.
But being a Domoticz addict, I took it to the next level and installed the Yeelight hardware. Before I did this I set the developer mode in the lamp, assigned a static IP address, and enabled the Yeelight hardware line in Domoticz.
Sure enough after a little while a new device showed up. I set the status to "used", and found a neat new device in the switches. With this I can switch on/off, set the color, and dimlevel. Great.

But the next step was not so successful: I created a little LUA script from the Wiki page. Removed a few little glitches, until it ran OK (or at least without error messages).
Still, whatever I do from the matching dummy dimmers, the lamp does not respond at all.

Any hints?

Re: Yeelight - control from LUA

Posted: Friday 25 January 2019 0:48
by manjh
Anyone?

Re: Yeelight - control from LUA

Posted: Friday 25 January 2019 10:44
by JimmyH1969
I have the same lights so i'm gonna follow this one....

Re: Yeelight - control from LUA

Posted: Friday 25 January 2019 10:59
by manjh
JimmyH1969 wrote: Friday 25 January 2019 10:44 I have the same lights so i'm gonna follow this one....
Just install the Yeelight HW line in Domoticz, and then after a few minutes check the devices tab. All yeelight devices that have been found must be enabled by clicking the green icon, after that a switch will show up and you can use the lamps directly or through a scene.
The problems that I found were in controlling from LUA.

Re: Yeelight - control from LUA

Posted: Sunday 28 July 2019 21:04
by Antikillerbm
I have same problem
I used lua one year but one week ago something happen and all my yeelight devices are not react to commands from lua events anymore
First I tried to interact with API trough node red - it works like before.
Second - I have downgraded my domoticz to release version - but still have same problem

Re: Yeelight - control from LUA

Posted: Saturday 07 December 2019 13:43
by Samael
I faced with the same problem. This happened after some IP reconfiguration, so Yeelight devices in Domoticz got a new ID numbers. I deleted script and created a new one - only after that Domoticz began use a new ID of the lamp (changing the script did nothing).

Re: Yeelight - control from LUA

Posted: Saturday 07 December 2019 16:56
by Geitje
Be also sure to enable "LAN control" in the Yeelight app. Use static IP's for your lights. For me the script is working right. I followed the description.