Closed jackxu8 closed 5 years ago
Hey @jackxu8 ,
You need to enable LAN Control
for your yeelight lights. You can use Yeelight App to enable that setting for your light.
This setting makes sure that your light can expose its API to local network so that plugin can access and control the lights.
Many thanks! Now it wotks. But only the main switch works. The scene modes is still don's. Another problem is that the the commend effect send by homekit is difficent form the comment effect send by Yeelight App. For example, after I set the full brightness in homekit, the Yeelight is not be setted to the full brightness. The brightness is much lower then the full brightness when I set it in Yeelight App. Is there any error on my operation?
Attached is my debug log for more detail.
Many thanks one more time.
` Loading logs from file CMD: sudo -n tail -n 200 -f /var/log/homebridge.log
{ id: -1, method: 'set_hsv', params: [ 44, 100, 'smooth', 500 ] } ]
[11/19/2018, 11:07:20 PM] [Yeelight-Platform] Sending Command to LightBulb0x000000000531eed0 saturation 13
[11/19/2018, 11:07:20 PM] [Yeelight-Platform] [ ' Sending Command to ',
[ '0x000000000531eed0' ],
{ id: -1, method: 'set_hsv', params: [ 44, 13, 'smooth', 500 ] } ]
[11/19/2018, 11:07:20 PM] [Yeelight-Platform] Sending Command to LightBulb0x000000000531eed0 hue 37
[11/19/2018, 11:07:20 PM] [Yeelight-Platform] [ ' Sending Command to ',
[ '0x000000000531eed0' ],
{ id: -1, method: 'set_hsv', params: [ 37, 13, 'smooth', 500 ] } ]
[11/19/2018, 11:07:20 PM] [Yeelight-Platform] Sending Command to LightBulb0x000000000531eed0 saturation 6
[11/19/2018, 11:07:20 PM] [Yeelight-Platform] [ ' Sending Command to ',
[ '0x000000000531eed0' ],
{ id: -1, method: 'set_hsv', params: [ 37, 6, 'smooth', 500 ] } ]
[11/19/2018, 11:07:20 PM] [Yeelight-Platform] Sending Command to LightBulb0x000000000531eed0 hue 28
[11/19/2018, 11:07:20 PM] [Yeelight-Platform] [ ' Sending Command to ',
[ '0x000000000531eed0' ],
{ id: -1, method: 'set_hsv', params: [ 28, 6, 'smooth', 500 ] } ]
[11/19/2018, 11:07:20 PM] [Yeelight-Platform] Sending Command to LightBulb0x000000000531eed0 saturation 3
[11/19/2018, 11:07:20 PM] [Yeelight-Platform] [ ' Sending Command to ',
[ '0x000000000531eed0' ],
{ id: -1, method: 'set_hsv', params: [ 28, 3, 'smooth', 500 ] } ]
[11/19/2018, 11:07:20 PM] [Yeelight-Platform] Sending Command to LightBulb0x000000000531eed0 hue 22
[11/19/2018, 11:07:20 PM] [Yeelight-Platform] [ ' Sending Command to ',
[ '0x000000000531eed0' ],
{ id: -1, method: 'set_hsv', params: [ 22, 3, 'smooth', 500 ] } ]
[11/19/2018, 11:07:20 PM] [Yeelight-Platform] Sending Command to LightBulb0x000000000531eed0 saturation 2
[11/19/2018, 11:07:20 PM] [Yeelight-Platform] [ ' Sending Command to ',
[ '0x000000000531eed0' ],
{ id: -1, method: 'set_hsv', params: [ 22, 2, 'smooth', 500 ] } ]
[11/19/2018, 11:07:22 PM] [Yeelight-Platform] Sending Command to LightBulb0x000000000531eed0 hue 37
[11/19/2018, 11:07:22 PM] [Yeelight-Platform] [ ' Sending Command to ',
[ '0x000000000531eed0' ],
{ id: -1, method: 'set_hsv', params: [ 37, 2, 'smooth', 500 ] } ]
[11/19/2018, 11:07:22 PM] [Yeelight-Platform] Sending Command to LightBulb0x000000000531eed0 saturation 14
[11/19/2018, 11:07:22 PM] [Yeelight-Platform] [ ' Sending Command to ',
[ '0x000000000531eed0' ],
{ id: -1, method: 'set_hsv', params: [ 37, 14, 'smooth', 500 ] } ]
[11/19/2018, 11:07:22 PM] [Yeelight-Platform] Sending Command to LightBulb0x000000000531eed0 hue 36
[11/19/2018, 11:07:22 PM] [Yeelight-Platform] [ ' Sending Command to ',
[ '0x000000000531eed0' ],
{ id: -1, method: 'set_hsv', params: [ 36, 14, 'smooth', 500 ] } ]
[11/19/2018, 11:07:22 PM] [Yeelight-Platform] Sending Command to LightBulb0x000000000531eed0 saturation 16
[11/19/2018, 11:07:22 PM] [Yeelight-Platform] [ ' Sending Command to ',
[ '0x000000000531eed0' ],
{ id: -1, method: 'set_hsv', params: [ 36, 16, 'smooth', 500 ] } ]
SyntaxError: Unexpected token { in JSON at position 28
at JSON.parse (
Hey @jackxu8 ,
Looks like you have copied sample config from readme which was configured for advanced users. Try using this minimalist configuration =>
{
"platforms": [
{
"platform": "Yeelight-Platform",
"addResetSwitch": true,
"shouldTurnOff": true,
"scenes": [
{
"name": "Sleep Time",
"scene": "custom",
"params": "2000,1,255,70,2000,1,255,100,5000,1,255,70,3000,1,13369548,100,3000,1,13369548,10"
},
{
"name": "Disco Time",
"scene": "disco"
},
{
"name": "Police",
"scene": "police_1"
}
]
}
]
}
You can add more scenes by checking out available scenes or making your custom one.
@jackxu8 Regarding your question about inconsistent brightness between HomeKit and Yeelight App, i am unable to reproduce this issue at my end. The plugin uses Official Yeelight API to update the light. Can you tell me which Yeelight Device are you using ?
My device is Yeelight LED Bulb (Color),https://www.yeelight.com/en_US/product/wifi-led-c, I update the plugin to the latest version, I will try it again, thank you for you work
@jackxu8 Did changing config.json fixed your Scene Switch issue ?
I have install this plugin and can see all the switch's in my homekit, but I can't control my yeelight in Homekit. Do I need get any things like token or IP to tell this plugin whick is my yeelight?