Plexmusic Skill - Test and Feedback

@malevolent @j1nx
Hey guys … sorry for taking so long…

I corrected the errors … that is kind of embarassing i should have foreseen that happening.
I also had to install a new Mycroft device and set it up from scratch, it had some problems loading the configuration.
It eventually loaded the values after a couple restarts.
You can see that the configuration hasn’t loaded right when it logs:

 connecting to:

Without any content.

If you still have the motivation to do so you should be able to test it now.

I broke it as i was implementing a set of new features that are still missing documentation, they should be working now.

  • by search -> “Hey Mycroft, play {Title} by {Author}”
    If you had the skill running before you should reload the config to get the new search keys built. Call “Hey Mycroft, reload library” and wait for it to confirm completition.
  • random music -> “Hey Mycroft, play [some] random music”
    it will shuffle all the titles from your library
  • add to playlist -> “Hey Mycroft, add to playlist {playlistName}”
    will add the title you are listening to to the named playlist. The playlist needs to exist and be loaded in your local config. so if you add a playlist after downloading your track list. you should “Hey Mycroft, reload library” before you can add anything to it.

Let me know how it goes :slight_smile: I am happy to get any kind of contribuition.
Have a Nice Weekend and Happy Testing!

EDIT: added explanation for reloading config to init by search on an existing installation

Humm, I cannot see Plexmusic skill on home.mycroft.ai to configure it now.
and mycroft says configuration is missing, configure plexskill

I’ve rm -rf the skill and msm installed again, but it still doesn’t appears on home.mycroft.ai… can I be able to configure it via configuration file?

you removed the ~/.mycroft/skills/plex plugin/ folder as well? It might bite you because of old configuration files

I don’t have that directory…

Yeah, sorry, not exactly that folder. Skill settings are saved within their own folder in ~/.mycroft/skills/

Check if there is a folder referencing to the plex plugin. It might contain a setting.json which is “old”.

I have it configured at home.mycroft.ai as in my mycroft.conf…
i am not sure which one got it working :confused: sorry

sorry, it appeared after a few minutes on home.mycroft.ai, but it doesn’t create any directory under ~/.mycroft/skills, so I cannot configure it manually.

On the other hand it seems to conflict with News skill and youtube skill. I’ve removed both of them, but still fails with this error:

 19:00:17.232 | INFO     | 75232 | mesh-skill:send_MQTT:226 | address: 192.168.1.100, Port: 1883
 19:00:17.649 | INFO     | 75232 | Playback Control Skill | Resolving Player for: autumn tears
~~~~INFO     | 75232 | mycroft.util:wait_while_speaking:58 | mycroft.utils.wait_while_speaking() is depreciated, use mycroft.audio.wait_while_speaking() instead.
 19:00:17.652 | INFO     | 75232 | mesh-skill:send_MQTT:224 | MQTT: Mycroft/RemoteDevices/c8600098ed99/response, "Just a second"
 19:00:17.652 | INFO     | 75232 | mesh-skill:send_MQTT:226 | address: 192.168.1.100, Port: 1883
 19:00:17.654 | INFO     | 75232 | mesh-skill:handle_speak:206 | Response Location Length: 0
 Plex Music skill
    Title        0.000000
    Artist       0
    Album        0
    Playlist     0
    by Search    0

It seems it did not create any music lists …
could you please try reloading by “reload library” and send me the log?
it should spam the logs with all the songs its loading one after the other … when it’s done it will say “we are ready to roll” or something similar.

it should create a folder ~/.config/plexSkill and a json in it, containing info on your music.
could you check if that is happening?
that’s the information it’s going to use to respond to your queries.

Well, got finally working!

Something happened after installing this skill, don’t know if it was a coincidence but my mycroft instance stopped working completely, it didn’t respond to anything, weird.

All I had to do was:

git config pull.rebase false
git pull
./dev_setup.sh

and start mycroft again. Then, the library was scanned automatically

Now listening my beloved music. I will test the new features and report back! :smiley:

First impressions.

  • Search works impressively well. As I am not an English speaker, I expected to have issues it understood the 100% of the searches I did, even mycroft itself didn’t understand me well. For instance when I say “play the garden of dreams from autumn tears”, Mycroft understands
play the garden of dreams from out to theaters

The skill says:

 Plex Music skill
    Title      The Garden Of Crystalline Dreams - Act One  63.000000
    Artist     Lethian Dreams (FRA)  50
    Album      The Gardens Of Soulles (Split Ankhagram & Renascentia)  53
    Playlist     0
    by Search  The Garden Of Crystalline Dreams - Act One by Autumn Tears  63

And plays the proper album: The Garden Of Crystalline Dreams - Act One
Which is impressive, because I forgot to mention “crystalline” in the title and mycroft understood “out of theaters” instead “autumn tears” (yes, my pronunciation sucks).

I guess all those “Title”, “Artist”, “Album”, and so means all the matches and the probability.

  • Saying “next song” works!

The not-so-good

  • When I say to play a single song, it plays one time after another. I did the test and it plays the same song three times. I think it should play just once if I don’t say to play it endlessly or N times.
  • When I say to play an album, it plays the album randomly, I think people like me with some years in his back, used to CDs or vinyls, are more used to listen the album songs in order.
  • When I say “play random music”, it plays the News, not music. It works as expected when I say “play some random music”, though.

Ideas and nice-to-have
As my coding skills are too poor to contribute by coding, I can contribute with a few ideas that can make this skill even more awesome.

  • When I say “previous song” does nothing, it would be nice to tell mycroft “play previous song again”
  • It would be nice to obtain some info of the current song. On Mark II/Desktop Mycroft instances they will show this information on the screen, even on the Mark I the info could be displayed on its LED screen. But telling something like “what song is playing” and let mycroft speak the title and album, or “what is this artist”/“who is playing this song” would be awesome for people like me who has hundreds of albums and many of them listened a handful of times to recognize even the artist.
  • Support for multiple libraries and shared libraries. As a hardcore plex user, I have a premium account and have multiple users in my home, so my stuff doesn’t mess with my wife’s one, but I would like her to listen her music as well. The way I do this is by creating several libraries with my admin account, one for me and one for her, and sharing her library to her account. I have also several libraries from other plex accounts, shared with me. Currently I can just listen my own library, so she cannot listen her music nor I can hear my friend’s libraries.
  • Play best rated artist/albums. In plex, you can rate from 1 to 5 stars the song, the album or the artist. It would be great to say “play the best rated songs”, “play best rated albums” or “play best rated artists” so you can listen what you like most.
  • Rate current song, album or artist from 1 to 5 stars
  • Play by mood. In plex, you can set the “mood” of a track, album or artist. So you can listen music by tags.
  • Add tag to current track, album or artist with "set mood to this song|album|artist to <tag>"

In general, I’m quite impressed how well and fast this skill works. I HATE cloud services where I cannot find almost any artist I listen (the genres I listen are very underground) and I have to buy all the discs by myself, so I refuse to pay for a streaming service which can offer a poor selection of artists and I also hate not owning my own content.

Very, very good job. I’m going to use this skill as everyday skill.
Thank you very much!

I went to dinner and see a tv show for a while, and when I’ve return, it seems it doesn’t work now, I’ve refreshed the library and that’s the output

done loading library
 01:11:06.854 | INFO     | 147787 | mesh-skill:send_MQTT:224 | MQTT: Mycroft/RemoteDevices/c8600098ed99/response, "we are ready to go"
 01:11:06.854 | INFO     | 147787 | mesh-skill:send_MQTT:226 | address: 192.168.1.100, Port: 1883
 01:11:06.856 | INFO     | 147787 | mesh-skill:handle_speak:206 | Response Location Length: 0
 01:11:12.253 | INFO     | 147787 | mesh-skill:send_MQTT:224 | MQTT: Mycroft/RemoteDevices/c8600098ed99/request, "play clouds"
 01:11:12.254 | INFO     | 147787 | mesh-skill:send_MQTT:226 | address: 192.168.1.100, Port: 1883
 01:11:12.869 | INFO     | 147787 | Playback Control Skill | Resolving Player for: clouds
 01:11:12.870 | INFO     | 147787 | mycroft.util:wait_while_speaking:58 | mycroft.utils.wait_while_speaking() is depreciated, use mycroft.audio.wait_while_speaking() instead.
 01:11:12.871 | INFO     | 147787 | mesh-skill:send_MQTT:224 | MQTT: Mycroft/RemoteDevices/c8600098ed99/response, "Give me a moment to check for that"
 01:11:12.872 | INFO     | 147787 | mesh-skill:send_MQTT:226 | address: 192.168.1.100, Port: 1883
 01:11:12.874 | INFO     | 147787 | mesh-skill:handle_speak:206 | Response Location Length: 0
Removing event mycroft-playback-control.mycroftai:PlayQueryTimeout
 Plex Music skill
    Title      Closer  67.000000
    Artist     Clouds  100
    Album      Melancholy clouds  52
    Playlist   Gothic playlist  29
    by Search  Dor by Clouds  63

Removing event mycroft-playback-control.mycroftai:PlayQueryTimeout
Removing event mycroft-playback-control.mycroftai:PlayQueryTimeout
 01:11:19.215 | INFO     | 147787 | Playback Control Skill | Playing with: plexmusic-skill.colla69
 01:11:19.263 | INFO     | 147787 | Mark2 | Cancelling Idle screen
Removing event mycroft-mark-2.mycroftai:IdleCheck
 01:11:19.484 | INFO     | 147787 | mycroft.audio.services.vlc:stop:79 | VLCService Stop
 01:11:19.684 | INFO     | 147787 | Playback Control Skill | Audio service status: {}
 01:11:21.491 | INFO     | 147787 | mesh-skill:send_MQTT:224 | MQTT: Mycroft/RemoteDevices/c8600098ed99/response, "a playback error occurred"
 01:11:21.493 | INFO     | 147787 | mesh-skill:send_MQTT:226 | address: 192.168.1.100, Port: 1883
 01:11:21.493 | INFO     | 147787 | mesh-skill:send_MQTT:224 | MQTT: Mycroft/RemoteDevices/c8600098ed99/response, "sorry"
 01:11:21.495 | INFO     | 147787 | mesh-skill:send_MQTT:226 | address: 192.168.1.100, Port: 1883
 01:11:21.499 | INFO     | 147787 | mesh-skill:handle_speak:206 | Response Location Length: 0
 01:11:21.499 | INFO     | 147787 | mesh-skill:handle_speak:206 | Response Location Length: 0

as you can see it says a playback error occurred, sorry

EDITED: by restarting mycroft services the skill went back to life. Let’s see if that happens again

That kind of error “playback error” comes directly out of the VLC Backend.
sadly I have no idea when and why… anyways it normally works on a second call…
if it is in fact reproducible on a single title, then it means there’s some problem with the saved link…
moving music in PMS without “reload library” could also bring your links out of sync.

i am still thinking how to get a fast cache working … but i don’t see that happening anytime soon

Hey @malevolent,
I really appreciate you taking the time to write your impresssions.
That really helps a lot.

To explain the function of the skill further, i need to tell you that it always gets a
“list of content” to play back.
I gave it some thought and, at the time I came up with the following answers/questions:
(thinking about the usability of a feature-complete all-around music-player only using voice commands was not as easy as I would have expected, especially without a visual support)

  • The single song playing more than one Title is a “feature” as you can ask for a title
    and get more than a single result (covers, live & concert versions… )

  • The Randmization of the album is also intended by I understand how you feel.
    I never had anybody else using the skill so it simply randomizes any search result.
    Would you prefer to have a “shuffle mode” that you put on an off,
    or would you rather say “hey mycroft, play randomized AlbumName” or something else… I personally couldn’t decide how i want to use it and postponed developement.

  • about the “previous song” not working right, no idea … need to look into that ^^

  • you can ask what song is playing by saying one of the following
    music info |
    music information |
    what are you playing |
    what is this |
    what is this song

  • i started working the screen features … i stopped as i couldn’t programmatically decide where to play my music … since the GUI as i remember it … almost a year ago had it’s own player built in …
    and i had to use the vlc backend from the skill OR the GUI player… and there was no way to ask the framework if a GUI is active … I should simply give it another try when i have time… using the screen as a support to voice is a lot of help :slight_smile:

  • multiple libraries is something i never thought of as i am the only “friend with data to share” ^^ i think it’s a good idea… with a followup question… i would simply configure multiple comma separated names … and load more than one library… the question at this point is … do you activate a library ? (hey myc,Activate music library LibraryName) or just mix it all together in one searchable library …? I think “hey myc, play song by Artist from LibraryName” starts to get ridicolously long for a spoken query…

  • i had no idea we have moods in plex … I honestly implemented the “add to playlist” with that specific intention… i have playlists like “energy” or “relaxing” … i will definitely look into that as i am highly interested in using the feature

  • i personally don’t use ratings … but the whole backend to it is already there … so it would simply need the implementation through voice…

And I totally feel your pain about music and contents… let me know if you want some of the changes prioritized …
it will take some time but i am happy to help :slight_smile:

and thanks again, you giving me feedback mmotivated me quite a lot :wink:

Hi there @colla69!

You don’t need to thank anything, I’m the one who is grateful and enjoying your skill :wink: , I hope more users would feedback you about your skill, I even thought to announce it on plex forums, as many of their users are linux users and I would bet they would be as excited as I am. Besides, perhaps it would bring even more users to this community :slight_smile:

I expect from a voice-only music player has its limitations, but after testing other music skills, I must admit, this is from far what works the best. So keep doing the good job!! And regarding the GUI, I’ve just realized that your skill already has one!!

Yes, I know. I can search for an Album, Live concert and others and it will play the entire record, is just when I specifically ask for a single song when this behavior happened. I’ll do more tests and report back.

IMO, I think when a user ask for an album, it should play the album in sequential order, unless he or she says “shuffle this album” when playing or "play randomized|shuffled AlbumName"when invoking the skill.
It should be fine, though, to listen random songs when you ask for an Artist, as you didn’t ask for an explicit album name. I guess playing entire discography sequentially, in chronological order could be fine and a cool feature for some users, and thus you could ask for “play next album”. I like the idea, but I admit it would add more complexity.

Nice! Sometimes I like so much a song I would like to hear it more than once in a row!

I just tested this, and Mycroft didn’t speak anything, so I fired up the plasma widget and… tadaaa, the info was just there! I need to extensively test it, because I ask for the weather and asked back for the info, and it seemed to me that “music info” didn’t work, but “what are you playing” did. As I say, I’ll do more tests.

Multiple libraries could be activated on the configuration delimited with commas as you suggested. Bearing in mind Library names can have blank spaces in the name. I can share my music libraries (I don’t think my tvshows or movies, most of them only in spanish, will be of interest for you) with you if you need to do some tests with shared libraries. Regarding invoking one or other library… I would do like plex does: you don’t need to specify any library name, it searches in all libraries, local and remote, son I guess API will do the same. If there is a match in multiple libraries, local and remote, play local first.

I don’t use mood either, but surely there are people out there tagging all their music. I find tagging more flexible than creating lists.

I rate exclusively the songs I really like the most, but I certainly use rating a lot more if I could do it via voice, as usually I listen my music when working, and stopping what I’m doing, going to the browser, search the tab where plex is living, and clicking on the rating star will slow down my productivity. Telling mycroft to set X stars to the current song will help me to have my library more tidy. And that also applies to the tagging feature.

So, glad to hear you are motivated to work in this skill and add more cool features!!

I’ve just realized of another cool feature: “play on X device”.
Plex can reach chromecast and another plex clients on the network, so I can “send” it to wherever I want. (That can be useful as well for a future "PlexTV-Skill :wink: )

@malevolent, have you found any documentation on the chromecast integration with Mycroft? I am interested in extending my kodi skill to include an option for chromecast but aside from the splattering of references in the forum I have not seen any formal documentation on chromecast support. Maybe @gez-mycroft can assist with this?

Chromecast’s support is very tricky, as G has even removed support from Chromium since a year or so, plex found a workaround to send media to Chromecast https://support.plex.tv/articles/201206866-cast-from-browser-or-desktop/ but is not plex-native (years ago, when chromecast was more open, you just had to click on the stream button inside the plex app, but now it seems the entire casting solution to Chromecast must be done via Cast menu on Chrome Browser)

There was another kodi app, if I recall correctly, Prime Video, Disney+ or Netflix addon for kodi, one of those, had to install some kind of Chrome browser bundle or SDK (a huge set of files of 2GB or so) in order to work. Is just a guess, but perhaps with this, you can make kodi to behave like a Chrome browser with Chromecast support…

Well, this skill stopped working, my bet is that is not compatible with Common Play

Hi Colla69 aka Andrea

I’m quite new to Mycrof and discovered your skill. It appears you’ve done some great work on this Skill. I notice it’s not in the MarketPlace. Is the project still active/working. Are you maintaining the code? I’d like to give it a Spin.

Cheers

TLDR; @danboysk
Have fun with it, and let me know how it goes :wink:

Hey @danboysk

please feel free to use my code as you wish. I will accept MRs an review them.
Or if you decide to make your own, i would appreciate a link to see what was born out of it. :slight_smile:

The skill is not in the marketplace because of the underwhelming quality of my own work. Adding the fact that I also never came around to write tests for it.

So i am not maintaining the code at the moment, as i couldn’t find time to implement and test the features i wanted and the mycroft framework was still missing some features i would have needed to get my concept working.
I also was planning to work with python to better my skills,
but could only find java jobs, so i had to move my focus away for python :frowning:

Have a great day :slight_smile:

1 Like