[Plugin now available in Beta] Help with Yeelight Bulb
Moderator: leecollings
-
- Posts: 65
- Joined: Wednesday 14 January 2015 12:08
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: India
- Contact:
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Isn't the value for otherdevices_svalues numeric?
In any case, the code is practically as -is from the wiki
In any case, the code is practically as -is from the wiki
- 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
see what value is returning for DomValue with "print(DomValue)":
Code: Select all
commandArray = {}
DomDevice = 'White Temp Yeelight';
IP = '192.168.5.14';
PORT = '55443'
if devicechanged[DomDevice] then
if(devicechanged[DomDevice]=='Off') then
DomValue = 0;
runcommandoff = "sudo echo -ne '{\"id\":1,\"method\":\"set_power\", \"params\":[\"off\", \"smooth\", 500]}\\r\\n' | nc -w1 " ..IP.." " ..PORT.."";;
os.execute(runcommandoff);
else
DomValue = otherdevices_svalues[DomDevice];
print(DomValue)
CalcValue = ((DomValue-1) * 48)+1700;
end
if CalcValue==nil then CalcValue=0 end
runcommand = " sudo echo -ne '{\"id\":1, \"method\":\"set_scene\",\"params\":[\"ct\"," .. CalcValue .. ", 75]}\\r\\n' | nc -w1 " ..IP.." " ..PORT.."";
os.execute(runcommand);
print(runcommand)
print("Color Temp= "..CalcValue);
end
return commandArray
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
- 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
Perhaps it should be -
DomValue = tonumber(otherdevices_svalues[DomDevice])
DomValue = tonumber(otherdevices_svalues[DomDevice])
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
-
- Posts: 65
- Joined: Wednesday 14 January 2015 12:08
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: India
- Contact:
Re: [Plugin now available in Beta] Help with Yeelight Bulb
@westcott - Making the change you suggested eliminated the string vs number error
However the dimmer for white temperature control still doesn't work (as in the dimmer is set at 0% and cannot be moved)
Here is the code from the wiki
(have obviously changed the DomDevice Name and bulb IP)
Any idea what could be wrong
However the dimmer for white temperature control still doesn't work (as in the dimmer is set at 0% and cannot be moved)
Here is the code from the wiki
Code: Select all
commandArray = {}
DomDevice = 'nameofyourdummyselectorsetasdimmer';
IP = 'youryeelightip';
PORT = '55443'
if devicechanged[DomDevice] then
if(devicechanged[DomDevice]=='Off') then
DomValue = 0;
runcommandoff = "sudo echo -ne '{\"id\":1,\"method\":\"set_power\", \"params\":[\"off\", \"smooth\", 500]}\\r\\n' | nc -w1 " ..IP.." " ..PORT.."";;
os.execute(runcommandoff);
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_scene\",\"params\":[\"ct\"," .. CalcValue .. ", 75]}\\r\\n' | nc -w1 " ..IP.." " ..PORT.."";
os.execute(runcommand);
print(runcommand)
print("Color Temp= "..CalcValue);
end
return commandArray
Any idea what could be wrong
-
- 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
Domoticz does not support dimming for X10 switches.superczar wrote:@westcott - Making the change you suggested eliminated the string vs number error
However the dimmer for white temperature control still doesn't work (as in the dimmer is set at 0% and cannot be moved)
Here is the code from the wiki(have obviously changed the DomDevice Name and bulb IP)Code: Select all
commandArray = {} DomDevice = 'nameofyourdummyselectorsetasdimmer'; IP = 'youryeelightip'; PORT = '55443' if devicechanged[DomDevice] then if(devicechanged[DomDevice]=='Off') then DomValue = 0; runcommandoff = "sudo echo -ne '{\"id\":1,\"method\":\"set_power\", \"params\":[\"off\", \"smooth\", 500]}\\r\\n' | nc -w1 " ..IP.." " ..PORT.."";; os.execute(runcommandoff); 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_scene\",\"params\":[\"ct\"," .. CalcValue .. ", 75]}\\r\\n' | nc -w1 " ..IP.." " ..PORT..""; os.execute(runcommand); print(runcommand) print("Color Temp= "..CalcValue); end return commandArray
Any idea what could be wrong
Create a switch from the hardware/dummy page, edit this switch, make it a dimmer
This allowed me to add a working dimmer slider, however I'm still having an issue setting the "TempValue", still researching but will post back here if I need my own help (which is likely, as I'm an idiot!)
-
- 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
If it's of use to anyone I managed to fix my issue, which was eventually everything seemingly working with the wiki scripts yet nothing actually happening on the bulb.
I had to remove 'sudo' from the commands, hence:
Probably OS specific, I'm running domoticz through a docker on an unraid server.
IS there anyway I can check/test the polling is working? If I switch the light off with the Temp Slider switch OR the Dimmer Switch, the other switch and the RGB Switch never update to being OFF etc....??
I had to remove 'sudo' from the commands, hence:
Code: Select all
runcommandoff = "echo -ne '{\"id\":1,\"method\":\"set_power\", \"params\":[\"off\", \"smooth\", 500]}\\r\\n' | nc -w1 " ..IP.." " ..PORT.."";;
IS there anyway I can check/test the polling is working? If I switch the light off with the Temp Slider switch OR the Dimmer Switch, the other switch and the RGB Switch never update to being OFF etc....??
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Hello. I am havign status update problems too.
If I switch lamp ON or OFF with domoticz, the status if updated correctly.
If I switch the lamp off using the main power switch on the wall, the domoticz status remain ON.
How can I have the domoticz status to reflect the power status?
If I switch lamp ON or OFF with domoticz, the status if updated correctly.
If I switch the lamp off using the main power switch on the wall, the domoticz status remain ON.
How can I have the domoticz status to reflect the power status?
Re: [Plugin now available in Beta] Help with Yeelight Bulb
I have same question as chrispazz. It is possible to update bulb state if I do a manual (hardware) power cycle?
Second question is: the script from the Wiki is not working right: this script turn Bulb OFF if you set the dimmer to 0% or click on OFF --> this is not working. Is there a fix for this?
Second question is: the script from the Wiki is not working right: this script turn Bulb OFF if you set the dimmer to 0% or click on OFF --> this is not working. Is there a fix for this?
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Running manually OFF command:
$ sudo echo -ne '{\"id\":1,\"method\":\"set_power\", \"params\":[\"off\", \"smooth\", 500]}\\r\\n' | nc -w1 192.168.1.82 55443
does nothing. Maybe the api was changed?
$ sudo echo -ne '{\"id\":1,\"method\":\"set_power\", \"params\":[\"off\", \"smooth\", 500]}\\r\\n' | nc -w1 192.168.1.82 55443
does nothing. Maybe the api was changed?
Re: [Plugin now available in Beta] Help with Yeelight Bulb
This issues still exist !
There is a githup to report it ?
All we need is to mark the bulb as off if it was power off by the wall switch thanks
There is a githup to report it ?
All we need is to mark the bulb as off if it was power off by the wall switch thanks
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Hi, I have the same problem. If I switch off from the electric wall switch, the Domoticz report the yeelight is On. Also, if I first switch off yeelight from Domoticz and some second later I switch off wall switch, after few second Domoticz set yeelight to On state.
I explain my scenario better. On the same line, controlled by a wall switch, I have both normal and yeelight bulbs. Actually the wall switch can also be controlled by Domoticz (I've created a switch dummy that runs on / off scripts when triggered). with blocky I created an event that when the wall switch goes off, the two Yeelight lamps are put in off and then the off wall switch script is executed. I entered a delay of 5 seconds in the off script that turns off the line.
I explain my scenario better. On the same line, controlled by a wall switch, I have both normal and yeelight bulbs. Actually the wall switch can also be controlled by Domoticz (I've created a switch dummy that runs on / off scripts when triggered). with blocky I created an event that when the wall switch goes off, the two Yeelight lamps are put in off and then the off wall switch script is executed. I entered a delay of 5 seconds in the off script that turns off the line.
Re: [Plugin now available in Beta] Help with Yeelight Bulb
With that bugs the plugins is almost useless for read-only users : for the moment I using it in order to know if I forgot to power off lights
Please if the bulb is offline, set the value to OFF
Please if the bulb is offline, set the value to OFF
- 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
anyone volunteer to make the changes to the code?
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
I found a workaround for my experience. I have set a sleep time of 120sec to my switch off scrip for wall switch relay. So when I switch off the relay from Domoticz, the blocky events power off Yeelight, Domoticz acquire off status of yeelight (thake about 90sec to do it) and finally the line go off.
Re: [Plugin now available in Beta] Help with Yeelight Bulb
Thanks for the workaround, but not usefull for me : "read only" (no wall switch connected to domoticz).
-
- 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
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
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
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
Re: [Plugin now available in Beta] Help with Yeelight Bulb
I'm developing a lua script in order to update Yeelight device as OFF if there do not respond to ping twice.
EDIT my script works. but if i power on my yeelight ( with wall switch or by the yeelight app ) the state is not updated in the app
any one avec the same issues ?
by the way i'm using docker
EDIT my script works. but if i power on my yeelight ( with wall switch or by the yeelight app ) the state is not updated in the app
any one avec the same issues ?
by the way i'm using docker
-
- Posts: 38
- Joined: Friday 17 March 2017 9:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.9639
- Location: Netherlands
- Contact:
Re: [Plugin now available in Beta] Help with Yeelight Bulb
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
RFXCom(E) - Yeelight Lights - KaKu / Alexa HA Bridge
Windows 2012 / Windows 2012R2 / Xpenology/ Pi 3 / Milight / Home build ESP8266 / Sonoff
Windows 2012 / Windows 2012R2 / Xpenology/ Pi 3 / Milight / Home build ESP8266 / Sonoff
Who is online
Users browsing this forum: No registered users and 1 guest