[GH-ISSUE #333] Raspberry Pi playing music from Spotify automatically #192

Closed
opened 2026-02-27 23:21:18 +03:00 by kerem · 3 comments
Owner

Originally created by @CMoore455 on GitHub (Oct 18, 2018).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/333

This is not an issue on this library. I am trying to figure out how to get a Raspberry Pi to play music from Spotify when the user comes home. I have some python code that will let the Raspberry Pi know the user is home, now I just need to the music to play. I am wanting to know if this can be possible in anyway? I have asked this on Stack Overflow, but if you answer on here it is appreciated.

Originally created by @CMoore455 on GitHub (Oct 18, 2018). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/333 This is not an issue on this library. I am trying to figure out how to get a Raspberry Pi to play music from Spotify when the user comes home. I have some python code that will let the Raspberry Pi know the user is home, now I just need to the music to play. I am wanting to know if this can be possible in anyway? I have asked this on Stack Overflow, but if you answer on here it is appreciated.
kerem closed this issue 2026-02-27 23:21:18 +03:00
Author
Owner

@chrisfs commented on GitHub (May 9, 2019):

There's a Python library for Spotify called Spotipy. You can check that out. https://spotipy.readthedocs.io/en/latest/

<!-- gh-comment-id:491080393 --> @chrisfs commented on GitHub (May 9, 2019): There's a Python library for Spotify called Spotipy. You can check that out. https://spotipy.readthedocs.io/en/latest/
Author
Owner

@MaZderMind commented on GitHub (Jan 21, 2020):

I had a similar requirement.
My Pi is running https://github.com/dtcooper/raspotify and thus behaves like a Spotify Connect Speaker.
In my Code I then connect to the Spotify Connect API and find the Device-ID of this instance by Name. With this ID you can now control the Music playing on this Speaker through the Web-API.

The relevant Code is here: github.com/MaZderMind/jukebox@ddeadcd/software/jukebox/spotify.py

<!-- gh-comment-id:576566350 --> @MaZderMind commented on GitHub (Jan 21, 2020): I had a similar requirement. My Pi is running https://github.com/dtcooper/raspotify and thus behaves like a Spotify Connect Speaker. In my Code I then connect to the Spotify Connect API and find the Device-ID of this instance by Name. With this ID you can now control the Music playing on this Speaker through the Web-API. The relevant Code is here: https://github.com/MaZderMind/jukebox/blob/ddeadcd/software/jukebox/spotify.py
Author
Owner

@stephanebruckert commented on GitHub (Jan 21, 2020):

`Nice solution by @MaZderMind!

<!-- gh-comment-id:576923050 --> @stephanebruckert commented on GitHub (Jan 21, 2020): `Nice solution by @MaZderMind!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#192
No description provided.