Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

Understanding "active" devices?

Understanding "active" devices?

Hi developers!

 

I'm trying to run a headless raspberry pi running linux as a spotify player for my 2 year old. The idea is that she can press a hardware button and it starts her playlist (and one more press stops it). 

 

My question is about devices. What constitutes a device? On my development environment I can start playback on an active device but it appears a device is only active when I am running spotify itself, which defeats the whole purpose of the headless one button player I'm building. 

 

How do I programmatically make a device active? This is on a headless linux machine, so it's not like I have spotify or even a web browser running on it. 

 

Reply
3 Replies

Hi adamwfletcher,

You can make an (headless) web app using the Web Playback SDK that runs in a browser on te Pi. This can be controlled through both a Spotify app, and the Spotify Web API.

Hope this helps.

XimzendSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

Would the idea then be to run a headless chrome instance and have that loads spotify, which then creates an active device, and have my daemon use that device? Or just load a web app that by virtue of it being a webapp creates an active device on webapp load?

You can not make the Spotify web app active, but you can make an instance of the Web Playback SDK active.

XimzendSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

Suggested posts

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 4 years ago  in Social & Random