Last week I posted about my spotify integration suddenly stopping working but thankfully it has now started working again. Now I am trying to get it to work exactly as it should but I keep running into small snag and I’m hoping someone can help me find a solution.
I have an alarm clock automation and as part of that it triggers a spotify script to start playing a playlist on shuffle on my Echo device. It doesn’t always happen but sometimes I get the following error:
HTTP Error for PUT to https://api.spotify.com/v1/me/player/play returned 404 due to Player command failed: No active device found
I am wondering if this happens because the spotify integration or something goes to sleep after a period of inactivity?
My script looks like this
- service: media_player.select_source
data:
entity_id: media_player.spotify_chewitt86
source: "Bedroom Echo"
- service: media_player.play_media
data:
entity_id: media_player.spotify_chewitt86
media_content_type: "playlist"
media_content_id: "spotify:playlist:3nNsZuM4lX04UdgWBiluDa"
- service: media_player.shuffle_set
data:
entity_id: media_player.spotify_chewitt86
shuffle: true
- service: media_player.media_next_track
data:
entity_id: media_player.spotify_chewitt86
Is there a way of say activating/turning on spotify before I then run through the script?