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.
Hey guys,
Will this change affect this component? https://github.com/home-assistant/home-assistant/pull/21070
Hope you’re doing well!
Hi chimpy!
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.
Hope you are doing well
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
Any ideas?
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?
Just found a way to make it work based on this post here: XBOX ONE and PS4 components do not work with Hassio 0.88
Commented out line 15 import and added other lines as follows:
"""
from homeassistant.components.media_player import (
PLATFORM_SCHEMA, SUPPORT_SELECT_SOURCE, SUPPORT_VOLUME_MUTE,
SUPPORT_VOLUME_SET, SUPPORT_TURN_ON, SUPPORT_VOLUME_STEP, SUPPORT_TURN_OFF,
MediaPlayerDevice
)
"""
from homeassistant.components.media_player import (
MediaPlayerDevice, MEDIA_PLAYER_SCHEMA, PLATFORM_SCHEMA)
from homeassistant.components.media_player.const import (
SUPPORT_SELECT_SOURCE, SUPPORT_VOLUME_MUTE,
SUPPORT_VOLUME_SET, SUPPORT_TURN_ON, SUPPORT_VOLUME_STEP, SUPPORT_TURN_OFF
)
Also, got this as a warning so the rename will affect your setups eventually:
WARNING (MainThread) [homeassistant.loader] Integrations need to be in their own folder. Change media_player/kefwireless.py to kefwireless/media_player.py. This will stop working soon.
I don’t know whether this means pykef.py needs to be moved too, or if other modifications are needed in kefwireless
@chimpy you have to rename the folder structure as stated in the warning:
WARNING (MainThread) [homeassistant.loader] Integrations need to be in their own folder. Change media_player/kefwireless.py to kefwireless/media_player.py. This will stop working soon.
Since 0.88 the folder structure is changed for custom_components and the location of the constants are moved, therefore some custom_components were broken.
pykef probably needs to be moved to kefwireless folder as well.
Can confirm. Moved the files to kefwireless folder and renamed kefwireless.py to media_player.py
A small modification is also needed on line 28 of pykef (kefwireless must be changed to media_player).
Currently on 0.89 with the new structure with no problems.
Hi guys, I just found this thread and wondering if you can help or point me in the right direction.
I have a pair of these speakers as well, and am trying to program a smart remote to control the speakers. (got it off Kickstarter - it’s this one https://sevenhugs.com). Going fine but having trouble with the input selection as I’m trying to find the IR commands that set a specific Input (ie optical) rather than just repeat what the LS50 speaker remote does (moves you to the next input). Any thoughts would be much appreciated. Thanks!
Richard.
I started out controlling these speakers via IR, but I could not find any commands that sets a specific input, only toggle works. I believe that no such IR command is implemented. Note: I tried this using an older firmware, so they might have implemented it later but I doubt it.
Does this remote have wifi? If so, maybe it could work to control these speakers over wifi with this remote.
Hi Gronis. It might work with the newer firmware. I found this Tivo thread which lists IR commands, and that list includes specific commands for each actual input. https://www.tivocommunity.com/community/index.php?threads/remote-code-for-kef-ls50-wireless-speakers.563664/
And on Kef’s support page I found this list of codes.
Problem is the remote doesn’t actually let you type codes manually.
Strangely enough I was able to load a control file for another KEF AV device. Some of the commands work, some don’t. BUT, the PREVIOUS button command actually happens to change the speaker’s input to Optical. So I got one!
This remote is able to control by wifi. But I’ve never set up a remote to work this way, so don’t know how to do it. But worth checking into.
Just FYI, in 0.92, to keep the platform working you need to add an empty __init__.py
file to the kefwireless folder.
Hope you’re all well!
Hi everyone, excellent work on this!!!
I loose my connection to the speakers via the app. Apparently the LS50 is not broadcasting the LS50_Wireless network during the setup, so the app cannot finish the config and the speak keeps blinking the white/red wifi light…
Although I can use the system normally (except the Roon client), I’d like to have access to the properties adjustments (Basic and Expert setups, invert channels, disable power on tones, etc).
Is there any chances to discover also these setup codes?
I was studying the error log of the app and discovered some clues of the local IP address of the speakers when connected to de local LS50_Wireless wifi (192.168.1.12).
Also, opening the IP address from a ethernet conection, I could access an index page that alows me to change the wifi login config and connect to my wireless network. But the app keeps without connection as per the intial setup did not run.
Hope a new firmware can solve this… But I’d like to start working on a plan B…
Best Regards,
Adriano
all, nice work to get the KEF speakers integrated into HA. Got it to work in Hass.io last week for my KEF-LS50W but wondering about one thing:
It is repeatedly mentioned that Turn-On can’t be done through the integration as the speakers turn wireless off when powered off. In my case the speakers are connected hardwired to the LAN and the Android (and iOS) KEF Control app are both able to turn the speakers off and on again. I assume there must be some TCP/IP communication to achieve this.
I have tried to capture IP traffic but my network setup right now doesn’t allow me to do it (would need a passive hub to capture traffic w/ Wireshark or the like).
Has anyone with the same setup (hardwired connection to the KEF) tried to do this to figure out what the command codes might be ?
This would be a great last-mile achievement for this plugin at least for those having the speaker connected this way.
Thanks, Michael
Hi! Are you using KEF LSX or LS50W?
Sorry, should have been more precise. KEF-LS50W it is. Cheers M.
Ok, how did you manage to turn it on with the KEF Control app? Did you upgrade your speakers firmware recently? I cannot turn on the speakers even if I have an ethernet cable hooked up to my KEF LS50W when using the app.
Hi Robin,
I am not doing anything special. Just using the control app and select the leftmost button at the top. Below is a link to a short screen recording. You don’t see the click so you have to trust me that I click that wireless symbol button repeatedly .
I also used the remote in between uses of the app - still works if I switch off via the remote, then switch on via the app.
I am not so sure if the speaker at some point in time enters a ‘deeper sleep’ and if in that the above wouldn’t work anymore. I have seen the app to be unable to connect and the speaker marked as [offline] - haven’t checked exactly when that happens. As the app is a little buggy in general I thought that’s just a problem of the app.
But no matter what, at least as long as it is in what it calls [standby] the speaker can be turned on through the app.
Firmware on the KEF-LS50W is: p6.2101809171.105039 which I think is the latest, at least I do not get offered something newer. App is running on an Android phone.
Standby mode is set to 60 minutes. That turns the speaker into standby mode after this time - and I am able to bring it back online after that time with the app.
Update: playing around a little more I have seen now a few casse where another Android device (a Galaxy tablet) is not able to connect to the switched-off speaker while the other one still is. The drop-down in the app lists the speaker as [offline]. Switched the speaker on via the remote, then had to kill and start the app again to make it recognise the speaker. I still believe this has to do with the buggy nature of the KEF apps (both). Frequently I see Spotify being perfectly happy with the speakers and controlling them fine whereas the KEF apps refuse to connect to them (isn’t this a shame? such a fine pair of speakers and the app not keeping up at all with them).
Thx, Michael