SOCO: I can't access Google Play Music

SOCO: I can't access Google Play Music
0

#1

Hello-
This is not about one of the challenges, just a side project I’ve been working on.
I’m trying to control a SONOS speaker with a Wiimote using a raspberry pi as the controlling device. I’ve been wondering how to start playing music from Google Play Music. When I try:

print(MusicService.get_subscribed_services_names())

it gives me a blank list [], and when I try

playmusic = MusicService('google play music')

it gives me this error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/soco/music_services/music_service.py", line 329, in __init__
    data = self.get_data_for_name(service_name)
  File "/usr/local/lib/python2.7/dist-packages/soco/music_services/music_service.py", line 502, in get_data_for_name
    "Unknown music service: '%s'" % service_name)
soco.exceptions.MusicServiceException: Unknown music service: 'google play music'
>>> playmusic = MusicService('Google Play Music')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/soco/music_services/music_service.py", line 351, in __init__
    "No account found for service: '%s'" % service_name)
soco.exceptions.MusicServiceException: No account found for service: 'Google Play Music'

For some reason SoCo doesn’t know I’m subscribed.
I know I’m subscribed because on my phone I can access my music.

I tried these links but they didn’t seem to help much.
http://docs.python-soco.com/en/latest/api/soco.music_services.music_service.html

Any help is appreciated! Thanks!


#2

Surely you saw this warning on the project’s Github page, right?

Sonos has changed the way music service account information is available. This means that currently a group of music service will give authentication issues and cannot be used at all. Known members of this group are: Google Play Music, Apple Music, Amazon Music, Spotify and Napster.

Maybe this isn’t relevant, but I don’t know anything about this project or what you’ve tried so far. If I had to guess, though, I’d say it’s not going to work and there’s nothing you can do about it.


#3

Hmm… I must have overlooked that. Well, thanks for the help.