svrooij / sonos2mqtt

:speaker: Sonos mqtt controller. Control your speakers from your mqtt server. mqtt-smarthome insprired.
https://sonos2mqtt.svrooij.io/
MIT License
76 stars 18 forks source link

UPnPError when executing speak while streaming TuneIn-station #70

Closed besynnerlig closed 4 years ago

besynnerlig commented 4 years ago

Running the latest version of sonos2mqtt (v2.0.10) in Docker and whenever I publish a MQTT message to sonos/set/MYDEVICE/speak , the message gets spoken but my Sonos speaker won't resume playing whatever Tune-in station they were playing. Sonos2mqtt throws the following error message:

<error> Error executing speak for MYDEVICENAME {"Action":"SetAVTransportURI","FaultCode":"s:Client","Fault":"UPnPError","UpnpErrorCode":402,"name":"SonosError"}

I'm not sure if it's relevant but I have also tried running docker with the --network host flag. Unfortunately thats yielding the same error.

The above error is only when streaming from a TuneIn-station.

However when playing an Album or when playing a Spotify playlist there are other issues: Most times the spoken message fails and is replaced with a very short period of silence. (Timing issue?) (In my Sonos app I can see the message clip name showing up briefly) Sometimes the message gets spoken correctly. Playing is always resumed. Please advise me if you would you like me to submit a separate issue for that.

svrooij commented 4 years ago

This isn’t just an issue with the sonos2mqtt app. This is an issue in the node-sonos-ts library.

Anyway I’ll have a look at it tomorrow. Guessing it has something to do with the metadata.

According to the specs page 86, the error code 402 means invalid arguments.

svrooij commented 4 years ago

You were right, the issue is fixed here will be released tomorrow.

Can you test it out tomorrow? If the second issue still exists in that new version, can you create a new issue?

besynnerlig commented 4 years ago

Thanks a lot. I will check it out tomorrow and let you know the results.

svrooij commented 4 years ago

:tada: This issue has been resolved in version 2.0.11 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

besynnerlig commented 4 years ago

Great work @svrooij

I can confirm that the error message has now disappeared and that the TuneIn stream resumes after a message has been spoken.

Thank You!