Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flux + Yeelight component compatibility problem #17293

Closed
adrianmihalko opened this issue Oct 9, 2018 · 9 comments
Closed

Flux + Yeelight component compatibility problem #17293

adrianmihalko opened this issue Oct 9, 2018 · 9 comments

Comments

@adrianmihalko
Copy link

Home Assistant release with the issue:

Home Assistant 0.79.3

Last working Home Assistant release (if known):

Operating environment (Hass.io/Docker/Windows/etc.):

Docker

Component/platform:

Flux + Yeelight

Description of problem:
Brightness control is not working with Yeelight ligths. I am using it with Xiaomi Ceiling lights.

  • disable_brightness_adjust ( Optional ): If true, brightness will not be adjusted besides color temperature. Defaults to False.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

- platform: flux
  lights:
    - light.yeelight_lights_1
  name: Fluxer Ceiling Lights
  start_time: '7:00'
  stop_time: '23:00'
  start_colortemp: 4000
  sunset_colortemp: 3000
  stop_colortemp: 1900
  brightness: 200
  mode: mired
  transition: 30
  interval: 60

Traceback (if applicable):


Additional information:

light.yeelight_lights_1:

at 18:00 I checked:

brightness: 199
color_temp: 332

at 21:00 I checked:

brightness: 199
color_temp: 370

In log I see errors of Yeelight:

...
2018-10-09 21:12:00 ERROR (SyncWorker_2) [homeassistant.components.light.yeelight] Error when calling <function YeelightLight.set_colortemp at 0x7f24ff8499d8>: {'code': -5000, 'message': 'general error'}

2018-10-09 21:12:00 ERROR (SyncWorker_5) [homeassistant.components.light.yeelight] Error when calling <function YeelightLight.set_colortemp at 0x7f24ff8499d8>: {'code': -5000, 'message': 'general error'}
@adrianmihalko
Copy link
Author

Maybe it is related with #13785, I'll check after @syssi opens new PR to fix #13785.

@syssi
Copy link
Member

syssi commented Oct 10, 2018

Which ceiling light do you own?

@adrianmihalko
Copy link
Author

This:

https://www.gearbest.com/ceiling-lights/pp_596249.html

I have Yeelight RGB bulbs too, today I will test them.

@mouth4war
Copy link

mouth4war commented Oct 12, 2018

Try 0.81.0.dev0 but be careful to use interval for flux between 0-59. There is a bug in fluxer issue #17368

@adrianmihalko
Copy link
Author

adrianmihalko commented Oct 27, 2018

Finally every fix (flux, yeelight components [additional info here: #13785 fix is working, If I change color manually]) was released with 0.81.

Unfortunately this version still not fix flux + Xiaomi Ceiling light incompatibility.

  - platform: flux
    lights:
      - light.yeelight_lights_1
    name: Fluxer Ceiling Lights
    start_time: '7:00'
    stop_time: '23:59'
    start_colortemp: 4000
    sunset_colortemp: 3000
    stop_colortemp: 1900
    brightness: 200
    mode: xy
    transition: 30
    interval: 59

Light doesn't change at all:

screenshot 2018-10-27 at 22 16 08

I don't see any error in home-assistant.log file.

I tried mode: mired, but in this case I still get error:

2018-10-27 22:57:08 ERROR (SyncWorker_7) [homeassistant.components.light.yeelight] Error when calling <function YeelightLight.set_colortemp at 0x7f848249dea0>: {'code': -5000, 'message': 'general error'}
2018-10-27 22:57:08 ERROR (SyncWorker_8) [homeassistant.components.light.yeelight] Error when calling <function YeelightLight.set_colortemp at 0x7f848249dea0>: {'code': -5000, 'message': 'general error'}
2018-10-27 22:57:08 ERROR (SyncWorker_3) [homeassistant.components.light.yeelight] Error when calling <function YeelightLight.set_colortemp at 0x7f848249dea0>: {'code': -5000, 'message': 'general error'}
2018-10-27 22:58:08 ERROR (SyncWorker_1) [homeassistant.components.light.yeelight] Error when calling <function YeelightLight.set_colortemp at 0x7f848249dea0>: {'code': -5000, 'message': 'general error'}
2018-10-27 22:58:08 ERROR (SyncWorker_6) [homeassistant.components.light.yeelight] Error when calling <function YeelightLight.set_colortemp at 0x7f848249dea0>: {'code': -5000, 'message': 'general error'}
2018-10-27 22:58:08 ERROR (SyncWorker_0) [homeassistant.components.light.yeelight] Error when calling <function YeelightLight.set_colortemp at 0x7f848249dea0>: {'code': -5000, 'message': 'general error'}
2018-10-27 22:59:08 ERROR (SyncWorker_6) [homeassistant.components.light.yeelight] Error when calling <function YeelightLight.set_colortemp at 0x7f848249dea0>: {'code': -5000, 'message': 'general error'}
2018-10-27 22:59:08 ERROR (SyncWorker_4) [homeassistant.components.light.yeelight] Error when calling <function YeelightLight.set_colortemp at 0x7f848249dea0>: {'code': -5000, 'message': 'general error'}
2018-10-27 22:59:08 ERROR (SyncWorker_5) [homeassistant.components.light.yeelight] Error when calling <function YeelightLight.set_colortemp at 0x7f848249dea0>: {'code': -5000, 'message': 'general error'}

@adrianmihalko
Copy link
Author

Maybe a debug log helps:

2018-11-28 18:58:59 DEBUG (SyncWorker_2) [homeassistant.components.light.yeelight] Calling <function YeelightLight.set_rgb at 0x7f0673def268> with (None, 30000) {}
2018-11-28 18:58:59 DEBUG (SyncWorker_2) [homeassistant.components.light.yeelight] Calling <function YeelightLight.set_colortemp at 0x7f0673def158> with (386, 30000) {}
2018-11-28 18:58:59 DEBUG (SyncWorker_2) [homeassistant.components.light.yeelight] Setting color temp: 2590 K
2018-11-28 18:58:59 ERROR (SyncWorker_2) [homeassistant.components.light.yeelight] Error when calling <function YeelightLight.set_colortemp at 0x7f0673def158>: {'code': -5000, 'message': 'general error'}
2018-11-28 18:58:59 DEBUG (SyncWorker_2) [homeassistant.components.light.yeelight] Calling <function YeelightLight.set_brightness at 0x7f0673def378> with (200, 30000) {}
2018-11-28 18:58:59 DEBUG (SyncWorker_2) [homeassistant.components.light.yeelight] Setting brightness: 200
2018-11-28 18:58:59 DEBUG (SyncWorker_2) [homeassistant.components.light.yeelight] Calling <function YeelightLight.set_flash at 0x7f0673ddaea0> with (None,) {}
2018-11-28 18:58:59 DEBUG (SyncWorker_2) [homeassistant.components.light.yeelight] Calling <function YeelightLight.set_effect at 0x7f0673ddad90> with (None,) {}

@adrianmihalko
Copy link
Author

Same problem with Circadian Lightning component:

https://community.home-assistant.io/t/circadian-lighting-custom-component/61246/170?u=madrian

Interesting why, because manually I can change the color temperature.

@adrianmihalko
Copy link
Author

Found more information:

Slider and service call changing temperature works too:

{
  "color_temp": "370",
  "entity_id": "light.yeelight_ceiling_7c49ebb38056"
}

I am confused now. If color temp changing works from service call, slider, then why not from plugins?

@adrianmihalko
Copy link
Author

It's fixed in 0.84. I think because of "Improved service calling".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants