question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cast to Sonos Devices

See original GitHub issue

Describe the bug A clear and concise description of what the bug is.

  • Using latest version of spotcast
  • I have setup the Spotify integration in Home Assistant (and its working with most Spotify Connect devices)
  • Using latest stable version of Home Assistant
  • I have Spotify Premium

I am not able to cast to my Sonos devices, despite them being listed as Spotify Connect devices. When the service is sent, if i have sprecified a name associated with a Sonos device i get the following error message. Failed to call service spotcast/start. Could not find device with name Sonos Move.

I am aware of the statement about Sonos not being supported in the Spotify API on the offical documentation for Spotify in Home Assistant, so I dont know if this is a bug per say, I just thought that this might have been a workaround for the issue?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
pkampcommented, Jan 12, 2022

This integration works fine with Sonos devices, when you find out their spotify_device_id. Since the Spotify api does not help you in that regard, I managed to find the id via the Spotify Web Player. Try these steps

  • Open the Spotify Web Player and sign in if needed Make sure you see your Sonos devices in the Connect popup
  • Open your browser’s DevTools (F12 for Chrome) Navigate to the Network tab
  • Connect to the desired Sonos device in the Web Player
  • Find the associated request in your DevTools The request URL looks something like this: https://gew1-spclient.spotify.com/connect-state/v1/connect/transfer/from/my_web_player_device_id/to/my_sonos_device_id The my_sonos_device_id is the spotify_device_id you are looking for.

Et voilà - you can call the spotcast.start service with that id. Hope that helps you!

0reactions
fcussoncommented, Jan 13, 2022

@pkamp thank you for the information. That’s great, I was really running in a circle trying to find a solution to get uid. Still not a solution that could be integrated in the project directly but still great.

If you are up for it, you could send a PR with the added information to get the Sonos uid, otherwise, I’ll add in the following weeks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cast to Sonos
This extension allows you to cast your tab to a sonos device. Until now, it has not been possible to stream audio directly...
Read more >
How to cast to Sonos? : r/sonos
Depending on your source, streaming apps allow casting directly to Sonos.
Read more >
Cast from apps on Android?
Sonos doesn't have the ability to go into the Android code, and add a full “cast” feature, that has to be done by...
Read more >
Is It Possible To Use Chromecast to Sonos? (How ...
So, no, you can't try casting Chromecast to Sonos directly and will have to switch to a different brand. While the Chromecast service...
Read more >
Connect your Sonos to Google Home (Mini)
Note: you need a Google Chromecast Audio to connect your Sonos speaker to a Google Home speaker. Connect the Chromecast to your Sonos...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found