node-sonos-http-api
node-sonos-http-api copied to clipboard
Resume Playback doesn't work after TTS if played from Spotify app
Using latest build from main branch
When initiating Spotify playlist from Sonos app after TTS playlist resumes. When you use Spotify app (Sonos Connect) then it is not resuming playlist error is
{"status":"error","error":"Got status 500 when invoking /MediaRenderer/AVTransport/Control","stack":"[object Object]\n at Object.invoke (/home/pi/node-sonos-http-api/node_modules/sonos-discovery/lib/helpers/soap.js:95:10)\n at Player.setAVTransport (/home/pi/node-sonos-http-api/node_modules/sonos-discovery/lib/models/Player.js:707:15)\n at promise.then (/home/pi/node-sonos-http-api/node_modules/sonos-discovery/lib/prototypes/SonosSystem/applyPreset.js:128:46)\n at process._tickDomainCallback (internal/process/next_tick.js:135:7)"}
I'm having the same issue, on main branch docker build.
{
"status": "error",
"error": "Got status 500 when invoking /MediaRenderer/AVTransport/Control",
"stack": "Error\n at Object.invoke (/app/node_modules/sonos-discovery/lib/helpers/soap.js:95:10)\n at Player.setAVTransport (/app/node_modules/sonos-discovery/lib/models/Player.js:707:15)\n at promise.then (/app/node_modules/sonos-discovery/lib/prototypes/SonosSystem/applyPreset.js:128:46)\n at process._tickDomainCallback (internal/process/next_tick.js:135:7)"
}
Yeah, this is a known issue. The player looses its reference to the source when switching to another source when using Spotify direct. Not sure how to solve it, the best approach would be if the sonos system could always remember the latest selected source but that requires firmware changes from Sonos.
Send a feature request to Sonos... more we cannot do. Would it be possible with current api to issue a command before to see what it is doing and after TTS to get it to play again?
With Spotify direct there is no notion of what it's playing nor what the queue is, just a uri that is useless once you switch source.
For multiplayer TTS it would be possible to use a secondary player to do the announcement, but for single player it is impossible.
The problem with feature requests of this sort to sonos is that they don't really reach the right people it seems.
On 10 Jul 2017 21:54, "djanssen1" [email protected] wrote:
Send a feature request to Sonos... more we cannot do. Would it be possible with current api to issue a command before to see what it is doing and after TTS to get it to play again?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jishi/node-sonos-http-api/issues/531#issuecomment-314216468, or mute the thread https://github.com/notifications/unsubscribe-auth/ADBNI87T-FWLvvB0hPQeNXs4qfPknmjgks5sMoFegaJpZM4OSFzV .
For me it does not resume the music after TTS even if I play via the Sonos app. Is there any specific settings I need to set?
Hello, I'm sorry to say that resuming after TTS is still not working for me. After using "say" I can see in the Sonos app that the link to the autogenerated mp3 (in my case google tts) replaced my previous queuelist. It doesn't matter if I'm listening to Spotify or Google Music, it's the same behavior. Is there a way to "snapshot" a single sonos device and inject this snapshot again later?
H Jishii, i have the same problem with 'clip' I think the same issue as 'say' Is there a way to solve this? When loading Spotify playlist via http api there is no problem. When loading via Sonos app the playback doesn't resume after a clip, in my case play a wav file command. Thanks in advance.
@Home-Control9000 Hi, yes, the clip and say works the same way. Reason for Spotify Direct having this problem is that once I switch over from Spotify Direct playback, it seems to lost track of the actual source and queue (and position) and it's not restorable, since it is could controlled. Haven't found a way around that. Not sure if it is solvable tbh.
Hi Jimmy,
I have a idea, does this work?
Before doing a clip or say:
-
Check actual playlist and save it to a temporary playlist
-
Save the currently track which is playing and the playposition.
-
Do the clip or say.
-
Restore the temporary playlist and load the stored track which was playing and go to the saved playposition.
Best regards,
Walter
Jimmy Shimizu schreef op 2018-10-08 11:29:
@Home-Control9000 [1] Hi, yes, the clip and say works the same way. Reason for Spotify Direct having this problem is that once I switch over from Spotify Direct playback, it seems to lost track of the actual source and queue (and position) and it's not restorable, since it is could controlled. Haven't found a way around that. Not sure if it is solvable tbh.
-- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub [2], or mute the thread [3].
Links:
[1] https://github.com/Home-Control9000 [2] https://github.com/jishi/node-sonos-http-api/issues/531#issuecomment-427771906 [3] https://github.com/notifications/unsubscribe-auth/ARv8CM16GRMaYZnIKvEDqj6je4g2tktkks5uixsXgaJpZM4OSFzV
@Home-Control9000 Yes, that is what it does for sources that actually have a playlist, but the Spotify Direct playback has a cloud-controlled "playlist" which I can't read, nor store, nor resume. Hence the problem.
I have one other theory I need to test, but I'm not very hopeful it's fixable unless Sonos/Spotify gives us the possibility to restore the cloud playlist.
Hi Jimmy,
Thanks for your response. Then the solution is, not use the Spotify app and only use the Sonos app. Thats ok for me.
Im using the 'clip' command to do homeautomation notifications. This is working really well. Unfortunally i have 1 issue.
When sending a second 'clip' command while the first one is playing the second clip prompt is played after the first one is finished. Thats ok but when the second one is finished the track is never resumed. Playlist is reloaded but the track is paused. Is it possible to change this?
Best regards,
Walter
Jimmy Shimizu schreef op 2018-10-10 15:00:
@Home-Control9000 [1] Yes, that is what it does for sources that actually have a playlist, but the Spotify Direct playback has a cloud-controlled "playlist" which I can't read, nor store, nor resume. Hence the problem.
I have one other theory I need to test, but I'm not very hopeful it's fixable unless Sonos/Spotify gives us the possibility to restore the cloud playlist.
-- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub [2], or mute the thread [3].
Links:
[1] https://github.com/Home-Control9000 [2] https://github.com/jishi/node-sonos-http-api/issues/531#issuecomment-428561731 [3] https://github.com/notifications/unsubscribe-auth/ARv8CKFiuXYXO952QqyullqZ9mrrKgrEks5uje9cgaJpZM4OSFzV
Hi, This functionality is working with sonos4Loxone. SPotify connect resumes playing after TTS. Maybe you can have a look at their solution
Something new here? Seems like its still not working. Doesnt matter if im playing a playlist via spotify or a playlist via sonos app, playing a tts on the sonos does not resume the music... this sucks. Some ideas?
Same question here... Did anything change by now? This would be a great feature!
Thanks for your work on this @jishi !
some news? after clip to play songs again?
It works, It is auto resuming Spotify songs for me. It has been doing it for a little while, and I can't remember when it started working.
@HighTide This isnt working for me. Can you share your versions, config and how you are hitting the tts endpoint?
Unfortunately, it does not work for me either. It makes no difference what I played before. For example, when I play http://192.168.178.4:5005/kitchen/say/Hi this "Hi" is played twice. Unfortunately, the playback does not continue after that. What am I doing wrong?