[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 »

Thanks...
The trick "Lan beheer" does the job..
Also in android..

xxx
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
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 »

Boredcat wrote: Saturday 06 January 2018 9:40
Derik wrote: Thursday 04 January 2018 11:53 Dear All.

Is there perhaps someone that have the "new" app working from the yeelight bulb?
In the old app new how to set the bulb in developermode..
Only i cannot fin this in the new app...

Hope there is some one smarter then myself:-)

thanks
How to go developermode in the Yeelight app.

Select the light
In the right down corner (Ios App) there is a triangle with a line below, select that.
The you see LAN Beheer (With be named differently in the English app)
Select that and you can enable/dsiable develop mode
Thanks!!
chrispazz
Posts: 81
Joined: Friday 08 July 2016 10:38
Target OS: -
Domoticz version:
Contact:

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

Post by chrispazz »

Any news about the switch status update when wall switch is powered off?

thank you
madrian
Posts: 231
Joined: Saturday 27 August 2016 1:18
Target OS: -
Domoticz version:
Contact:

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

Post by madrian »

+1
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 »

dear all...

My Android app from yeelight is updated..
Now i can see candle and romance and etc scenes

I like to have this script into Domoticz...
Is ther perhaps someone that have this scripts working??
Script or plugin or??

Thanks!!!
My wife will make love when i set the bulb in to romance...:-)
So hope for a fast ....

xxxx
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
madrian
Posts: 231
Joined: Saturday 27 August 2016 1:18
Target OS: -
Domoticz version:
Contact:

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

Post by madrian »

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 »

dear all..
Are there more people that have strange working yeelight after te last update:V3.9168 Build Hash: 5f4b6858 Build Date: 2018-04-02 15:54:41

Code: Select all

2018-04-03 07:16:44.669 Yeelight::udp_server::HandleIncoming found set_ct_abx
2018-04-03 07:16:44.669 Yeelight::udp_server::HandleIncoming found set_rgb
2018-04-03 07:16:44.669 Yeelight::udp_server::HandleIncoming found set_rgb and set_ct_abx
2018-04-03 07:16:44.669 Yeelight::udp_server::HandleIncoming mode: 1, Support: get_prop set_default set_power toggle set_bright start_cf stop_cf set_scene cron_add cron_get cron_del set_ct_abx set_rgb set_hsv set_adjust adjust_bright adjust_ct adjust_color set_music set
2018-04-03 07:16:44.670 Yeelight::InsertUpdateSwitch colorMode: 1, Bri: 55, Hue: 290, Sat: 100, RGB: 14156031, CT: 4000
2018-04-03 07:16:44.670 YeeLight: New Light Found (192.168.5.33/YeeLight LED (Color))
2018-04-03 07:16:44.671 Yeelight::udp_server::HandleIncoming found set_ct_abx
2018-04-03 07:16:44.671 Yeelight::udp_server::HandleIncoming found set_rgb
2018-04-03 07:16:44.671 Yeelight::udp_server::HandleIncoming found set_rgb and set_ct_abx
2018-04-03 07:16:44.671 Yeelight::udp_server::HandleIncoming mode: 1, Support: get_prop set_default set_power toggle set_bright start_cf stop_cf set_scene cron_add cron_get cron_del set_ct_abx set_rgb set_hsv set_adjust set_music set_name
2018-04-03 07:16:44.671 Yeelight::InsertUpdateSwitch colorMode: 1, Bri: 100, Hue: 204, Sat: 100, RGB: 16711680, CT: 2700
2018-04-03 07:16:44.671 YeeLight: New Light Found (192.168.5.32/YeeLight LED (Color))
2018-04-03 07:16:44.671 Yeelight::udp_server::HandleIncoming found set_ct_abx
2018-04-03 07:16:44.671 Yeelight::udp_server::HandleIncoming found set_rgb
2018-04-03 07:16:44.671 Yeelight::udp_server::HandleIncoming found set_rgb and set_ct_abx
2018-04-03 07:16:44.672 Yeelight::udp_server::HandleIncoming mode: 1, Support: get_prop set_default set_power toggle set_bright start_cf stop_cf set_scene cron_add cron_get cron_del set_ct_abx set_rgb set_hsv set_adjust adjust_bright adjust_ct adjust_color set_music set
2018-04-03 07:16:44.672 Yeelight::InsertUpdateSwitch colorMode: 1, Bri: 100, Hue: 229, Sat: 100, RGB: 16762624, CT: 4000
2018-04-03 07:16:44.672 YeeLight: New Light Found (192.168.5.35/YeeLight LED (Color))
2018-04-03 07:16:44.672 Yeelight::udp_server::HandleIncoming found set_ct_abx
2018-04-03 07:16:44.672 Yeelight::udp_server::HandleIncoming found set_rgb
2018-04-03 07:16:44.672 Yeelight::udp_server::HandleIncoming found set_rgb and set_ct_abx
2018-04-03 07:16:44.672 Yeelight::udp_server::HandleIncoming mode: 1, Support: get_prop set_default set_power toggle set_bright start_cf stop_cf set_scene cron_add cron_get cron_del set_ct_abx set_rgb set_hsv set_adjust set_music set_name
2018-04-03 07:16:44.672 Yeelight::InsertUpdateSwitch colorMode: 1, Bri: 85, Hue: 228, Sat: 100, RGB: 13311, CT: 4000
2018-04-03 07:16:44.672 YeeLight: New Light Found (192.168.5.30/YeeLight LED (Stripe))
2018-04-03 07:16:44.673 Yeelight::udp_server::HandleIncoming found set_ct_abx
2018-04-03 07:16:44.673 Yeelight::udp_server::HandleIncoming found set_rgb
2018-04-03 07:16:44.673 Yeelight::udp_server::HandleIncoming found set_rgb and set_ct_abx
2018-04-03 07:16:44.673 Yeelight::udp_server::HandleIncoming mode: 2, Support: get_prop set_default set_power toggle set_bright start_cf stop_cf set_scene cron_add cron_get cron_del set_ct_abx set_rgb set_hsv set_adjust set_music set_name
2018-04-03 07:16:44.673 Yeelight::InsertUpdateSwitch colorMode: 2, Bri: 100, Hue: 359, Sat: 100, RGB: 16711680, CT: 4000
2018-04-03 07:16:44.673 YeeLight: New Light Found (192.168.5.34/YeeLight LED (Color))
I see some bulbs, that have the old ip adres..
I cannot change te name of the bulbs, some with the same name?
ScreenShot051.png
ScreenShot051.png (32.05 KiB) Viewed 2560 times
Is there someone with a solution?
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
airmarshall
Posts: 19
Joined: Friday 04 August 2017 19:21
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

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

Post by airmarshall »

I recently moved my domo install to an Rpi3+ and used the beta available at the same time: v3.9317

Prior to this I was using Xiaomi wireless switches to toggle yeelights using the following dzvents script, it worked perfectly:

Code: Select all

return {
    active = true,
    on = {
        devices = {
            '$Wireless Switch 1', '$Wireless Switch 2'
        }
    },
    execute = function(domoticz, switch)
        if (switch.state == 'Click' and domoticz.devices('Master').state ~= 'On') then
            domoticz.log('Master Night On')
            domoticz.setScene('Master Red 1%', 'On')
            switch.switchOff()
        elseif (switch.state == 'Click' and domoticz.devices('Master').state ~= 'Off') then
            domoticz.log('Master Off')
            domoticz.devices('Master').dimTo(0)
            switch.switchOff()
        elseif (switch.state == 'Double Click' and domoticz.devices(43).state ~= 'On') then
            domoticz.log('Nursery Night On')
            domoticz.setScene('Nursery Red 1%', 'On')
            switch.switchOff()
        elseif (switch.state == 'Double Click' and domoticz.devices(43).state ~= 'Off') then
            domoticz.log('Nursery Night Off')
            domoticz.devices(43).dimTo(0)
            switch.switchOff()
        elseif (switch.state == 'Long Click' and domoticz.devices('$status_NightMode').state == 'Off') then
            domoticz.log('Night Mode On')
            domoticz.devices('$status_NightMode').switchOn()
            switch.switchOff()
        end
    end
}
Since the change, if the yeelight is switched on via the script, then the script won't switch it off. If you switch the yeelight on via other means, like the web gui or mobile app, then the wireless switch script will switch it off.

If the light is off, the wireless switch will switch it on as appropriate.

I have tried both .switchOff() and .dimTo(0) commands.

Really annoying and the WAF has gone through floor. Any help much appreciated....


****UPDATED 11 June 2018****

Fixed it in the end by using direct commands to the buld via a modified script pasted below for info:

Code: Select all

return {
    active = true,
    on = {
        devices = {
            '$Wireless Switch 1', '$Wireless Switch 2'
        }
    },
    execute = function(domoticz, switch)
        if (switch.state == 'Click' and domoticz.devices(57).state ~= 'On') then
            domoticz.log('Master Night On')
            runcommandon = " sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\": [\"color\", 16711680, 1]}\\r\\n' | nc -w1 192.168.50.72 55443 ";;
            os.execute(runcommandon);
            domoticz.devices(57).dimTo(1)
            switch.switchOff()
        elseif (switch.state == 'Click' and domoticz.devices(57).state ~= 'Off') then
            domoticz.log('Master Off')
            domoticz.devices('Master').switchOff()
            switch.switchOff()
        elseif (switch.state == 'Double Click' and domoticz.devices(43).state ~= 'On') then
            domoticz.log('Nursery Night On')
            runcommandon = " sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\": [\"color\", 16711680, 1]}\\r\\n' | nc -w1 192.168.50.73 55443 ";;
            os.execute(runcommandon);
            domoticz.devices(43).dimTo(1)
            switch.switchOff()
        elseif (switch.state == 'Double Click' and domoticz.devices(43).state ~= 'Off') then
            domoticz.log('Nursery Night Off')
            domoticz.devices(43).dimTo(0)
            switch.switchOff()
        end
    end
}
The additional

Code: Select all

domoticz.devices(57).dimTo(1)
ensures domoticz knows instantly the light is on as feedback from the yeelight to domo isn't instant. Script could probably be tidier but solves this problem for now!
User avatar
sincze
Posts: 1300
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

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

Post by sincze »

The yeelights have been working very nice.
Recently I created an IOT network, so I want to move the yeelights from the inital network to the VLAN.
(That is possible via the APP).

In the wiki https://www.domoticz.com/wiki/YeelightI found

"Note that the IP address of the light is used as the device ID in Domoticz. For that reason, use static IP addresses for your lights (assign via MAC address reservation on your router)"

As the IP address will change in the VLAN.. I guess I have to re-add the Yeelights to Domoticz.
No easy migration of the existing device-id's?
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
AlphaVision
Posts: 1
Joined: Sunday 17 February 2019 23:20
Target OS: Windows
Domoticz version:
Contact:

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

Post by AlphaVision »

Hello,

I have trouble using my Yeelight bulb v2 (white). I have added the bulbs, but when I try to use them I get this error:

Code: Select all

Error: YeeLight: Exception: connect: No connection could be made because the target machine actively refused it
User avatar
sincze
Posts: 1300
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

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

Post by sincze »

sincze wrote: Saturday 16 February 2019 10:51 The yeelights have been working very nice.
Recently I created an IOT network, so I want to move the yeelights from the inital network to the VLAN.
(That is possible via the APP).

In the wiki https://www.domoticz.com/wiki/YeelightI found

"Note that the IP address of the light is used as the device ID in Domoticz. For that reason, use static IP addresses for your lights (assign via MAC address reservation on your router)"

As the IP address will change in the VLAN.. I guess I have to re-add the Yeelights to Domoticz.
No easy migration of the existing device-id's?
As the lamps were working perfectly fine in the main LAN it was now time to move them to the IOT VLAN. I could not find a way how to do this with SQLBrowser but the following works just fine.

- Switch Light ON (2 sec) -> off (2 sec) for 5 times untill it starts flashing. (it will restart factory default)
- Use yeelight app to search for the LAMP (btw after every reset I had to disable wifi on the phone and re-enable it to find the lamp.
- Connect lamp to SSID of IOT network.
- Enable LAN access via the APP.
- Give Lamp a Static IP address in your router
- Restart the LAMP (power toggle)
- It will now show up / pingable with the static IP.
- In Domoticz under settings -> 'Allow new hardware 5 min'
- In Domoticz under Hardware -> Add LAMP via Yeelight plugin (name / IP / RGBW-WHITE)
- Add the light under settings -> devices.
- FInd the old Yeelight in domoticz
- Copy the name of that Lamp and delete the old Lamp
- Go to the newly added Lamp and change the name :D

Done.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest