[Music] Squeeze box / Logitech Media Server control

Wow that’s fantastic. This has been on my wish list forever! Thank you so much!

I installed it and but I’m getting the response that no music services are installed. Does this require 19.02? I will create an issue on github.

Do you have any log files showing which skills Mycroft loaded during startup and are there any error messages?

In addition to this skill you also need the Playback Control skill for Common Play installed: https://github.com/MycroftAI/skill-playback-control/

So far I have only tested on 18.08 but I’ve started to upgrade my instances to 19.02.

OK I found the playback skill

pi@mark_1:~ $ msm list | grep playback
mycroft-playback-control        [installed]

I think this below from the skills log could be the problem. I did end upgrading to 19.02 to try that route which may be the problem.

20:44:45.805 - skill-squeezebox_johanpalmqvist:initialize:24 - INFO - Initializing SqueezeBox Media skill
20:44:45.840 - mycroft.messagebus.client.ws:remove:159 - DEBUG - Removing found 'skill-squeezebox.johanpalmqvist.set'
20:44:45.849 - mycroft.messagebus.client.ws:remove:159 - DEBUG - Removing found 'skill-squeezebox.johanpalmqvist:IdentifyTrack.intent'
20:44:45.852 - mycroft.messagebus.client.ws:remove:159 - DEBUG - Removing found 'skill-squeezebox.johanpalmqvist:Stop.intent'
20:44:45.856 - mycroft.messagebus.client.ws:remove:159 - DEBUG - Removing found 'skill-squeezebox.johanpalmqvist:UpdateCache.intent'
20:44:45.859 - mycroft.messagebus.client.ws:remove:159 - DEBUG - Removing found 'skill-squeezebox.johanpalmqvist:VolumeDown.intent'
20:44:45.862 - mycroft.messagebus.client.ws:remove:159 - DEBUG - Removing found 'skill-squeezebox.johanpalmqvist:VolumeHalf.intent'
20:44:45.866 - mycroft.messagebus.client.ws:remove:159 - DEBUG - Removing found 'skill-squeezebox.johanpalmqvist:VolumeMax.intent'
20:44:45.869 - mycroft.messagebus.client.ws:remove:159 - DEBUG - Removing found 'skill-squeezebox.johanpalmqvist:VolumeMute.intent'
20:44:45.872 - mycroft.messagebus.client.ws:remove:159 - DEBUG - Removing found 'skill-squeezebox.johanpalmqvist:VolumeQuarter.intent'
20:44:45.876 - mycroft.messagebus.client.ws:remove:159 - DEBUG - Removing found 'skill-squeezebox.johanpalmqvist:VolumeThreeQuarters.intent'
20:44:45.879 - mycroft.messagebus.client.ws:remove:159 - DEBUG - Removing found 'skill-squeezebox.johanpalmqvist:VolumeUnmute.intent'
20:44:45.882 - mycroft.messagebus.client.ws:remove:159 - DEBUG - Removing found 'skill-squeezebox.johanpalmqvist:VolumeUp.intent'
20:44:45.999 - mycroft.skills.core:load_skill:166 - ERROR - Failed to load skill: skill-squeezebox.johanpalmqvist
  File "/opt/mycroft/skills/skill-squeezebox.johanpalmqvist/__init__.py", line 32, in initialize

I suspect it fails to load the settings. Did you go to https://home.mycroft.ai/ to configure the skill?

Regarding 19.02, I just upgraded my test instance and the skill is loading successfully but I haven’t tested it further at this point.

Ahh home.mycroft.ai not updating reliably. My old nemesis. I touched the setting again and bounced the skills service and it like it started correctly. I see some other errors now, but I won’t have more time to test it tonight.
I have a fairly large collection which you mention as a caution in the readme, so I wonder if that could be related to the latest note. I’ll play with it some more tomorrow. It may be working now, but I can’t say for sure.

00:11:18.850 - skill-squeezebox_johanpalmqvist:initialize:24 - INFO - Initializing SqueezeBox Media skill
00:11:18.854 - mycroft.skills.padatious_service:_register_object:113 - DEBUG - Registering Padatious intent: skill-squeezebox.johanpalmqvist:VolumeUnmute.intent
00:11:18.862 - skill-squeezebox_johanpalmqvist:initialize:43 - DEBUG - Speak dialog enabled: False
00:11:18.868 - skill-squeezebox_johanpalmqvist:get_sources:59 - INFO - Loading content
00:11:18.871 - skill-squeezebox_johanpalmqvist:get_sources:61 - DEBUG - Selecting default backend
00:11:18.876 - skill-squeezebox_johanpalmqvist:get_playerid:109 - DEBUG - Requested backend: Kitchen
00:11:18.888 - mycroft.skills.padatious_service:_register_object:113 - DEBUG - Registering Padatious intent: skill-squeezebox.johanpalmqvist:VolumeUp.intent
<players redacted>
    00:11:20.873 - skill-squeezebox_johanpalmqvist:get_playerid:127 - DEBUG - Player confidence: 1.0
    00:11:20.876 - skill-squeezebox_johanpalmqvist:get_playerid:130 - DEBUG - Extracted backend: Kitchen
    00:11:20.913 - skill-squeezebox_johanpalmqvist:load_library_total_duration:167 - INFO - Loading library total duration state
    00:11:20.921 - skill-squeezebox_johanpalmqvist:load_library_total_duration:173 - INFO - Loaded library total duration state
    00:11:20.932 - skill-squeezebox_johanpalmqvist:update_sources_cache:347 - INFO - Library total duration changed. Updating cache.
    00:11:20.966 - skill-squeezebox_johanpalmqvist:load_library_total_duration:167 - INFO - Loading library total duration state
    00:11:20.976 - skill-squeezebox_johanpalmqvist:load_library_total_duration:173 - INFO - Loaded library total duration state
    00:11:20.982 - skill-squeezebox_johanpalmqvist:update_library_cache:324 - INFO - Library total duration unchanged. Not updating cache.
    00:11:20.986 - skill-squeezebox_johanpalmqvist:load_library_cache:157 - INFO - Loading library cache
    00:11:20.990 - skill-squeezebox_johanpalmqvist:load_library_cache:163 - ERROR - Library cache not found. Exception: Expecting value: line 1 column 1 (char 0)
    00:11:21.014 - mycroft.messagebus.client.ws:remove:159 - DEBUG - Removing found 'skill-squeezebox.johanpalmqvist.set'
    00:11:21.022 - mycroft.messagebus.client.ws:remove:159 - DEBUG - Removing found 'skill-squeezebox.johanpalmqvist:IdentifyTrack.intent'
    00:11:21.025 - mycroft.messagebus.client.ws:remove:159 - DEBUG - Removing found 'skill-squeezebox.johanpalmqvist:Stop.intent'
    00:11:21.029 - mycroft.messagebus.client.ws:remove:159 - DEBUG - Removing found 'skill-squeezebox.johanpalmqvist:UpdateCache.intent'
    00:11:21.032 - mycroft.messagebus.client.ws:remove:159 - DEBUG - Removing found 'skill-squeezebox.johanpalmqvist:VolumeDown.intent'
    00:11:21.035 - mycroft.messagebus.client.ws:remove:159 - DEBUG - Removing found 'skill-squeezebox.johanpalmqvist:VolumeHalf.intent'
    00:11:21.038 - mycroft.messagebus.client.ws:remove:159 - DEBUG - Removing found 'skill-squeezebox.johanpalmqvist:VolumeMax.intent'
    00:11:21.042 - mycroft.messagebus.client.ws:remove:159 - DEBUG - Removing found 'skill-squeezebox.johanpalmqvist:VolumeMute.intent'
    00:11:21.045 - mycroft.messagebus.client.ws:remove:159 - DEBUG - Removing found 'skill-squeezebox.johanpalmqvist:VolumeQuarter.intent'
    00:11:21.048 - mycroft.messagebus.client.ws:remove:159 - DEBUG - Removing found 'skill-squeezebox.johanpalmqvist:VolumeThreeQuarters.intent'
    00:11:21.053 - mycroft.messagebus.client.ws:remove:159 - DEBUG - Removing found 'skill-squeezebox.johanpalmqvist:VolumeUnmute.intent'
    00:11:21.056 - mycroft.messagebus.client.ws:remove:159 - DEBUG - Removing found 'skill-squeezebox.johanpalmqvist:VolumeUp.intent'
    00:11:21.173 - mycroft.skills.core:load_skill:166 - ERROR - Failed to load skill: skill-squeezebox.johanpalmqvist
      File "/opt/mycroft/skills/skill-squeezebox.johanpalmqvist/__init__.py", line 55, in initialize
      File "/opt/mycroft/skills/skill-squeezebox.johanpalmqvist/__init__.py", line 65, in get_sources
      File "/opt/mycroft/skills/skill-squeezebox.johanpalmqvist/__init__.py", line 348, in update_sources_cache
      File "/opt/mycroft/skills/skill-squeezebox.johanpalmqvist/__init__.py", line 234, in save_sources_cache
    AttributeError: 'SqueezeBoxMediaSkill' object has no attribute 'results'

OK it appears to be caching the albums so everything appears to be progressing. I’ll give it a go once that finishes.

One error buried in the logs is:
Failed to load setting file: /opt/mycroft/skills/skill-squeezebox.johanpalmqvist/settingsmeta.json which looks fine. It doesn’t have my settings there, but has the template.

Thanks for everything, this has been one of my most wanted items in Mycroft for a long time!

1 Like

OK it was able to scan through all my music (I think) the final scans were of genre, but the skill won’t load with the following error:

17:46:26.961 - mycroft.skills.core:load_skill:166 - ERROR - Failed to load skill: skill-squeezebox.johanpalmqvist
  File "/opt/mycroft/skills/skill-squeezebox.johanpalmqvist/__init__.py", line 55, in initialize
  File "/opt/mycroft/skills/skill-squeezebox.johanpalmqvist/__init__.py", line 65, in get_sources
  File "/opt/mycroft/skills/skill-squeezebox.johanpalmqvist/__init__.py", line 348, in update_sources_cache
  File "/opt/mycroft/skills/skill-squeezebox.johanpalmqvist/__init__.py", line 296, in save_sources_cache

Re-reading your readme (duh) I’m guessing this may be insurmountable, due to the size of the library.

I’m OK with a skill which would be limited to turning the players on and off and favorites/radio stations, as I can navigate the music in other ways. Would it be possible to create a setting which just scanned favorites or radio stations?

Could the issue be caused by missing genre tags in your media files? I’m not sure how large a library can be before running into issues due to size but the library sources are stored in RAM for faster access. I’ve pushed a new version with more error handling and added configurable sources which makes it possible to just load favorites (or other combinations). Would be interesting to see if you still run into issues with the media library on the latest version (might have to delete the *.json.gz files in the skill folder first to make sure they’re recreated).

Awesome! Thanks so much. I’ll test it out tomorrow and I’m going to post it, unless you want to, on the Slimserver forums https://forums.slimdevices.com/forum.php and maybe we can get some more testers.

@JOPS I was able to remove the media library setting and the skill works! Thank you so much this is great.

As for the library itself. There could easily be junk in the tags (especially genre), but I typically navigate my library via dynamic playlists and favorites so this is good enough. Maybe once I clean up the tags I can retry scanning it again.

Is there a command to just turn on/off a player? I typically sync all my players so I don’t need to play something on them just turn one on or off.

I did notice if it can’t find something in its searching it does say you don’t have a music skill installed. I will play around some more and report back.

Thanks for all your work on this!!!

1 Like

@sanderant: You’re welcome, and thank you very much for the testing and feedback!

With the latest version you should be able to power on/off a player. Never used that feature myself but it was easy to add it to the skill.

The response you get sometimes about not having any music skills installed comes from skill-playback-control which handles CommonPlay so you might want to open an issue there. I’ve gotten it too a few times and guess it responds that way when a music skill either doesn’t find a match or it takes too long to deliver a matching result. Maybe the timeout value could be adjusted in skill-playback-control to mitigate the issue but I also think the wording of the response could be better since a music skill is actually installed.

Feel free to mention what Mycroft can do with this skill in the Slimserver forums since I don’t (yet) have an account there (nor have I ever owned any real Squeezebox hardware, only RPi3 + HiFiBerry).

I’m a long-time LMS user, and I picked up on this skill a few days ago via @sanderant post on the Squeezebox forums. I repurposed a Pi3+ with a Jabra borrowed from work and had some fun getting it all to work, at least with some of the standard skills.

I have installed your Squeezebox skill, and configured it with details of my LMS server and main player. But I just can’t see how to use the skill (I am new to this Mycroft/Picroft thing) - or even check whether it’s functioning, so any pointers would be helpful. For example, where do I find the various logs that I could use to identify the issues? And even, what are the commands to ask Mycroft to play from LMS?

Robert

1 Like

Hey @GrumpyBob the best thing is to check the skills log. The process can be a little frustrating to be sure, but if you can grep the skills log that is where I found the most help.

grep -i squeeze /var/log/mycroft/skills.log | less

2 Likes

Hi JOPS & others
Thank you for the skill!! This would be phenomenal if I could get it to work, but it doesn’t :frowning:
Each time I get following error. Tried to change some things in code, Pi can ping the server and all, so I don’t know where to look from here. (I added the settings debuglog also to the errorlog to make it easier to verify)

20:41:02.073 - mycroft.skills.core:load_skill:123 - INFO - ATTEMPTING TO LOAD SKILL: skill-squeezebox with ID skill-squeezebox
20:41:03.704 - mycroft.skills.settings:_poll_skill_settings:412 - INFO - SqueezeBox Media Skill: Delaying next settings fetch
20:41:04.019 - skill-squeezebox:initialize:24 - INFO - Initializing SqueezeBox Media skill
20:41:04.048 - skill-squeezebox:initialize:33 - ERROR - Settings: {'server': '<IPADDRESS>', 'speak_dialog_enabled': False, 'default_player_name': 'Squeezebox_Radio', 'media_library_source_enabled': True, 'playlist_source_enabled': True, 'podcast_source_enabled': True, 'username': '', 'port': '<PORTOFWEBCLIENT', 'password': '', 'favorite_source_enabled': True}
20:41:04.060 - skill-squeezebox:get_sources:94 - INFO - Loading content
20:41:04.301 - skill-squeezebox:load_library_total_duration:241 - INFO - Loading library total duration state
20:41:04.307 - skill-squeezebox:load_library_total_duration:247 - INFO - Loaded library total duration state
20:41:04.312 - skill-squeezebox:update_sources_cache:444 - INFO - Library total duration changed. Updating cache.
20:41:04.358 - skill-squeezebox:load_library_total_duration:241 - INFO - Loading library total duration state
20:41:04.364 - skill-squeezebox:load_library_total_duration:247 - INFO - Loaded library total duration state
20:41:04.371 - skill-squeezebox:update_library_cache:421 - INFO - Library total duration unchanged. Not updating cache.
20:41:04.381 - skill-squeezebox:load_library_cache:231 - INFO - Loading library cache
20:41:04.389 - skill-squeezebox:load_library_cache:237 - ERROR - Library cache not found. Exception: Expecting value: line 1 column 1 (char 0)
20:41:04.616 - mycroft.skills.core:load_skill:170 - ERROR - Failed to load skill: skill-squeezebox
  File "/opt/mycroft/skills/skill-squeezebox/__init__.py", line 80, in initialize
  File "/opt/mycroft/skills/skill-squeezebox/__init__.py", line 101, in get_sources
  File "/opt/mycroft/skills/skill-squeezebox/__init__.py", line 445, in update_sources_cache
  File "/opt/mycroft/skills/skill-squeezebox/__init__.py", line 308, in save_sources_cache
AttributeError: 'SqueezeBoxMediaSkill' object has no attribute 'results'

Hi all

I am quite new to Mycroft and still learning so be kind if I ask something stupid.

Anyway I installed it on a Google AIY kit to test and it all works well. Then I discovered the Squeeze box skill which I have installed.
(.venv) pi@picroft:~ $ mycroft-msm list|grep squee

INFO - building SkillEntry objects for all skills
INFO - building SkillEntry objects for all skills
INFO - invalidating skills cache
skill-squeezebox.johanpalmqvist	[installed]

Problem is that I can’t work out how to configure it. If I go to the mycroft.ai page it is not listed in the list of skil.
Am I supposed to populate the setting.json file myself? if so what is the format?

Thank for you help.

Hi ppmt,

Not a stupid question at all, I just downloaded the Skill and had the same issue.

I’ve submitted a fix back to Johan the original author but if you want to get going straight away you can replace this file:
/opt/mycroft/skills/skill-squeezebox.johanpalmqvist/__init__.py
with my updated version:
https://raw.githubusercontent.com/krisgesling/skill-squeezebox/fix/get-settings/__init__.py

@gez-mycroft

I tried to download your file but it is the same file as the one I have

-rw-r--r--  1 pi pi 42828 Dec 19 15:24 __init__.py
-rw-r--r--  1 pi pi 42828 Dec  9 13:25 __init__.py.org

cksum is the same as well

edit: I found your file in the main repository. And now I can see it in the mycroft.ai

Thanks. Now I need to figure out how to use it

Sorry wrong link:
https://raw.githubusercontent.com/krisgesling/skill-squeezebox/fix/get-settings/__init__.py

1 Like

I got it to work so thanks a lot for that @gez-mycroft

1 Like

Anyone here still using the squeezebox skill with mycroft? I just started to use picroft and installed te skill successfully but cannot configure it. Even after the exchanging the init.py, the skill is not shown at Account and I am struggling to set the setting file manually.