Music player woes

Hi, I’m new to Mycroft, but not RasPi nor Linux. I got a new RasPi 4, burned a Picroft SSD card, booted and had it running in under two hours. Very Cool! That’s the good news. The not-so-good-news is I’ve been trying to get a music player working to no avail. I keep getting “I’m not configured to play music yet”. I’d like to (a) get access to a few thousand songs on a USB drive, and (b) get a music streaming service working. I’ve tried Pandora, Amazon and squeezebox skills, all with different levels of music silence. Are there HOWTOs on (a) and/or (b), with details like “Here is where you type in the mount point of your USB drive”, or “Here is where you type in your music streaming credentials”. I’ve found precious little with that level of detail on the Internet. If (when) I get it working, I’m willing to write such a doc and contribute it to the community. -Mike Mac

Hi @mike99mac
To get Mycroft to play music you have to install a skill that handles playing music. Right now there is 3 skills that can do that - Spotify, Pandora and Emby in the market, and there is some more not yet in market players like Amazon music player and some others as far as i have seen.

Installing one from the market should be pritty easy as “Hey mycroft install spotify” and then head to home.mycroft.ai and enter credentials for spotify on the skill page. Same for the other players.

But you are right that there is missing a player that could index and play from a networkshare or a local conected usbdisk. ut if you have lots of music on disk, I recoment setting up emby server and let emby index your music and then acces it using the emby skill.

Instructions for how to setup skills is on the market to.

https://market.mycroft.ai/skills

But I am sure a good howto always is welcome for any kind of use of an mycroft device :slight_smile:

1 Like

Note that if you want the picroft to act as spotify player as well the raspotify player need to be installed and user /password need to be setup in the appropriate config. There’s discussion in the spotify skill to make this easier.

Hi,

Thanks to all who replied.

I continue to hack, but still no music. :(( I have the Pandora skill installed and the correct credentials on
Account but the reply is always “you have not yet set up any music skills”.
So I install the Squeezebox Media skill, and also installed the Logitech Media Server.
Mycroft at least now tries to use the Squeezebox skill. Here are the errors on the console. Any suggestions?

play a song

Give me a moment to check for that voice.log
An error occurred while processing a request in Squeeze Box Media Skill
It sounds like you are trying to listen to some music, but you have not yet set up
any music skills. Please go to market.mycroft.ai to install and configure a music — 7.86
service skill.

Errors on the Log Output are:

``08:01:31.366 | INFO | 815 | Playback Control Skill | Resolving Player for: a song

 08:01:31.401 | INFO     |   815 | mycroft.skills.settings:save_settings:109 | Skill settings successfully saved to /opt/mycroft/skills/mycroft-spotify.forslund/settings.json
 08:01:31.409 | INFO     |   815 | mycroft-pandora_mycroftai:_extract_station:426 | generator raised StopIteration
 08:01:31.421 | INFO     |   815 | mycroft.skills.settings:save_settings:109 | Skill settings successfully saved to /opt/mycroft/skills/mycroft-npr-news.mycroftai/settings.json
Removing event mycroft-playback-control.mycroftai:PlayQueryTimeout
 08:01:31.448 | INFO     |   815 | mycroft.skills.settings:save_settings:109 | Skill settings successfully saved to /opt/mycroft/skills/mycroft-pandora.mycroftai/settings.json
Removing event mycroft-playback-control.mycroftai:PlayQueryTimeout
Removing event mycroft-playback-control.mycroftai:PlayQueryTimeout
Removing event mycroft-playback-control.mycroftai:PlayQueryTimeout
 08:01:31.521 | ERROR    |   815 | mycroft.skills.mycroft_skill.mycroft_skill:on_error:798 | An error occurred while processing a request in Squeeze Box Media Skill
Traceback (most recent call last):
  File "/home/pi/mycroft-core/mycroft/skills/mycroft_skill/event_container.py", line 66, in wrapper
    handler(message)
  File "/home/pi/mycroft-core/mycroft/skills/common_play_skill.py", line 78, in __handle_play_query
    result = self.CPS_match_query_phrase(search_phrase)
  File "/opt/mycroft/skills/skill-squeezebox.johanpalmqvist/__init__.py", line 617, in CPS_match_query_phrase
    backend, playerid = self.get_playerid(self.get_backend(phrase))
  File "/opt/mycroft/skills/skill-squeezebox.johanpalmqvist/__init__.py", line 186, in get_playerid
    players = self.lms.get_players()
  File "/opt/mycroft/skills/skill-squeezebox.johanpalmqvist/lms_client.py", line 55, in get_players
    players = self.lms_request(payload)["result"]["players_loop"]
KeyError: 'players_loop'
~~~~1.527 | INFO     |   815 | mycroft.skills.settings:save_settings:109 | Skill settings successfully saved to /opt/mycroft/skills/skill-squeezebox.johanpalmqvist/settings.json
Removing event mycroft-playback-control.mycroftai:PlayQueryTimeout
 08:01:38.912 | INFO     |   815 | ConfigurationSkill | Remote configuration updated
``````

this sounds like a bug in Squeezebox Media skill, please open an issue in it’s repo

regarding other skills, i believe there is a bug in mycroft home, maybe the settings are not being pulled down into your device? do you see anything in the skill logs regarding those skills loading?

JarbasAl,

Thanks for the reply. You write:

  • this sounds like a bug in Squeezebox Media skill, please open an issue in it’s repo

I did so - will watch for a reply. Then you write:

  • maybe the settings are not being pulled down into your device?

I change my credentials to the wrong e-mail address on https://account.mycroft.ai/skills, then see on the console:

07:49:03.320 | INFO     |   714 | mycroft.skills.settings:save_settings:109 | Skill settings successfully saved to /opt/mycroft/skills/mycroft-pandora.mycroftai/settings.json

I cat the file /opt/mycroft/skills/mycroft-pandora.mycroftai/settings.json and see the changes are getting back to my RasPi (and let me say that’s a pretty cool model :)).

I try removing the skills skill-squeezebox.johanpalmqvist and mycroft-spotify (I do not have a premium Spotify account), so as to just focus on Pandora. Mycroft still thinks I have no music skills.

Just for grins, I tried to raise the verbosity level of the log output:

turn debugging on
>> There are no running timers
go into debugging mode                                                                                                                                                 --- 1.50
>> I'm not sure I understood you.

Is there a skill to do this? Or how would I get a better traceback of how the code gets to the output: “but you have not yet set up any music skills.”?

Thanks.

-Mike Mac

Good news, I got Pandora working just by typing (still waiting on mic hardware) “Play Pandora” - from skills.log:

2019-12-30 11:21:22.477 | INFO     | 12639 | Playback Control Skill | Resolving Player for: play pandora
...
2019-12-30 11:21:27.422 | INFO     | 12639 | Playback Control Skill | Playing with: mycroft-pandora.mycroftai
2019-12-30 11:21:27.572 | INFO     | 12639 | mycroft-pandora_mycroftai:_play_station:430 | Starting: QuickMix
2019-12-30 11:21:27.586 | INFO     | 12639 | mycroft-pandora_mycroftai:_launch_pianobar_process:369 | Starting Pianobar process

Next step is to work on playing locally indexed music…

-Mike Mac

1 Like

Hi,

I installed the emby server on my picroft. I can play music from a browser.

However, I cannot play music from mycroft-cli. I try typing:

 play '11 - Someone Like You.mp3' from emby
 >> Unable to find or play 11 - Someone Like You.mp3. Please try again
 play artist Adele from emby                                                                                                                                            --- 1.50
 >> Unable to find or play artist Adele. Please try again

In the skills.log file I see:

2020-01-01 13:17:58.050 | INFO     |   719 | Emby | {'media': '11 - Someone Like You.mp3', 'utterance': "play '11 - Someone Like You.mp3' from emby"}
2020-01-01 13:17:58.051 | INFO     |   719 | Emby | 'NoneType' object has no attribute 'instant_mix_for_media'
2020-01-01 13:18:41.620 | INFO     |   719 | Emby | {'media': 'artist Adele', 'utterance': 'play artist Adele from emby'}
2020-01-01 13:18:41.621 | INFO     |   719 | Emby | 'NoneType' object has no attribute 'instant_mix_for_media'

I search the internet for the last error message and it would seem that emby is getting invoked. Is there an emby line command to test playing a song?

Thanks.

-Mike Mac

Welcome to the club… I’ve been fiddling with a Picroft off and on for a month now. I have 32K song files in my collection that I’d like to be able to access with the Mycroft, but it has proved a challenge.

So far, the only way I can get it to access the music I have stored on my iMac is running Emby server on the mac and using the Emby skill on Mycroft. However, the skill’s ability to find and play what I ask for is hit-and-miss at best (more hits using keyword “artist”, almost exclusively misses using “song”).

The Squeezebox skill, from what I understand, currently will not play music on the Mycroft itself… it can only control what is playing on a separate LMS/Squeezebox player pair.

There is a local music player skill still in the testing stage (localMusicPlayerSkill Feedback and Help). I have not played around with it yet.

As you’ve already found out, most of these skills require additional setup on the Skills page. Sometimes there are backend issues that interrupt/delay communication between your device and the skills configuration for hours or days. Also keep in mind that there are sometimes strange interactions between skills. A few versions ago I installed the auto volume skill and both Emby and TuneIn stopped playing. The only way I could get it back up and running was by updating to a unstable version.

While that may sound like criticism, at least I can get the Mycroft to play my music. I’ve looked into a similar situation for my aunt who has an Echo… All the Alexa skills say they can do it, but what they mean is that they will play the music you already own if you pay a monthly subscription to a premium version of the skill.

1 Like

Hi, thanks for a thorough reply.

So when Emby is hit-and-miss, is there a way to see the “intent JSON packet”? It would be interesting to know exactly what query Emby is getting from Mycroft.

I will look into the localMusicPlayerSkill.

-Mike Mac

Hi Mike, instead of:
play ‘11 - Someone Like You.mp3’ from emby

try typing:
play someone like you from emby

Hope this helps,

Stephen

Stephen, Thanks, I tried that but no joy. I type this on the CLI:

  play someone like you from emby                                             
 >> Unable to find or play someone like you. Please try again

Here is the log output in debug mode:

  06:01:09.155 | DEBUG    |   556 | mycroft.skills.intent_service:handle_utterance:329 | Utterances: ['play someone like you from emby']
~~~~adatious intent: {'name': 'emby.rickyphewitt:emby.intent', 'sent': 'play {media} from emby', 'matches': {'media': 'someone like you'}, 'conf': 1.0}
~~~~match': 'someone like you from emby', 'key': 'someone like you from emby', 'from_context': False}], 'utterance': 'play someone like you from emby'}
 06:01:09.274 | DEBUG    |   556 | urllib3.connectionpool | Starting new HTTPS connection (1): api.mycroft.ai:443
 06:01:09.289 | DEBUG    |   556 | mycroft.skills.padatious_service:handle_fallback:154 | Padatious fallback attempt: play someone like you from emby
 06:01:09.341 | INFO     |   556 | Emby | {'media': 'someone like you', 'utterance': 'play someone like you from emby'}
 06:01:09.341 | INFO     |   556 | Emby | 'NoneType' object has no attribute 'instant_mix_for_media'
-Mike Mac