Open bhelabhav opened 9 years ago
Same issue here - if i have the sonos desktop app open when i attempt this, an error message appears briefly:
"unable to play TenD2005-07-16t10Wonderboy_64kb.mp3 the file cannot be found"
the url is valid and plays fine in my browser.
did you find a solution?
There was an issue where the song in the example was only available via a redirect, which the Sonos speaker does not support. It should be updated in the examples now.
Can one of you confirm whether this is still an issue.
I'm having a problem I'm trying to debug and scouring around for solutions...
How long does the "File Not Found Error" show in the win32 app?
My issue is that a scheduled play (say a clock) works intermittently. The wav file shows as queued in the win32 app and if I click play in the win32 app it plays.
I'm not sure how to troubleshoot but thought it might be related to this issue?
Hi @bbrendon, is you .wav file local or being pulled off the internet? If local then it is not a re-direct issue, if from the internet then it could be and could explain the intermittent behaviour.
If it plays from the controller (win32 app) then it implies it is something in your code when you make it play. Can you post the code snippet to allow us to help. Cheers David
I'm calling it from Home Assistant so I'm not sure if this is the right place to discuss this. The audio files are local. Same premise as below. Both are intermittent.
Script part
- service: script.sonos_say_no_restore
data_template:
sonos_entity: media_player.kitchen
volume: 0.60
delay: '00:00:05'
message: Good night
Script template
sonos_say_no_restore:
sequence:
- service: media_player.volume_set
data_template:
entity_id: "{{ sonos_entity }}"
volume_level: "{{ volume }}"
- service: tts.google_say
data_template:
entity_id: "{{ sonos_entity }}"
message: '{{ message }}'
- delay: "{{ delay }}"
The problem here is that the Sonos speaker does not try to play the URI before it sends the response. Therefore, the URI will be successfully set as the music source and you will get a 200 SUCCESSFUL response.
However, you might want to subscribe to the player.avTransport
service: If an error occurs, the event variables will include 'transport_status': 'ERROR_NO_RESOURCE'
.
It looks like the response from the Sonos is successful (200), but the song from the uri does not play. The uri is the one in the example in the README.
Here is my code: