Test outputs for LSX 2, LS60 and LS50 W2
Please paste the content of the Sum Up section (or any error that you got while running the testing script) in this issue !
Example
-----------------------------Sum Up------------------------------
Speaker version:
LS50 Wireless 2
Working features:
✓ speaker_info
✓ power_off
✓ power_on
✓ select wifi
✓ select bluetooth
✓ select tv
✓ select optical
✓ select coaxial
✓ select analog
✓ set volume
✓ mute
✓ unmute
✓ get song info
✓ next track
✓ previous track
✓ pause
✓ play
Non working features:
--------------------------End of tests---------------------------
Thank you for your help :+1:
-----------------------------Sum Up------------------------------
Speaker version:
LSX 2
Working features:
✓ speaker_info
✓ power_off
✓ power_on
✓ select wifi
✓ select bluetooth
✓ select tv
✓ select optical
✓ select analog
✓ set volume
✓ mute
✓ unmute
✓ get song info
✓ next track
✓ previous track
✓ pause
✓ play
Non working features:
✗ select coaxial
--------------------------End of tests---------------------------
The LSX 2 does not have a coaxial input; when the test script selected the coaxial input, the speaker switched to WiFi.
Perhaps selecting the coaxial input on the LSX 2 should return in some kind of 'Input not supported' result?
@mjbrands, thank you so much for testing my library! I was feeling a bit desperate, hoping that someone would come across it and test it for LSX 2 or LS60. I even tried asking for help on the KEF subreddit, but unfortunately, it led to a permanent ban, which was quite demoralizing and sickening.
As for your feedback, you're absolutely right. I forgot to implement checks on the speaker type in the testing script. I will be sure to add some checks when I release a version that is "LSX 2 compatible."
Also, I wanted to ask if LSX 2's USB input is a source that can be set in the Kef Connect app? If so, I will add it to the test and the library ?
Hi Robin,
USB is indeed one of the sources that can be selected. I attached a screenshot of the sources that can be selected.
Why the ban btw? Because your library uses an unpublished API? They didn't lock it down (they could've used TLS with a client certificate embedded in the app or something).
I guess 'My hardware, my rules' hasn't really applied anymore for 10+ years.
Cheers,
Mathijs
On Sun, 12 Mar 2023, 18:10 Robin Dupont, @.***> wrote:
@mjbrands https://github.com/mjbrands, thank you so much for testing my library! I was feeling a bit desperate, hoping that someone would come across it and test it for LSX 2 or LS60. I even tried asking for help on the KEF subreddit, but unfortunately, it led to a permanent ban, which was quite demoralizing and sickening.
As for your feedback, you're absolutely right. I forgot to implement checks on the speaker type in the testing script. I will be sure to add some checks when I release a version that is "LSX 2 compatible."
Also, I wanted to ask if LSX 2's USB input is a source that can be set in the Kef Connect app? If so, I will add it to the test and the library ?
— Reply to this email directly, view it on GitHub https://github.com/N0ciple/pykefcontrol/issues/2#issuecomment-1465250397, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5AVK2QEKSZYY2CWNN3PADW3X7QLANCNFSM6AAAAAAS3EABU4 . You are receiving this because you were mentioned.Message ID: @.***>
Mathijs, thank you for your help. Unfortunately, it appears that the picture was not successfully uploaded to GitHub. However, this is not a big deal, as I believe USB was the only missing source (please correct me if I am wrong).
I have made updates to the testing script so that it will now adjust the source list based on your speaker model, and it will test for USB (assuming you have an LSX 2). If USB selection is functioning correctly for you, then we can conclude that all features have been covered, and Pykefcontrol is compatible with LSX 2 (with a few modifications to prevent selecting a source that is not in the list) !
Why the ban btw? Because your library uses an unpublished API? They didn't lock it down (they could've used TLS with a client certificate embedded in the app or something).
If only that was the problem... As far as I know, the KEF subreddit isn't moderated by KEF or anyone related to KEF. It turned out that the current moderator has a problem with me sharing stuff about a Python library (which wasn't an issue with the previous moderator). 🤷♂️
The new version of the test script skips the coaxial input, so now all checks pass for the LSX 2:
-----------------------------Sum Up------------------------------
Speaker version:
LSX 2
Working features:
✓ speaker_info
✓ power_off
✓ power_on
✓ select wifi
✓ select bluetooth
✓ select tv
✓ select optical
✓ select analog
✓ select usb
✓ set volume
✓ mute
✓ unmute
✓ get song info
✓ next track
✓ previous track
✓ pause
✓ play
Non working features:
--------------------------End of tests---------------------------
There is an issue with test script itself though: you bumped the version to 2, but on line 97 you have a hardcoded check against version 1, so the script always complains it is out of date. It is probably better to get the version from __file__ and compare that to the one in the file you retrieve from Github?
On line 444, you might want to change Chormecast to Chromecast?
Lines 28 and 30 should probably also list usb as an input for LS50/LS60?
During the volume test you lower the volume (which makes sense), but I see you do specifically handle situations where the volume is already very low (lines 364-366).
I see you commented out a hardcoded version check on lines 431-434; probably because it is now 0.6.2?
Anyway, the script made it super easy to test again 👍
Thanks a lot for your feedback !
There is an issue with test script itself though: you bumped the version to 2, but on line 97 you have a hardcoded check against version 1, so the script always complains it is out of date. It is probably better to get the version from file and compare that to the one in the file you retrieve from Github?
I made a quick fix, probably not the best solution but it should work now. I occurs to me that a solution with __file__ might have been more elegant tough!
On line 444, you might want to change Chormecast to Chromecast?
Nice catch, much appreciated! I've made the necessary corrections.
Lines 28 and 30 should probably also list usb as an input for LS50/LS60?
The USB ports on the LS50 and LS60 are actually meant for service purposes (likely for official KEF support to flash new firmware or something similar), but you cannot use the speakers as USB sound cards. That's why I didn't include USB as a possible input source for the LS50 and LS60.
During the volume test you lower the volume (which makes sense), but I see you do specifically handle situations where the volume is already very low (lines 364-366).
Indeed, the reasoning behind it was to prevent scenarios where the volume was already so low that reducing it further could potentially mute the speaker, for instance.
I see you commented out a hardcoded version check on lines 431-434; probably because it is now 0.6.2?
I think I wanted to perform a check on the library version. To be honest, I rushed the development of the script a bit, so it's definitely not the prettiest code!
Hey
Happy to see your efforts here @N0ciple. I'm getting a pair of LS60's delivered in ~12 hours. Apart from being excited about that I am also pretty keen on getting them hooked up to HASS.
So expect a report within a few days on those.
-----------------------------Sum Up------------------------------
Speaker version:
LS60
Working features:
✓ speaker_info
✓ power_off
✓ power_on
✓ select wifi
✓ select bluetooth
✓ select tv
✓ select optical
✓ select coaxial
✓ select analog
✓ set volume
✓ mute
✓ unmute
✓ get song info
✓ next track
✓ previous track
✓ pause
✓ play
Non working features:
--------------------------End of tests---------------------------
All good!
Hello @hilli Thank you so much for your feedback! I really appreciate that you took the time to run the tests!
I think you can already use the home assistant integration https://github.com/N0ciple/hass-kef-connector Although it is not (yet) officially compatible with LSX 2 and LS60, there's nothing that would prevent it from working, provided that you give the correct IP address, although the speaker might be branded as a LS50W2.
I'll try to update both pykefcontrol and hass-kef-connector this weekend to autodetect the speaker model (if possible) and provide faster updates.
Yeah, I am up and running with Home Assistant. Seems to work.
It totally agree on the issue of being compatible with all recent models of KEFs LS models, since they are all on the same W2 platform.
I dug around with tcpdump and Wireshark. The only place I have found containing a hint of what the model it is is in this call.
# Apparently this is a list of all the speakers in the group
# And the only place to get the speaker ID of which the first segment is the model.
http://ip.add.re.ss/api/getRows?path=grouping%3Amembers&roles=%40all&from=0&to=19
The result is this:
HTTP/1.1 200 OK
Date: Fri, 21 Apr 2023 05:55:34 GMT
Transfer-Encoding: chunked
Content-Type: application/json
{
"roles": {
"path": "grouping:members",
"containerType": "none",
"title": "members",
"timestamp": 1681197912436,
"type": "container"
},
"rowsCount": 1,
"rows": [
{
"title": "KEFs",
"id": "ls60w-5071d940-9bf1-41f4-ac64-474c388e770d",
"type": "value",
"value": {
"groupingMember": {
"master": {
"name": "KEFs",
"id": "ls60w-5071d940-9bf1-41f4-ac64-474c388e770d"
},
"follower": {
"name": "KEFs",
"id": "ls60w-5071d940-9bf1-41f4-ac64-474c388e770d"
}
},
"type": "groupingMember"
}
}
],
"rowsVersion": 2
}
So rows.id in the json, split on - and grab the first bit.
-----------------------------Sum Up------------------------------ Speaker version: LSX 2 Working features: ✓ speaker_info ✓ power_off ✓ power_on ✓ select wifi ✓ select bluetooth ✓ select tv ✓ select optical ✓ select analog ✓ select usb ✓ set volume ✓ mute ✓ unmute ✓ get song info ✓ next track ✓ previous track ✓ pause ✓ play Non working features: --------------------------End of tests---------------------------
I am curious as to what the LSX II and the LS 50 II reports here, @N0ciple and @mvhuizen. http://ip.add.re.ss/api/getRows?path=grouping%3Amembers&roles=%40all&from=0&to=19
| rowsCount | 1 |
|---|---|
| roles | |
| type | "container" |
| path | "grouping:members" |
| containerType | "none" |
| timestamp | 1675217796564 |
| title | "members" |
| rows | |
| 0 | |
| value | |
| groupingMember | |
| master | |
| name | "Kef LSX II" |
| id | "lsxii-ff87ddcb-d886-40c3-b3d3-301938f8ae24" |
| follower | |
| name | "Kef LSX II" |
| id | "lsxii-ff87ddcb-d886-40c3-b3d3-301938f8ae24" |
| type | "groupingMember" |
| type | "value" |
| id | "lsxii-ff87ddcb-d886-40c3-b3d3-301938f8ae24" |
| title | "Kef LSX II" |
| rowsVersion | 2 |
Raw: {"rowsCount":1,"roles":{"type":"container","path":"grouping:members","containerType":"none","timestamp":1675217796564,"title":"members"},"rows":[{"value":{"groupingMember":{"master":{"name":"Kef LSX II","id":"lsxii-ff87ddcb-d886-40c3-b3d3-301938f8ae24"},"follower":{"name":"Kef LSX II","id":"lsxii-ff87ddcb-d886-40c3-b3d3-301938f8ae24"}},"type":"groupingMember"},"type":"value","id":"lsxii-ff87ddcb-d886-40c3-b3d3-301938f8ae24","title":"Kef LSX II"}],"rowsVersion":2}
I am curious as to what the LSX II and the LS 50 II reports here, @N0ciple and @mvhuizen. http://ip.add.re.ss/api/getRows?path=grouping%3Amembers&roles=%40all&from=0&to=19
I roughly have the same thing as @mvhuizen :

I have just released pykefcontrol v0.7.
You should be able to querry the speaker model and firmware version like so :
from pykefcontrol import KefConnector
spkr = KefConnector("www.xxx.yyy.zzz")
print(spkr.speaker_model)
print(spkr.firmware_version)
@hilli I eventually used another API call to figure out the model and firmware version. Currently I use :
http://www.xxx.yyy.zzz/api/getData?path=settings:/releasetext&roles=value
And I split on the underscore. It returns the same string as the "Release Status" field of the index.fcgi webpage.
Nice, thank you.