home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.76k stars 30.01k forks source link

Yeelight - Model unknown (ceiling5) #37004

Closed caesar1987sk closed 3 years ago

caesar1987sk commented 4 years ago

The problem

Ceiling light 5 is identified as Model unknown (ceiling5). Due that is not possible to set temperature on ha card.

Environment

Problem-relevant configuration.yaml

devices:
  192.168.0.122:
    name: Obyvacka stropne svetlo

Traceback/Error logs

2020-06-22 17:05:20 DEBUG (SyncWorker_4) [yeelight.main] Bulb<192.168.0.122:55443, type=BulbType.WhiteTemp> < {'id': 0, 'result': ['off', '', '1', '3200', '', '', '', '2', '0', '', '', '', '', '', '', '', '', '0', '0']}
2020-06-22 17:05:20 DEBUG (SyncWorker_14) [homeassistant.components.yeelight.light] Adding Obyvacka stropne svetlo
2020-06-22 17:05:20 DEBUG (SyncWorker_14) [yeelight.main] Model unknown (ceiling5). Providing a fallback
2020-06-22 17:05:20 WARNING (SyncWorker_14) [homeassistant.components.yeelight.light] Cannot determine device type for 192.168.0.122, Obyvacka stropne svetlo. Falling back to white only
....
2020-06-22 17:06:56 DEBUG (SyncWorker_17) [yeelight.main] Bulb<192.168.0.122:55443, type=BulbType.WhiteTemp> > {'id': 3, 'method': 'get_prop', 'params': ['power', 'main_power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'flowing', 'bg_power', 'bg_lmode', 'bg_flowing', 'bg_ct', 'bg_bright', 'bg_hue', 'bg_sat', 'bg_rgb', 'nl_br', 'active_mode']}
2020-06-22 17:06:56 DEBUG (SyncWorker_17) [yeelight.main] Bulb<192.168.0.122:55443, type=BulbType.WhiteTemp> < {'id': 3, 'result': ['off', '', '1', '3200', '', '', '', '2', '0', '', '', '', '', '', '', '', '', '0', '0']} 

Additional information

In yeelight app has this light model: yeelink.light.ceiling5 It support: brightness (OK in HA) white temperature from 2700K to 6500K (missing in HA) night mode ( there is binary sensor in HA, reacting to changes in yeelight app, not sure how to activate it)

not related to yeelight entity: it is also ble gateway, support schedules, automatic night mode, mi band integration, ...

probot-home-assistant[bot] commented 4 years ago

Hey there @rytilahti, @zewelor, mind taking a look at this issue as its been labeled with an integration (yeelight) you are listed as a codeowner for? Thanks! (message by CodeOwnersMention)

JorgeMaTeixeira-zz commented 4 years ago

I have the same problem for the ceiling8 and the strip4, both i can´t set color temperature, i opened a issue for thoose devices .

zewelor commented 4 years ago

It should work with https://github.com/home-assistant/core/pull/36658, please test it as custom_component.

caesar1987sk commented 4 years ago

Temperature slider is displayed now. Thank you. But in log is still information about unknown model

2020-06-22 22:56:38 DEBUG (SyncWorker_4) [yeelight.main] Bulb<192.168.0.122:55443, type=BulbType.Unknown> > {'id': 0, 'method': 'get_prop', 'params': ['power', 'main_power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'flowing', 'bg_power', 'bg_lmode', 'bg_flowing', 'bg_ct', 'bg_bright', 'bg_hue', 'bg_sat', 'bg_rgb', 'nl_br', 'active_mode']}
2020-06-22 22:56:38 DEBUG (SyncWorker_4) [yeelight.main] Bulb<192.168.0.122:55443, type=BulbType.WhiteTemp> < {'id': 0, 'result': ['off', '', '48', '5700', '', '', '', '2', '0', '', '', '', '', '', '', '', '', '0', '0']}
2020-06-22 22:56:38 DEBUG (SyncWorker_0) [yeelight.main] Model unknown (ceiling5). Providing a fallback

1. I have currently issue when i set slider to most left (most blue) position, temperature is not changed and in log is this error:

2020-06-22 23:01:12 DEBUG (SyncWorker_11) [yeelight.main] Bulb<192.168.0.122:55443, type=BulbType.WhiteTemp> > {'id': 15, 'method': 'set_ct_abx', 'params': [6500, 'smooth', 350]}
2020-06-22 23:01:12 DEBUG (SyncWorker_11) [yeelight.main] Bulb<192.168.0.122:55443, type=BulbType.WhiteTemp> < {'id': 15, 'error': {'code': -5000, 'message': 'general error'}}
2020-06-22 23:01:12 ERROR (SyncWorker_11) [custom_components.yeelight.light] Error when calling <function YeelightGenericLight.set_colortemp at 0x6a19b4f8>: {'code': -5000, 'message': 'general error'}
2020-06-22 23:01:12 DEBUG (SyncWorker_11) [yeelight.main] Bulb<192.168.0.122:55443, type=BulbType.WhiteTemp> > {'id': 16, 'method': 'get_prop', 'params': ['power', 'main_power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'flowing', 'bg_power', 'bg_lmode', 'bg_flowing', 'bg_ct', 'bg_bright', 'bg_hue', 'bg_sat', 'bg_rgb', 'nl_br', 'active_mode']}
2020-06-22 23:01:12 DEBUG (SyncWorker_11) [yeelight.main] Bulb<192.168.0.122:55443, type=BulbType.WhiteTemp> < {'id': 16, 'result': ['on', '', '12', '5700', '', '', '', '2', '0', '', '', '', '', '', '', '', '', '0', '0']}
2020-06-22 23:01:12 DEBUG (MainThread) [yeelight.main] Model unknown (ceiling5). Providing a fallback

When i set 6500K temperature in yeelight app, in HA is slider also not on most left possition. Also in logbook is information that temperature was set to 5700.

2020-06-22 23:00:18 DEBUG (SyncWorker_16) [yeelight.main] Bulb<192.168.0.122:55443, type=BulbType.WhiteTemp> < {'method': 'props', 'params': {'ct': 5700}}

So they provide incorrect information about temperature limits. Most yellow color (2700) is working as expected.

2. when i am playing a lot i get another error, but in this case i know i exceeded limit.

2020-06-22 22:45:40 ERROR (SyncWorker_17) [custom_components.yeelight] Unable to update device 192.168.0.122, Obyvacka stropne svetlo: {'code': -1, 'message': 'client quota exceeded'}

Maybe this can be somehow handled in component.

zewelor commented 4 years ago
  1. Thanks for testing. Looks like this lamp has different temp ranges than seen before, probalby 2700-5700. It needs to be added here: https://gitlab.com/stavros/python-yeelight/-/blob/master/yeelight/main.py#L29 . If you can would be good to make PR there, if not I can but sometime later in week.

To sum up, after this PR, this model works fine, but temp rage is a bit wrong ( possibility to set temp higher than supported by light ) ?

  1. Getting device state, after each change quickly hits commands / minute limit in light. Only thing would be to rewrite library, to support some kind on notification subscription ( as official app does ) , but so far noone did it.
caesar1987sk commented 4 years ago
  1. PR created - https://gitlab.com/stavros/python-yeelight/-/merge_requests/41 Can I close this issue and you will increase yeelight library version when that PR will be in?

  2. Thanks for info.

zewelor commented 4 years ago

Hmm maybe it would be good to test if there is even lower colortemp, like 1700. I think it would be possible to declare model as color1 and then try to set color temp at most warm temp.

caesar1987sk commented 4 years ago

I'll try that tonight.

caesar1987sk commented 4 years ago

I have tested it and its look like 2700 is lowest value.

szjani commented 4 years ago

I have the same ceiling5 device too. Its night light feature used to work with HA 0.109.6 with the following config:

discovery:
  ignore:
    - yeelight
yeelight:
  devices:
    192.168.10.13:
      name: Living Room
      nightlight_switch_type: light

With HA 0.111.4 I get a warning that the light.living_room_nightlight entity is not available.

stale[bot] commented 3 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

szjani commented 3 years ago

Works for me with HA 0.115.6 with the following configuration:

discovery:
  ignore:
    - yeelight
yeelight:
  devices:
    192.168.10.13:
      name: Living Room
      nightlight_switch_type: light
LelouBil commented 3 years ago

I have the same problem with the LED Color 1S, Model unknown (color4). Providing a fallback and it shows up as unavailable really often even if it responds instantly via the yeelight app

CastFX commented 3 years ago

I have the same problem with the LED Color 1S, Model unknown (color4). Providing a fallback and it shows up as unavailable really often even if it responds instantly via the yeelight app

Can you check the firmware version of your bulb? I have the same problem with my 2 Color 1s, both with FW: 2.06_0030 (latest available to download)

LelouBil commented 3 years ago

I have the same problem with the LED Color 1S, Model unknown (color4). Providing a fallback and it shows up as unavailable really often even if it responds instantly via the yeelight app

Can you check the firmware version of your bulb? I have the same problem with my 2 Color 1s, both with FW: 2.06_0030 (latest available to download)

Same version as you 2.06_0030, but I have to say it disconnects a lot less since I posted the comment but it still does sometimes, like every day / every 2 days

github-actions[bot] commented 3 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.