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
73.56k stars 30.73k forks source link

Xiaomi Yeelight component music mode not supported #6624

Closed brthrsam closed 7 years ago

brthrsam commented 7 years ago

When I enable the music mode I get below error messages to log. Only switching on/off works, adjusting brightness doesn't work at all in music mode. I'm using HA 0.40.0 and White E27 Yeelight bulbs with firmware 1.4.1_45. I have 4 bulbs and all of them have the same problem.

Earlier discussion: https://community.home-assistant.io/t/xiaomi-yeelight-e27-bulb-component/695/292?u=brthrsam

17-03-12 00:51:26 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
result = coro.throw(exc)
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/core.py", line 1001, in eventto_service_call
yield from service_handler.func(service_call)
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/light/__init__.py", line 249, in async_handle_light_service
yield from light.async_turn_on(**params)
File "/usr/lib/python3.4/asyncio/futures.py", line 388, in iter
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
value = future.result()
File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
raise self._exception
File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/light/yeelight.py", line 298, in turn_on
self.set_music_mode(self.config[CONF_MODE_MUSIC])
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/light/yeelight.py", line 196, in set_music_mode
self.bulb.startmusic()
File "/home/homeassistant/.homeassistant/deps/yeelight/main.py", line 486, in start_music
self.send_command("set_music", [1, local_ip, port])
File "/home/homeassistant/.homeassistant/deps/yeelight/main.py", line 313, in send_command
raise BulbException(response["error"])
yeelight.main.BulbException: {'code': -1, 'message': 'method not supported'}
rytilahti commented 7 years ago

I opened an issue on downstream bug tracker to see how this case should be handled: https://gitlab.com/stavros/python-yeelight/issues/10

Maybe the white bulbs do not support this mode at all and therefore tries to enable it on those should just be ignored either inside homeassistant or in the backend library.

mvillarejo commented 7 years ago

same issue here on both type of bulbs.

bieniu commented 7 years ago

Same here on bulb type YLDP02YL from GearBest http://www.gearbest.com/smart-lighting/pp_361555.html

rytilahti commented 7 years ago

Which firmware version are you running?

balloobbot commented 7 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 :+1:

balloobbot commented 7 years ago

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍