Yeelight - control from LUA

Moderator: leecollings

Post Reply
manjh
Posts: 708
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Yeelight - control from LUA

Post 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?
Hans
manjh
Posts: 708
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Yeelight - control from LUA

Post by manjh »

Anyone?
Hans
JimmyH1969
Posts: 153
Joined: Tuesday 28 June 2016 16:38
Target OS: Windows
Domoticz version: Beta
Location: Amersfoort NL
Contact:

Re: Yeelight - control from LUA

Post by JimmyH1969 »

I have the same lights so i'm gonna follow this one....
manjh
Posts: 708
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Yeelight - control from LUA

Post 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.
Hans
Antikillerbm
Posts: 8
Joined: Sunday 01 April 2018 17:30
Target OS: Linux
Domoticz version:
Contact:

Re: Yeelight - control from LUA

Post 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
Samael
Posts: 27
Joined: Saturday 12 January 2019 11:48
Target OS: Windows
Domoticz version: 4.9701
Contact:

Re: Yeelight - control from LUA

Post 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).
Geitje
Posts: 170
Joined: Monday 22 January 2018 21:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Yeelight - control from LUA

Post 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.
Domoticz beta, on Raspberry Pi 3B, Raspian Buster
Zwave, Zigate, RFlink etc.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests