Kef ls50 Wireless

Hi All
My LS50s have a serial number that is post the serial for which wake on lan should work (and have the latest firmeware), but it doesn’t. I’ve tried WOL via HA and my via my router, and media_player.turn_on doesn’t work either. All other funcitonality appears to work.

The only thing I can think of as being an issue is that when I first got the speakers and uploaded the latest firmware, I bricked them somehow. The service agent by memory said they had to change the network card to resolve the issue.
Any advice on how to test further?

And another question, what does this attribute mean: supported_features: 19901
Cheers

@ariel, @chimpy, I am also experiencing those problems. Unfortunately, I don’t have the bandwidth currently. I will look at it as soon as I can!

I don’t have any suggestions unfortunately.

Using that number HA can figure out what kinds of operations the media_player supports, which is:

    SUPPORT_NEXT_TRACK,
    SUPPORT_PAUSE,
    SUPPORT_PLAY,
    SUPPORT_PREVIOUS_TRACK,
    SUPPORT_SELECT_SOURCE,
    SUPPORT_TURN_OFF,
    SUPPORT_TURN_ON,
    SUPPORT_VOLUME_MUTE,
    SUPPORT_VOLUME_SET,
    SUPPORT_VOLUME_STEP

Thanks for your responses. I’ve shamelessly borrowed a fair bit (all) of your yaml code for the LS50s. I haven’t attempted serious troubleshooting yet, but the DSP code isn’t working. With supported_features: 19901, will I be able to control/sync the DSP settings?

I have searched this topic, but didn’t find anything about it.
I’ve been playing with the Kef integration, and it’s great, but I was missing the ‘current playing’ information. So I’ve been playing with a packet monitoring tool, and it’s possible to get this information, using port 10100. When sending a TCP package with a hex value of 0, it will return the information like this:

<view id="play">
  <text id="scrid">100</text>
  <text id="cbId">1000</text>
  <text id="title">Now Playing</text>
  <text id="artist"></text>
  <text id="otrknum"></text>
  <text id="rating">0</text>
  <text id="album">Angus &amp; Julia Stone (Deluxe)</text>
  <text id="track">All This Love</text>
  <text id="albart">yes</text>
  <text id="Favorite">yes</text>
  <text id="mimtype">Spotify</text>
  <icon id="aart" url="https://i.scdn.co/image/ab67616d0000b2738a4409496dc76a5637e40840">aart</icon>
  <text id="bitrate">1411 kbps</text>
  <icon id="wicon">infra</icon>
  <value id="buflvl" min="0" max="100">100</value>
  <value id="wilvl" min="0" max="100"></value>
  <value id="timep" min="0" max="65535">85</value>
  <value id="timet" min="0" max="65535">245</value>
  <value id="timec" min="0" max="99999">0</value>
  <value id="date" min="0" max="99999999">0</value>
</view><view id="status">
  <icon id="play">play:1000</icon>
  <icon id="shuffle" text="Tracks">shuffle</icon>
  <icon id="repeat">empty</icon>
  <value id="busy" min="0" max="1">0</value>
</view>

I’m not really experienced with Python development, but I might try to build something myself. But I had to share it, maybe someone else can use this info as well.

Similar to @tomroeleveld, i’ve done a bit of exporing and installed the UPnP Availability integration.

It’s pulled the UPnP xml on http://192.168.11.8:8080/description.xml, but only <deviceType>urn:schemas-upnp-org:device:MediaRenderer:1</deviceType> is visible (the UPnP Availability integration can see more device types for my TV)

Whether it’s the way the component works in HA, or whether the speakers are still visibile, I don’t know, but when turning off the speakers the binary sensor is still visible with attributes, rather than becoming unavailable.

May be of use to someone who knows more than I do about this sort of stuff (which isn’t hard).

<root xmlns="urn:schemas-upnp-org:device-1-0" xmlns:ms="urn:microsoft-com:wmc-1-0" xmlns:smsc="www.smsc.com" xmlns:qq="http://www.tencent.com" xmlns:pnpx="http://schemas.microsoft.com/windows/pnpx/2005/11" xmlns:df="http://schemas.microsoft.com/windows/2008/09/devicefoundation">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<device ms:X_MS_SupportsWMDRM="true">
<dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMR-1.51</dlna:X_DLNADOC>
<pnpx:X_compatibleId>MS_DigitalMediaDeviceClass_DMR_V001</pnpx:X_compatibleId>
<pnpx:X_deviceCategory>MediaDevices</pnpx:X_deviceCategory>
<pnpx:X_hardwareId>MicrochipCE2CY920_0xBD VEN_14E7&DEV_0001&REV_01</pnpx:X_hardwareId>
<df:X_deviceCategory>Multimedia.DMR</df:X_deviceCategory>
<qq:X_QPlay_SoftwareCapability>QPlay:2.1</qq:X_QPlay_SoftwareCapability>
<smsc:ProductCap>SeekOnPaused</smsc:ProductCap>
<deviceType>urn:schemas-upnp-org:device:MediaRenderer:1</deviceType>
<friendlyName>KEFLS50w</friendlyName>
<manufacturer>KEF</manufacturer>
<manufacturerURL>http://www.kef.com/</manufacturerURL>
<modelDescription>LS50 Wireless</modelDescription>
<modelName>SP3903</modelName>
<modelNumber>03</modelNumber>
<modelURL>http://www.kef.com/</modelURL>
<serialNumber>84171500C537</serialNumber>
<UDN>uuid:5f9ec1b3-ed59-1900-4530-84171500c537</UDN>
<UPC>123810928305</UPC>
<iconList>
<icon>
<mimetype>image/jpeg</mimetype>
<width>48</width>
<height>48</height>
<depth>24</depth>
<url>/BCO_device_sm_icon.jpg</url>
</icon>
<icon>
<mimetype>image/jpeg</mimetype>
<width>120</width>
<height>120</height>
<depth>24</depth>
<url>/BCO_device_lrg_icon.jpg</url>
</icon>
<icon>
<mimetype>image/png</mimetype>
<width>48</width>
<height>48</height>
<depth>24</depth>
<url>/BCO_device_sm_icon.png</url>
</icon>
<icon>
<mimetype>image/png</mimetype>
<width>120</width>
<height>120</height>
<depth>24</depth>
<url>/BCO_device_lrg_icon.png</url>
</icon>
</iconList>
<serviceList>
<service>
<serviceType>urn:schemas-upnp-org:service:RenderingControl:1</serviceType>
<serviceId>urn:upnp-org:serviceId:RenderingControl</serviceId>
<SCPDURL>/RenderingControl/desc.xml</SCPDURL>
<controlURL>/RenderingControl/ctrl</controlURL>
<eventSubURL>/RenderingControl/evt</eventSubURL>
</service>
<service>
<serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>
<serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId>
<SCPDURL>/ConnectionManager/desc.xml</SCPDURL>
<controlURL>/ConnectionManager/ctrl</controlURL>
<eventSubURL>/ConnectionManager/evt</eventSubURL>
</service>
<service>
<serviceType>urn:schemas-upnp-org:service:AVTransport:1</serviceType>
<serviceId>urn:upnp-org:serviceId:AVTransport</serviceId>
<SCPDURL>/AVTransport/desc.xml</SCPDURL>
<controlURL>/AVTransport/ctrl</controlURL>
<eventSubURL>/AVTransport/evt</eventSubURL>
</service>
<service>
<serviceType>urn:schemas-tencent-com:service:QPlay:1</serviceType>
<serviceId>urn:tencent-com:serviceId:QPlay</serviceId>
<SCPDURL>/QPlay/desc.xml</SCPDURL>
<controlURL>/QPlay/ctrl</controlURL>
<eventSubURL/>
</service>
</serviceList>
<presentationURL>http://192.168.11.8</presentationURL>
</device>
</root>

Offtopic-ish as I don’t know anything about kef integration – the UPnP availability sensor is explicitly designed only to track whether a device is online or not (based on what it broadcasts), so that is not solution for anything else besides having a binary_sensor reporting that.

Has anyone found some info for the version II of the LS50 wireless ?

+1, this doesn’t seem to work with the LS50W II, I suppose implementation is different.

I found a python script regarding the Wireless II version, but i don’t have the knowledge to implement them in Home Asssistant.

I own an old LS50 Wireless, one of those without the Wake-On-Lan support, so the only way I have to turn it on it by using the IR remote.

I’d like to use the Broadlink integration to turn it on, but the IR code I can “learn” from the Kef remote is a just a “power toggle” command, not a discrete “power on” command.

Was anybody able to get the discrete IR codes working with a Broadlink remote?
See the second page on this PDF: https://assets.kef.com/pdf_doc/ls50w/LS50Wireless-IRcode-INT.pdf

Thanks.

In case anybody else was interested, I was able to generate all of the Kef LS50 Wireless Broadlink IR codes: both the original ones (available on the standard remote) and the “secret” ones (discrete commands). You can find them here:

Would it be possible to modify the current Kef integration so that the supports_on would have a third possible value, let’s say via_IR?

1 Like

Another +1 for LS50 Wireless II support. I replaced my old denon receiver and speakers with a new ls50 Wireless II - now I am very much missing Home Assistant integration which I used to change input and keep track of power-on state

More references of use of pykefcontrol: GitHub - pirminj/ls50w2: A Flutter app to control the LS50 Wireless II (still non functional though)
I am guessing that ls50w2 will require a new integration, separate from the one we currently have in HA, based on pykefcontrol which is a different library from the one currently used, and it doesn’t seem to be backwards compatible with ls50w v1. It doesn’t look like there is a simple upgrade path for the current integration to a new one supporting version 2 of these speakers.

for the time being,

pip3 install pykefcontrol

allows writing scripts that can be called from HA to capture state and issue commands for automations

I am the author of pykefcontrol, and I am happy to announce that Kef LS50WII are integrated in home assistant as a media player through a custom components in HACS. I has been a few days already but I did not actively communicate about it.
You can find the interation as well as the instructions here : GitHub - N0ciple/hass-kef-connector: A Home Assistant integration for the Kef LS50W2

1 Like

Hi @basnijholt,

First of all, I’d like to thank you for your work: it motivated me to install HA to integrate my KEF LSX speakers.
I’m a noob and I didn’t have found your custom component in the HACS store as you can see on my screenshot below.

Did I miss something?

Hope you can help to figure this out.

Thanks in advance!

Best

@N0ciple Thanks a bunch for this. I have been using the LS50W2 integration for a few days now and it’s really solid. These are great great speakers that deserved a great integration and now they have it, thank you

Hi Robin

I was wondering if you could give me some pointers about interaction with the LS50W2. In particular, what communications does the LS50W2 send to update clients about changed status.

I’m not using your Python app (yet!) As I’m already controlling my speaker using NodeRED and openHAB. I’m not a programmer and Python is impenetrable to me.

I’m interested in two specific things that can change at the LS50W2 end without instruction from an app or other source: changing to WiFi source (happens automatically if someone starts streaming), and going on to standby (happens automatically simply after a period of time without music being played).

I’m guessing that there is something sent from the speaker in these circumstances because KEF’s app is updated when either of these two events occur. I’d like to be able to detect these events and make the rest of my system respond appropriately if I can. I guess I could simply poll the speaker regularly to confirm the status, that would have to be very frequently to be of any use. Is there a more elegant and efficient solution? Any pointers you can give me would be very helpful. Thanks

Hello John !

I was wondering as well how does the app knows about the changes. I thought that the speaker would push some kind of information to the app, but that is not the case.

I thoroughly inspected the packets from the app to the speaker and from the speaker to the app, and I found out that actually, the app fetches every second for changes. That is not the best solution but that is the one which is used.

So if you want to get the info as soon as possible, you have to poll the speaker frequently.

Kef implemented a polling queue feature to avoid polling for all the possible parameters that could change. The app sends a get request to create a queue containing some events the app wants to track (for example the volume, the player status, the source, etc…) and subscribe to this queue. Then it polls this queue every second or so. If something changes, the speaker answer with what has changed. This is more efficient than polling indiviually volume, source, etc…

I did not finished reverse engineered this part and I did not implemented it yet in pykefcontrol. Altough, I think I might have some python code which try to mimic this feature if you are interested.

Hi Robin

This is very interesting and helpful. I guess for my purposes a polling of the source will give me what I need but I would be interested in trying to understand a bit more of what you discovered about KEF’s query queue if you can point me to whatever you made of it. I don’t know Python but I hope I can get the gist of it.

Thanks again. Happy Christmas!