Hi everybody,
when I try to play a local file via media_player
on a Sonos Beam
, it will start playback fine, but not play the file until the end. Is there something I need to add to this configuration?
script:
# {{{ Audio
wecksong:
sequence:
# light 1 dark red to medium warm orange
- service: media_player.volume_set
data:
entity_id: media_player.schlafzimmer
volume_level: 0.1
- service: media_player.play_media
data:
entity_id: media_player.schlafzimmer
media_content_type: 'audio/mp4'
media_content_id: 'http://ip:8123/local/audio/morgen.mp3'
# media_content_id: 'http://ip:8123/local/audio/birds.mp3'
# media_content_id: 'http://ip:8123/local/audio/spooky_scary_skeletons.mp3'
- delay:
seconds: 15
- service: media_player.volume_up
entity_id: media_player.schlafzimmer
- delay:
seconds: 15
- service: media_player.volume_up
entity_id: media_player.schlafzimmer
- delay:
seconds: 15
- service: media_player.volume_up
entity_id: media_player.schlafzimmer
- delay:
seconds: 15
- service: media_player.volume_up
entity_id: media_player.schlafzimmer
#}}}
This is part of my morning alarm. It is supposed to start a song at minimum volume, turning volume up every x seconds (15), and just be done when audio playback has finished (implementing snooze/off button is for later).
I have tried this with three different mp3 files so far. Each one can be found on YouTube:
(the reason I link these is so that you can see these files aren’t broken, nor ridiculously long so that my Sonos might not be able to play them)
Since the sonos will start playback, the files are both accessible to it, and the script syntax must be correct (id, type, …). However, the will stop playing after a while. Do I need to add anything after the last media_player.volume_up
to assure that the file will continue to play? Is this a sonos issue? Or do you have another idea what might cause this?
Thanks for your ideas