I assumed the state was just on. Ah yeah just had a look. That’s not great. The state must be on or off.
Having the source and vol in the UI is fine, but the state must be on/off.
Ismuted seems to work. Although I can’t get it to toggle with the remote. Is that the same for anyone else?
Also the source says “InputSource.WIFI”. It should just say the name of the source selected from the dropdown. No “InputSource.” prefix. And the source selected should be shown in the source field as @gronis said.
- State is on or off (not input + volume)
- semaphore is used so that only one method can send at the same time (better user experience)
- Timeouts added when setting attributes (better user experience)
- When setting attributes also assign them on the speaker state (better user experience)
- Use lower case on InputSource (e.g "Wifi", "Bluetooth" etc...)
Just copy the files to custom_component/media_player folder again to install.
Also, I think we should try to get this merged with the real home assistant repo.
The programmable “turn_on” command also sounds really nice to implement.
I am sad that you guys did not like my extended state field. I thought it was a need idea.
It was a good idea, but it violates the semantics of what the state should be, and I think consistency is important.
Regarding the HA repo. It might be not so easy to get in their. I guess they have rather high code standards.
I looked at this yesterday, and the coding standard wasn’t that constraining (though it is higher than the average hobby project). It will probably be quite easy to get it merged.
@ironhorse I have been using an IR diod + transistor connected to a raspberry pi, running on lirc software. If you have a raspberry pi or similar already, it is a 2.3$ investment.
Thanks for the hint. Sadly the PI Hat solutiion will not work due to different locations of my PI and my KEF.
Nevertheless, I might buy a Logitec Harmony. This seems to be a greate device.
Just wanted to let you and @ironhorse know that the component is working out very well for me, including the turn_on option.
I have been to modify settings in the app (on the Profile specifically). Sometimes it times out because of the connections we make to poll it, but at least it’s still possible.
I am so happy that I stumbled across this thread. My LS50W speakers are from an earlier hardware revision that doesn’t support selecting specific inputs using IR codes. This component allows me to do it over the network which is amazing.
I do have a question though: I am using the HomeKit component to expose HA devices to homekit so that I can control them via siri, but it appears that the native features which the homekit component supports for media player components (toggling mute, turning on and off) aren’t exposed to the homekit component even though the card on the main overview screen of HA shows these features.
I’m a relatively new HA user (in fact this KEF integration is what got me to start using it), so any pointers would be welcome!
Yup I have included that during my troubleshooting and nothing has appeared unfortunately, even after many restarts. It’s strange because the logs that Home assistant provides tells me that the speakers don’t support play and pause (which is true because I don’t think that has been implemented in the component) when I try to include those features, but it doesn’t provide any error for toggle_mute or on_off, it just doesn’t show up as a switch.
I also have a Sony Bravia TV that I’ve exposed to HomeKit as a media player, and all the features there are working so I’m pretty sure that my config is set up correctly.
Maybe it has something to do with how supported features are reported by components? I’ll try to find more info in my logs.
Have you applied turn on service in your configuration.yaml file? You must turn on the speaker through IR. If you didn’t provide that in your config, the speakers will not report “turn on” as a supported functionality.
I don’t think so. As I understand it it looks like it only applies to custom components which overrides default components. But there is no default kef component.
Hey guys, I got this today after updating to version 88.1. I’m using the latest code available in the HA-02 branch.
2019-02-25 20:34:36 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.media_player.kefwireless. Make sure all dependencies are installed
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/loader.py", line 147, in _load_file
module = importlib.import_module(path)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/homeassistant/.homeassistant/custom_components/media_player/kefwireless.py", line 15, in <module>
from homeassistant.components.media_player import (
ImportError: cannot import name 'SUPPORT_TURN_ON'
2019-02-25 20:34:36 ERROR (MainThread) [homeassistant.loader] Unable to find platform kefwireless
SUPPORT_TURN_ON is probably not part of homeassistant.components.media_player anymore (breaking change). I don’t have time to look into it right now. Is there any chance you can downgrade you hass version until this is resolved?