[Plugin now available in Beta] Help with Yeelight Bulb

Moderator: leecollings

Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: [Plugin now available in Beta] Help with Yeelight Bulb

Post by Derik »

corbin wrote:To compile my latest version, follow the instructions on the wiki at http://www.domoticz.com/wiki/Installing ... rom_Source

but you will need to change

Code: Select all

git clone https://github.com/domoticz/domoticz.git dev-domoticz
to

Code: Select all

git clone https://github.com/corbinmunce/domoticz.git dev-domoticz
@ corbin,

Was thinking that your solution is a extra option for the Yeelight...
What are the different things in your build and the last beta?
Do i get no problem with my system, when i use your git?
When are your options in the last beta? [ that is what i run always. ]

otherwise, wat are the extra's when i use the git from you?
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
User avatar
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

Post by corbin »

I don't think you will have any problem as it is forked from the beta.

It just has some of the functionality you mentioned - brightness up, brightness down, night mode. If it is too much trouble to compile, wait till I've got it in the official beta.
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
User avatar
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

Post by corbin »

I have a question with how Domoticz should operate:

If a light is in an off state, and you then use Domoticz to change the brightness or colour of that light, would you like Domoticz to turn the light on before adjusting the colour/brightness?
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
deennoo
Posts: 784
Joined: Wednesday 10 December 2014 13:06
Target OS: Linux
Domoticz version: beta
Location: Bordeaux France
Contact:

Re: RE: Re: [Plugin now available in Beta] Help with Yeelight Bulb

Post by deennoo »

corbin wrote:I have a question with how Domoticz should operate:

If a light is in an off state, and you then use Domoticz to change the brightness or colour of that light, would you like Domoticz to turn the light on before adjusting the colour/brightness?
Just order 2 yeelight, one rgbw and one ww/wc.

Actually got some milight, don't know if this a api limitation, but when turn On to 50% and bulb was previous at 75% we can see the change, who is not good on a bedroom light.

If brightness/color can be change before turn ON, this will make it more 'qualitative'
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
User avatar
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

Post by corbin »

The brightness can be changed before switching on (actually I'm currently sending the on command first, then immediately after I send the brightness command, in practice this appears to turn on the light at the specified brightness immediately)

So there is no problem to turn the light on at the specific brightness.

And I think I will leave it operating this way - always sending the on command first - so any command other than off will turn the light on.
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
domer
Posts: 7
Joined: Thursday 20 October 2016 7:02
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: [Plugin now available in Beta] Help with Yeelight Bulb

Post by domer »

RGBW bulbs and led strips arrived and got them working but led strip is recognized as "white" whereas it should be RGBW. How I can change this?

Thanks
User avatar
gizmocuz
Posts: 2352
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: [Plugin now available in Beta] Help with Yeelight Bulb

Post by gizmocuz »

domer wrote:RGBW bulbs and led strips arrived and got them working but led strip is recognized as "white" whereas it should be RGBW. How I can change this?
Thanks
Thats hard to debug, you have to sniff with wireshark
But try adding it manually (from the hardware setup page), specifying it's IP address and the type RGBW
Quality outlives Quantity!
domer
Posts: 7
Joined: Thursday 20 October 2016 7:02
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: [Plugin now available in Beta] Help with Yeelight Bulb

Post by domer »

gizmocuz wrote:Thats hard to debug, you have to sniff with wireshark
But try adding it manually (from the hardware setup page), specifying it's IP address and the type RGBW
Did it easy way and added it manually and strip works as RGBW now. Thanks!
ErikJ
Posts: 16
Joined: Saturday 13 June 2015 9:01
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: [Plugin now available in Beta] Help with Yeelight Bulb

Post by ErikJ »

Hi,

Are there are some more users who have difficulties to get the right warm white color? In my configuration the color is between very warm white (little orange) or warm white with a slightly green. At this moment I use the code: ff8800 (hue 30). I also have Hue bulbs but they have a different code for the same color: d0ff00 (hue 71). If I switch the codes between the hue and the Yeelight they are not the same (Hue color on Yeelight turns green, and Yeelight color on hue more orange).

If I use the Yeelink app on my iPhone, I can configure the perfect color. A color which is more similar with a traditional warm white bulb. The annoying thing is that I cannot recreate that color within Domoticz.

Are there some more options to adjust the colors different?
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

Post by deennoo »

As yeelight got lot of product. This one looks great : http://m.gearbest.com/table-lamps/pp_36 ... d=10195626

A WW WC desklamp got a wifi connection, does api is the same as the e27 ones ?
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
User avatar
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

Post by corbin »

ErikJ wrote:Hi,

Are there are some more users who have difficulties to get the right warm white color? In my configuration the color is between very warm white (little orange) or warm white with a slightly green. At this moment I use the code: ff8800 (hue 30). I also have Hue bulbs but they have a different code for the same color: d0ff00 (hue 71). If I switch the codes between the hue and the Yeelight they are not the same (Hue color on Yeelight turns green, and Yeelight color on hue more orange).

If I use the Yeelink app on my iPhone, I can configure the perfect color. A color which is more similar with a traditional warm white bulb. The annoying thing is that I cannot recreate that color within Domoticz.

Are there some more options to adjust the colors different?
Can you experiment to find the correct code for warm light?

I've tried the two hex codes, and can confirm I'm getting orange for FF8800 and green for D0FF00.

I don't know what warm white should look like - maybe take a screenshot from the iPhone App?

Also you could try experimenting by with this command, just change the decimal value and ip address-

0xFF8800 - 16746496 (Decimal)

Code: Select all

echo -ne '{"id":1,"method":"set_rgb","params":[16746496, "smooth", 500]}\r\n' | nc -w1 192.168.5.17 55443

Code: Select all

Method: set_rgb
Usage: This method is used to change the color of a smart LED.
Parameters: 3.
"rgb_value" is the target color, whose type is integer. It should be
expressed in decimal integer ranges from 0 to 16777215 (hex: 0xFFFFFF).
 "effect": Refer to "set_ct_abx" method.
 "duration": Refer to "set_ct_abx" method.
Request Example: {"id":1,"method":"set_rgb","params":[255, "smooth", 500]}
Response Example: {"id":1, "result":["ok"]}
NOTE: Only accepted if the smart LED is currently in "on" state.
Last edited by corbin on Monday 14 November 2016 11:35, edited 1 time in total.
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
User avatar
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

Post by corbin »

deennoo wrote:As yeelight got lot of product. This one looks great : http://m.gearbest.com/table-lamps/pp_36 ... d=10195626

A WW WC desklamp got a wifi connection, does api is the same as the e27 ones ?
It should work with the same api, but like the strip light I don't have one to test.
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
User avatar
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

Post by corbin »

The colour codes here http://planetpixelemporium.com/tutorialpages/light.html look to match up to what the Yeelight outputs.

ie Cool White Fluorescent
212, 235, 255 = D4EBFF = 13954047

Code: Select all

echo -ne '{"id":1,"method":"set_rgb","params":[13954047, "smooth", 500]}\r\n' | nc -w1 192.168.5.17 55443
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
ErikJ
Posts: 16
Joined: Saturday 13 June 2015 9:01
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: [Plugin now available in Beta] Help with Yeelight Bulb

Post by ErikJ »

corbin wrote:The colour codes here http://planetpixelemporium.com/tutorialpages/light.html look to match up to what the Yeelight outputs.

ie Cool White Fluorescent
212, 235, 255 = D4EBFF = 13954047

Code: Select all

echo -ne '{"id":1,"method":"set_rgb","params":[13954047, "smooth", 500]}\r\n' | nc -w1 192.168.5.17 55443
Hi Corbin,

Maybe stupid question, but where can I use these commands within Domoticz? I'm not familiar with scripts ore other programming. I would like to, but till now I don’t know where to start. So if you can point me in the right direction I will give it a try.

Second question, where did you find the translation for the color: 212, 235, 255 = D4EBFF = 13954047?
User avatar
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

Post by corbin »

Hi ErikJ,
You can run that command from the command line - Does your Synology have access to one? Or if you have Linux it should work on that too.

That translation is converting from 3 decimal numbers (RGB) to 3 Hex numbers, and then to a single decimal

On Windows there is the built in calculator, put it in programmer mode and then it will convert between decimal and hex for you. There are also heaps of web pages that will do it as well, eg http://www.subnetonline.com/pages/conve ... to-dec.php
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
deennoo
Posts: 784
Joined: Wednesday 10 December 2014 13:06
Target OS: Linux
Domoticz version: beta
Location: Bordeaux France
Contact:

Re: RE: Re: [Plugin now available in Beta] Help with Yeelight Bulb

Post by deennoo »

corbin wrote:
It should work with the same api, but like the strip light I don't have one to test.
Ok, will ask one to Santa...

Mine e27 just left china...
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
ErikJ
Posts: 16
Joined: Saturday 13 June 2015 9:01
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: [Plugin now available in Beta] Help with Yeelight Bulb

Post by ErikJ »

corbin wrote:Hi ErikJ,
You can run that command from the command line - Does your Synology have access to one? Or if you have Linux it should work on that too.

That translation is converting from 3 decimal numbers (RGB) to 3 Hex numbers, and then to a single decimal

On Windows there is the built in calculator, put it in programmer mode and then it will convert between decimal and hex for you. There are also heaps of web pages that will do it as well, eg http://www.subnetonline.com/pages/conve ... to-dec.php
Hi Corbin,

The command line was no option on the Synology (no result). So I installed a copy of ubuntu and with the line you provide me I can change the color. But even than no luck with getting the right color. I also discovered that not all hex codes could be converted to decimal (for example (100W Tungsten) 255, 214, 170 = #FFD6AA = error decimal). And if I use the code #FFD6AA in Domoticz the Yeelight light turns green and the hue also.

I used these sites for the conversion http://www.rapidtables.com/convert/color/rgb-to-hex.htm and http://www.rapidtables.com/convert/numb ... =%23800080

Is there a way to read out the color of the lamp itself?
User avatar
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

Post by Westcott »

Sending FFD6AA to mine (using yee) gives a sort of day white ~4000.
FFBB66 is close to 3000
The YeeLight API supports colour temperature commands
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
User avatar
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

Post by corbin »

ErikJ wrote:
Hi Corbin,

The command line was no option on the Synology (no result). So I installed a copy of ubuntu and with the line you provide me I can change the color. But even than no luck with getting the right color. I also discovered that not all hex codes could be converted to decimal (for example (100W Tungsten) 255, 214, 170 = #FFD6AA = error decimal). And if I use the code #FFD6AA in Domoticz the Yeelight light turns green and the hue also.

I used these sites for the conversion http://www.rapidtables.com/convert/color/rgb-to-hex.htm and http://www.rapidtables.com/convert/numb ... =%23800080

Is there a way to read out the color of the lamp itself?
FFD6AA = 16766634 in Decimal (converts ok using the sites you linked to)
I put this into the command line, and it results in a white coloured light.

Yes you can get the current light color - see "3.1 Search request and response" in the docs https://www.yeelight.com/download/Yeeli ... n_Spec.pdf


or try sending

Code: Select all

{"id":1,"method":"get_prop","params":["power","rgb"]}\r\n
Last edited by corbin on Wednesday 16 November 2016 10:56, edited 2 times in total.
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
User avatar
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

Post by corbin »

Westcott wrote:Sending FFD6AA to mine (using yee) gives a sort of day white ~4000.
FFBB66 is close to 3000
The YeeLight API supports colour temperature commands
Hi Westcott,
From the Yeelight forum, I saw you got developer mode working!

Awesome :)
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests