Hello,
i am trying to control the local MPD instance with home assistant to play a spotify playlist. This is what i tried:
I can start the playback using Mopidy and Moped, so spotify login works and playback works too.
Does realy no one have a clue of what to do here? I just want to mimic what other apps like “moped” proved to be possible, but can not figure out how to do it. Please help me.
This is exactly what i want. But through HAdashboard. I found out it got an input_select option. but it needs to load
{{states.media_player.mpd.attributes.source_list}} . I will look into your option.
Nice finding, thanks for sharing!
Will try that too, looks good! Could you please share your .conf code on how you use it with spotify playlists?
Will also try to use “Music from Sing (by singmovie)” in a Service as source, i always thought you need to use those cryptic playlist IDs. Did you do more than adding the spotify user and those IDs to make that work?
This is a playlist in spotify. It’s the movie soundtrack from Sing
You don’t need to use this if you use the github widgets from gcosta74. You can forget my first post.
Do you have mopidy (MPD) running? If you add this to home assistant the source attribute contains all the playlists from MPD (if you add mopidy-spotify to MPD you have a connection to spotify and the spotify playlists) https://github.com/mopidy/mopidy-spotify
Good point again! I was wondering for some “show your projects” Topics how they controlled spotify so easily. But i am one of those nooby hass.io users, so my options to install are very limited. Do you use the full home assistant, or did you manage to add mopidy-spotify to hass.io?
Hi there, did you ever work this out? I’m in an identical situation, everything works fine i just seem to work out how to use this add-on without manually using the web ui!
Hi,
yes i did! But maybe it is not the best solution.
I Control music now by MQTT, the remotedy app and by that app-deamon interface on a tablet.
It works as following:
mopidy installed on hass.io has spotify credentials in the config. This alone allows the remotedy app to start spotify playlists. We use that app mainly for skipping a song or pausing the music with no other options in reach.
Then there is the complicated part using the REST API of Mopidy. Will post that later if i don’t forget.
I have a script for each playlist to play. That Script uses the REST_COMMAND Service to send which playlist of spotify to play to Mopidy.
This Script now now triggered by app-deamon on a tablet (they have a widget for that) or by an automation, which is triggered by MQTT.
The REST Command of Mopidy is somewhere in their docs under “RPC”, and is very poorly documented in my opinion. Will post my approach when i come home.