homeassistantcomponent_spotifyplus: Error Switching Spotify Player to Sonos

System Health details

SpotifyPlus
integration_version v1.0.94
clients_configured 1: Matt (premium)
api_endpoint_reachable ok

Checklist

  • I have enabled SmartInspect debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of any previous issues…

Describe the issue

From the SpotifyPlus Card, I have a track playing on my local Windows PC, I select Devices, which provide a list of available devices - happens to be 6.

Some devices work, others don’t

Room 1 - Sonos One - fails Room 2 - Sonos One - fails Room 3 - Sonos One - fails Room 4 - Sonos Play 5 - fails Room 5 - Sonos Play 3 (original) - works Room 6 - Windows PC - works

The error I receive is the following

Failed to perform the action media_player/select_source. Validation error: SAM0001E - An unhandled exception occured while processing method “PlayerTransferPlayback”. The method or property “play” can only be called/used on the coordinator in a group

This also happens in an automation I am using to transfer playback. This had been working fine.

There are no groups setup in Sonos.

I wonder whether it might be something to do with having both the old and new Sonos in my environment. Rooms 1-4 are all ‘new’ Sonos devices. The Sonos Play 3 is an original one on separate Sonos ‘network’. As this seems to potentially be the pattern with the above?

Transferring all the above using the Spotify app works

IMPORTANT - While testing the above, I noticed if I transferred using the Spotify app on my Windows PC then the SpotifyPlus card shows the state as ‘paused’, but music is still playing. I then pressed play on that card and things resumed. I then tried to switch to other devices that were not working before and they started working fine.

Reproduction steps

As above

Debug logs

Logger: homeassistant.components.automation.spotifyplus_transfer_to_kitchen
Source: components/automation/__init__.py:738
integration: Automation (documentation, issues)
First occurred: 10:58:39 (18 occurrences)
Last logged: 11:44:36

Error while executing automation automation.spotifyplus_transfer_to_kitchen: SAM0001E - An unhandled exception occured while processing method "PlayerTransferPlayback". The method or property "play" can only be called/used on the coordinator in a group

Diagnostics dump

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 24 (13 by maintainers)

Most upvoted comments

So I have factory reset all the S2 devices and it appears to now be working. I know I said that last time too quickly and it wasn’t the case, so have tried restarting Home Assistant a number of times now and not received any issues. I did have to play to the devices in Spotify directly before they were picked up in SpotifyPlus properly but doing that once was sufficient to have them recognised.

Once more, thanks for all your help on this. Seems like my environment was a little screwy for whatever reason, even though it’s been working fine for years. Still, I hope you learnt something from the exercise! 😃

Sent you a DM request on HA community forum. There are no chat features on github.

Yes, they all have the latest firmware.

SmartInspect has been installed and is generating log files. How do you wish me to send this to you?

Hi @thlucas1,

Thanks for your efforts and swift response to this, it’s much appreciated. It wasn’t necessarily an urgent problem but nice to see you provide what appears to be a solution already. I have done some initial testing and I believe the error is no longer occurring. However, this was a cursory check and will continue to keep an eye on it.

Thanks once more and also thanks for the fantastic integration and card 👍