That would be helpful, thanksbertbigb wrote:I do that with something like:LouiS22 wrote:Is it possible to control groups (for ex: 4 bulbs simultaneously) with the script posted on domoticz wiki?
Then you call such a function like:Code: Select all
--YEELIGHT -- port number for the yeelights PORT = '55443' --IP adresses of the bulbs involved, local IPs = {'192.168.2.80', '192.168.2.81', '192.168.2.82', '192.168.2.83', '192.168.2.84', '192.168.2.85'} function YeelightOff() --command Yeelight Off for n,IP in pairs(IPs) do runcommandYeelight = "sudo echo -ne '{\"id\":"..n..",\"method\":\"set_power\", \"params\":[\"off\", \"smooth\", 500]}\\r\\n' | /opt/bin/nc -w1 " ..IP.." " ..PORT..""; os.execute(runcommandYeelight) end end function YeelightTemperature(WhiteYee, DimYee, DurationYee) --Yeelight part for n,IP in pairs(IPs) do --runcommandYeelight = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\",\"params\":[\"ct\", " .. WhiteYee .. "," .. DimYee .. "]}\\r\\n' | nc -w1 " ..IP.." " ..PORT..""; --runcommandYeelight = "sudo echo -ne '{\"id\":1,\"method\":\"set_ct_abx\",\"params\":[" .. WhiteYee .. ",\"smooth\","..DurationYee.."]}\\r\\n' | nc -w1 " ..IP.." " ..PORT..""; runcommandYeelight ="sudo echo -ne '{\"id\":"..n..",\"method\":\"start_cf\",\"params\":[1,1,\"" ..DurationYee..",2,"..WhiteYee..","..DimYee.."\"]}\\r\\n' | /opt/bin/nc -w1 " ..IP.." " ..PORT..""; if debug then print(runcommandYeelight) end os.execute(runcommandYeelight) end end
YeelightOff() or something like YeelightTemperature(WhiteYeeValue, DimYeeValue, DurationYeeValue)
The function will run for all IP's in the list IPs
Hope this helps you.
If you want i can share the complete scripts if that is more helpful
[Plugin now available in Beta] Help with Yeelight Bulb
Moderator: leecollings
- LouiS22
- Posts: 433
- Joined: Friday 27 February 2015 13:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Budapest, Hungary
- Contact:
Re: [Plugin now available in Beta] Help with Yeelight Bulb
-
bertbigb
- Posts: 147
- Joined: Thursday 13 August 2015 13:36
- Target OS: NAS (Synology & others)
- Domoticz version: beta
- Location: Netherlands
- Contact:
Re: [Plugin now available in Beta] Help with Yeelight Bulb
I put the script atLouiS22 wrote:
That would be helpful, thanks
Yeelight and Hue lights - use same settings
http://www.domoticz.com/forum/viewtopic ... 61&t=16233
Best regards Bert
Synology DS1517+ - DSM 6.2
Raspberry PI2-B, Raspberry Nano - Raspberry PI3 - model B
Xiaomi Gateway - Philips HUE Lights - Zwave - RFXCom(E) with KaKu and other 433MHz devices - Yeelight Lights - Toon
Synology DS1517+ - DSM 6.2
Raspberry PI2-B, Raspberry Nano - Raspberry PI3 - model B
Xiaomi Gateway - Philips HUE Lights - Zwave - RFXCom(E) with KaKu and other 433MHz devices - Yeelight Lights - Toon
-
hekm77
- Posts: 45
- Joined: Thursday 09 February 2017 18:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Hi Westcott.Westcott wrote:The code can be included with -
package.path = '/home/pi/domoticz/scripts/lua/?.lua;' .. package.path
YEE = require("Yee")
It can be run either from Domoticz Lua, or from a stand-alone Lua test script.
It should be able to support multiple lamps, but that's untested.
It uses a socket, but could probably use io.popen(url) instead to get the lamp's status.
I am newbie. Can you help me how to use your script?
Explain it to me like I'm a five-year-old
- Westcott
- Posts: 423
- Joined: Tuesday 09 December 2014 17:04
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: UK - Glos
- Contact:
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Hi Hekm77,
Thanks for your interest, but sorry to say I have not made a script.
What I have created is a library of functions that can be called from other Lua scripts.
It's intended for experienced users who do not need detailed instruction, and requires extra Lua libraries to be installed.
Thanks for your interest, but sorry to say I have not made a script.
What I have created is a library of functions that can be called from other Lua scripts.
It's intended for experienced users who do not need detailed instruction, and requires extra Lua libraries to be installed.
Zwave - Sigma Z+ stick, Fibaro, Horstmann, Neo Coolcam, EUROtronic
RFlink - IR detectors and temperatures
Wifi - YeeLights, ESP32s, Anoop sockets
Zigbee - lots with zigbee2mqtt and ZbBridge
RFlink - IR detectors and temperatures
Wifi - YeeLights, ESP32s, Anoop sockets
Zigbee - lots with zigbee2mqtt and ZbBridge
-
hekm77
- Posts: 45
- Joined: Thursday 09 February 2017 18:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Thanks for the answer. But I'm learning and I want to understand. Where to get extra Lua libraries?Westcott wrote:Hi Hekm77,
Thanks for your interest, but sorry to say I have not made a script.
What I have created is a library of functions that can be called from other Lua scripts.
It's intended for experienced users who do not need detailed instruction, and requires extra Lua libraries to be installed.
- LouiS22
- Posts: 433
- Joined: Friday 27 February 2015 13:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Budapest, Hungary
- Contact:
Re: [Plugin now available in Beta] Help with Yeelight Bulb
So guy, just a quick heads up. A while ago I asked the RGBW led's default color temperature. Well, I just installed the white only version and it seems that the RGBWs default (I mean when you install and first switch it on
) color temperature is exactly the same as the white ones (4000K). Might be useful information for someone don't need the color options but wants a decent (and not too cold white) wifi led.
-
deennoo
- Posts: 784
- Joined: Wednesday 10 December 2014 13:06
- Target OS: Linux
- Domoticz version: beta
- Location: Bordeaux France
- Contact:
Re: [Plugin now available in Beta] Help with Yeelight Bulb
We are working with Corbin on YeeLight ceiling bulb.
Domoticz got à exclusive feature : nightlight same as the YeeLight app.
Domoticz got à exclusive feature : nightlight same as the YeeLight app.
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
-
westd001
- Posts: 22
- Joined: Friday 28 August 2015 21:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Hi Guys,
Just got a Yeelight bulb from China and followed the wiki to add the controller hardware, scripts etc. The bulb is working fine and I can control it via the virtual Yeelight Dimmer en Temp switch/dimmer. But the bulb doesn't appear in the Devices tab. In the logging every minute the bulb is found (2017-03-05 21:10:13.709 YeeLight: New Light Found (192.168.2.110/YeeLight LED (Color))) but isn't added to the device list.
Somebody has the same experience or something else wrong ?
Thanks in advance
Just got a Yeelight bulb from China and followed the wiki to add the controller hardware, scripts etc. The bulb is working fine and I can control it via the virtual Yeelight Dimmer en Temp switch/dimmer. But the bulb doesn't appear in the Devices tab. In the logging every minute the bulb is found (2017-03-05 21:10:13.709 YeeLight: New Light Found (192.168.2.110/YeeLight LED (Color))) but isn't added to the device list.
Somebody has the same experience or something else wrong ?
Thanks in advance
-
deennoo
- Posts: 784
- Joined: Wednesday 10 December 2014 13:06
- Target OS: Linux
- Domoticz version: beta
- Location: Bordeaux France
- Contact:
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Have you add it ? From device tab ? Click on the green arrow...À domoticz basic
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
-
westd001
- Posts: 22
- Joined: Friday 28 August 2015 21:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [Plugin now available in Beta] Help with Yeelight Bulb
That's the point, it doesn't show up in the device tab
-
deennoo
- Posts: 784
- Joined: Wednesday 10 December 2014 13:06
- Target OS: Linux
- Domoticz version: beta
- Location: Bordeaux France
- Contact:
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Even on not used one ?
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
-
westd001
- Posts: 22
- Joined: Friday 28 August 2015 21:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [Plugin now available in Beta] Help with Yeelight Bulb
No Yeelight devices at all
- corbin
- Posts: 463
- Joined: Saturday 20 August 2016 22:57
- Target OS: Windows
- Domoticz version: Beta
- Location: Brisbane, Australia
- Contact:
Re: [Plugin now available in Beta] Help with Yeelight Bulb
and other devices still add ok? what if you use the 'add light' button on the hardware page? also try with different ip for testing, ie 192.168.5.2
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
-
westd001
- Posts: 22
- Joined: Friday 28 August 2015 21:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Other devices still add Ok, I made a few virtual switches to test the Yeelight with dimmer values and temperature via LUA scripts, that works fine.
After adding a "Yeelight test" bulb via the 'add light' button on the Yeelight controller at the hardware page no device appear in de device tab, in the log there is :
2017-03-06 20:42:09.925 YeeLight: New Light Found (192.168.2.5/Yeelight test),
further down the log file every minute he finds a new Yeeligth (with the correct IP adress and the default name) but still doesn't appear in the device tab:
2017-03-06 20:43:51.413 YeeLight: New Light Found (192.168.2.110/YeeLight LED (Color))
By the way, I use the last beta version of Domoticz.
After adding a "Yeelight test" bulb via the 'add light' button on the Yeelight controller at the hardware page no device appear in de device tab, in the log there is :
2017-03-06 20:42:09.925 YeeLight: New Light Found (192.168.2.5/Yeelight test),
further down the log file every minute he finds a new Yeeligth (with the correct IP adress and the default name) but still doesn't appear in the device tab:
2017-03-06 20:43:51.413 YeeLight: New Light Found (192.168.2.110/YeeLight LED (Color))
By the way, I use the last beta version of Domoticz.
-
westd001
- Posts: 22
- Joined: Friday 28 August 2015 21:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: RE: Re: [Plugin now available in Beta] Help with Yeelight Bulb
Somebody knows a solution? or a workaround?westd001 wrote:Other devices still add Ok, I made a few virtual switches to test the Yeelight with dimmer values and temperature via LUA scripts, that works fine.
After adding a "Yeelight test" bulb via the 'add light' button on the Yeelight controller at the hardware page no device appear in de device tab, in the log there is :
2017-03-06 20:42:09.925 YeeLight: New Light Found (192.168.2.5/Yeelight test),
further down the log file every minute he finds a new Yeeligth (with the correct IP adress and the default name) but still doesn't appear in the device tab:
2017-03-06 20:43:51.413 YeeLight: New Light Found (192.168.2.110/YeeLight LED (Color))
By the way, I use the last beta version of Domoticz.
Verstuurd vanaf mijn SM-G920F met Tapatalk
-
Thunderbolt
- Posts: 7
- Joined: Saturday 03 August 2013 12:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.11665
- Location: Germany
- Contact:
Re: [Plugin now available in Beta] Help with Yeelight Bulb
If not already said, it works with the Yeelight ceiling light, too. Thanks a lot for that!!!!
I did everything in the wiki, but changed the command for the white temperature color (Discussion page) to just change the color, but not the brightness.
EDIT
And had to change the color calculation.
CalcValue = ((DomValue-1) * 38)+2700;
I did everything in the wiki, but changed the command for the white temperature color (Discussion page) to just change the color, but not the brightness.
EDIT
And had to change the color calculation.
CalcValue = ((DomValue-1) * 38)+2700;
Last edited by Thunderbolt on Wednesday 15 March 2017 21:40, edited 1 time in total.
-
westd001
- Posts: 22
- Joined: Friday 28 August 2015 21:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: [Plugin now available in Beta] Help with Yeelight Bulb
I found the solution, Domoticz automatically finds my Yeelight but only add it to the device list when new hardware is enabled (for 5 minutes) lol
Verstuurd vanaf mijn SM-G920F met Tapatalk
Verstuurd vanaf mijn SM-G920F met Tapatalk
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Hello i am a new to this domoticz thing but i have somehow managed to add my yeelight to my domoticz explorer and it is awesome but i have a question for you, how can i add a FLOW fuction? Can someone please explain it in more easy way?
Thank you so much.
Thank you so much.
- corbin
- Posts: 463
- Joined: Saturday 20 August 2016 22:57
- Target OS: Windows
- Domoticz version: Beta
- Location: Brisbane, Australia
- Contact:
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Have you seen the examples on https://www.domoticz.com/wiki/Yeelight# ... lb_Only.29?
should be simple to modify with the colour flow command, eg:
should be simple to modify with the colour flow command, eg:
Code: Select all
{"id":1,"method":"start_cf","params":[ 4, 2, "1000, 2, 2700, 100, 500, 1, 255, 10, 5000, 7, 0,0, 500, 2, 5000, 1"]Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Hello,
My 2 cents about an alternative method to control Yeelight bulbs from LUA.
I'm using yeecli ( https://pypi.python.org/pypi/yeecli ), via a system call :
Greg
My 2 cents about an alternative method to control Yeelight bulbs from LUA.
I'm using yeecli ( https://pypi.python.org/pypi/yeecli ), via a system call :
Code: Select all
os.execute('/opt/bin/yeecli/cli.py --ip 10.0.0.2 -e smooth -d 500 rgb 007fce')
Who is online
Users browsing this forum: Bing [Bot] and 1 guest