Page 10 of 18
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Posted: Wednesday 16 November 2016 11:19
by Westcott
Thanks, yes, but I really don't know what I did to get it to work.
Now to find out how to control it with Lua, although the 'Limitless' Wiki has nothing.
Might have to do it with YeeLight API calls, or the yee app I found.
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Posted: Saturday 19 November 2016 3:32
by cookerrr
I've ordered one of these yellights, and am very excited to play with it within domoticz. I've had a few milights with the wifi module and have sort of been unsatisfied with there reliability. I have it set to send commands multiple times cause it seems like sometimes it loses a udp packet for the command. I know this yeelight uses tcp. Does your plugin receive the acknowledgment packets to verify the yeelight received the command, and if it doesn't will it reissue the command to make sure the light gets it? just wondering as this would make this light bulb work allot better than the milight.
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Posted: Saturday 19 November 2016 10:44
by Westcott
Hi Cookerrr,
I can't answer for Corbin, who wrote the plugin, but the GUI updates if you change the lamp with another app.
My experience is that the light is rock-solid at receiving commands.
According to the API the lamp immediately sends a response to every command received.
The lamp does all of the hard work interpreting each command, so you can tell it to run a long sequence, it says OK and gets on with it.
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Posted: Saturday 19 November 2016 11:14
by Mazzokun
I have a question, why homebridge can't start if i'm using together er npm homebridge-yeelight plugin and this domoticz-yeelight plugin?
The Yeelight bulb in domoticz are on roomplan 2 and homebridge devices are on room plan 3..
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Posted: Saturday 19 November 2016 19:25
by LouiS22
Hi folks, one question:
Is it possible to group several bulbs to act parallel (for example 2 or 4 light switching on or off together)?
Re: RE: Re: [Plugin now available in Beta] Help with Yeelight Bulb
Posted: Sunday 20 November 2016 9:05
by deennoo
LouiS22 wrote:Hi folks, one question:
Is it possible to group several bulbs to act parallel (for example 2 or 4 light switching on or off together)?
Using scene or group ? That perfect for this kind of asking
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Posted: Monday 21 November 2016 13:25
by corbin
Westcott wrote:Hi Cookerrr,
I can't answer for Corbin, who wrote the plugin, but the GUI updates if you change the lamp with another app.
My experience is that the light is rock-solid at receiving commands.
According to the API the lamp immediately sends a response to every command received.
The lamp does all of the hard work interpreting each command, so you can tell it to run a long sequence, it says OK and gets on with it.
Yep, that sums it up pretty much.
I do have a different architecture for the code that works better than the polling method (maintaining a TCP socket to each light), but its been put on hold because it introduced another issue that I haven't worked around as yet.
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Posted: Wednesday 23 November 2016 21:36
by deennoo
Hi there finally got my first one rgbw bulb.
Immediately try with Domoticz. trying various brightness, disco etc etc makes my domoticz crash (have to reboot my VM) using last stable.
After reboot all is ok.
About white color, got an idea, don't know yet if bulb work like this, and if it's possible with Domoticz :
- Instead of create only 1 device, what about set 2 devices ?
- One for RGB bulb part : like milight RGB parts with dimmer of course.
- Second for White bulb part : like rgb one but only one color panel from yellow to cold white with dimmer of course.
Re: Help with Yeelight Bulb
Posted: Wednesday 23 November 2016 22:17
by deennoo
weiweipossible wrote:
For example, set following command to bulb and you will see "sunrise" effect:
{"id":1, "method":"start_cf", "params":[3,1,"50,1,16731392,1,360000,2,1700,10,540000,2,2700,100"]}
Please refer to the inter-operation spec (page 12) for detailed explanation.
BTW, if your bulb is in OFF state, use "set_scene" command instead of "start_cf", which is to turn on the bulb firstly and then start color flow effect.
-Wilson
I just try :
Code: Select all
nico@maison:~$ echo -ne '{"id":1, "method":"set_scene", "params":[3,1,"50,1,16731392,1,360000,2,1700,10,540000,2,2700,100"]}\r\n' | nc -w1 192.168.0.207 55443
With my bulb set off by domoticz way and i get this :
Code: Select all
{"id":1, "error":{"code":-5000,"message":"general error"}}
bulb fw : 1.4.1_45
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Posted: Thursday 24 November 2016 0:03
by Westcott
Hi Deennoo,
It's not quite that simple, 'set_scene' has a very different syntax, see here for the full spec -
http://www.yeelight.com/download/Yeelig ... n_Spec.pdf
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Posted: Thursday 24 November 2016 0:22
by deennoo
Done on me side, to follow your work : did you change update script to your repro or do i need to recompil each time ?
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Posted: Thursday 24 November 2016 3:25
by corbin
deennoo wrote:Hi there finally got my first one rgbw bulb.
Immediately try with Domoticz. trying various brightness, disco etc etc makes my domoticz crash (have to reboot my VM) using last stable.
After reboot all is ok.
Are you still having a crash problem if you use Yeelight after the reboot?
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Posted: Thursday 24 November 2016 3:28
by corbin
You will need to recompile each time you make a change, which was fairly quick in my Linux VM.
Re: RE: Re: [Plugin now available in Beta] Help with Yeelight Bulb
Posted: Thursday 24 November 2016 7:54
by deennoo
corbin wrote:deennoo wrote:Hi there finally got my first one rgbw bulb.
Immediately try with Domoticz. trying various brightness, disco etc etc makes my domoticz crash (have to reboot my VM) using last stable.
After reboot all is ok.
Are you still having a crash problem if you use Yeelight after the reboot?
No don't know what happen.
No problem with jour github master version
Re: RE: Re: [Plugin now available in Beta] Help with Yeelight Bulb
Posted: Thursday 24 November 2016 7:56
by deennoo
corbin wrote:
You will need to recompile each time you make a change, which was fairly quick in my Linux VM.
Ok done thx
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Posted: Friday 25 November 2016 21:29
by stromboli59
Hi,
I have the yeelight bulb white and i integrated the bulb in lua. it works but when i use the xiaomi app domoticz is not refresh.
it's normal because i don't keep the connection alive.
how i proceed:
I wrote a script in python to discover the id of my bulb (with udp)
When i receipt the id and the ip adress, i wrote a script in lua (with tcp).
Before to open socket in lua with domoticz i upgrade lua to accept socket.
i use the api of the color yeelight bulb to do this and i'm lucky because it's the same api.
If you want i can wrote a procedure and give you my script.
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Posted: Saturday 26 November 2016 0:10
by deennoo
Just working on white bulb integration with domoticz (without lua or python) just missing the full light button and i will send a pull request.
Working on a lua script to have a dimmer for white color temp (from 1700 to 6500) just missing time to finish order send.
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Posted: Saturday 26 November 2016 20:36
by deennoo
Hi there.
On my side a made a LUA Script for change white temp from warm to cold.
Need a dummy selector change as a dimmer and this script_device_yourname.lua (or set it on the events editor :
Code: Select all
commandArray = {}
DomDevice = 'dimmyee'; --dummy selector switch set as a dimmer slide
IP = '192.168.0.207'; --yeelight bulb ip
PORT = '55443' -- yeelight bulb port
if devicechanged[DomDevice] then
if(devicechanged[DomDevice]=='Off') then
DomValue = 0;
else
DomValue = otherdevices_svalues[DomDevice];
CalcValue = ((DomValue-1) * 48)+1700;
end
if CalcValue==nil then CalcValue=0 end
runcommand = "sudo echo -ne '{\"id\":1,\"method\":\"set_ct_abx\",\"params\":[" .. CalcValue .. " ,\"smooth\", 500]}\\r\\n' | nc -w1 " .. IP .. " " .. PORT .. "";
os.execute(runcommand);
--print(runcommand)
--print("Color Temp= "..CalcValue);
end
--Surely this fonction have to be native on domoticz with json api
return commandArray
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Posted: Wednesday 30 November 2016 10:17
by corbin
I'm fixing up some of the Yeelight commands, and for the mono light there is warm and cool white buttons. Are these modes possible with the mono light?
- warmcool.PNG (58.07 KiB) Viewed 2490 times
Re: RE: Re: [Plugin now available in Beta] Help with Yeelight Bulb
Posted: Wednesday 30 November 2016 12:49
by deennoo
corbin wrote:I'm fixing up some of the Yeelight commands, and for the mono light there is warm and cool white buttons. Are these modes possible with the mono light?
warmcool.PNG
No works with rgbw too, all my test are made with this one