Heos Binding - Error while using VoiceManager

Hi Comminty,

i’m using a Denon Home 150 with the current Heos binding and want it to say something over the VoiceManger.

The player is configured as default audio sink. If i run the following javascript to test it, the device plays a random title (i dont know where it come from…).
For some executions the device say the text correctly. I still haven’t figured out why it works sometimes :confused:

voice = Java.type("org.openhab.core.model.script.actions.Voice");
voice.say("Test");

The debug-log shows an error “Unable to play media. Please try again later.”

Complete log:

2021-03-29 13:48:57.352 [DEBUG] [ces.HeosStringPropertyChangeListener] - Firing property change: {"heos": {"command": "event/player_state_changed", "message": "pid=-761513172&state=stop"}} Thread[Thread-785,6,main]
2021-03-29 13:48:57.356 [DEBUG] [eos.internal.api.HeosEventController] - Handling event: HeosEventObject{HeosObject{rawCommand='event/player_state_changed', attributes={pid=-761513172, state=stop}}, command=PLAYER_STATE_CHANGED}
2021-03-29 13:48:57.359 [DEBUG] [ces.HeosStringPropertyChangeListener] - Firing property change: {"heos": {"command": "event/player_queue_changed", "message": "pid=-761513172"}} Thread[Thread-785,6,main]
2021-03-29 13:48:57.361 [DEBUG] [ces.HeosStringPropertyChangeListener] - Firing property change: {"heos": {"command": "event/player_now_playing_changed", "message": "pid=-761513172"}} Thread[Thread-785,6,main]
2021-03-29 13:48:57.364 [DEBUG] [eos.internal.api.HeosEventController] - Handling event: HeosEventObject{HeosObject{rawCommand='event/player_queue_changed', attributes={pid=-761513172}}, command=PLAYER_QUEUE_CHANGED}
2021-03-29 13:48:57.368 [DEBUG] [eos.internal.api.HeosEventController] - Handling event: HeosEventObject{HeosObject{rawCommand='event/player_now_playing_changed', attributes={pid=-761513172}}, command=PLAYER_NOW_PLAYING_CHANGED}
2021-03-29 13:48:57.429 [DEBUG] [ces.HeosStringPropertyChangeListener] - Firing property change: {"heos": {"command": "event/player_playback_error", "message": "pid=-761513172&error=Unable to play media. Please try again later."}} Thread[Thread-785,6,main]
2021-03-29 13:48:57.432 [DEBUG] [eos.internal.api.HeosEventController] - Handling event: HeosEventObject{HeosObject{rawCommand='event/player_playback_error', attributes={pid=-761513172, error=Unable to play media. Please try again later.}}, command=PLAYER_PLAYBACK_ERROR}
2021-03-29 13:48:57.800 [DEBUG] [ces.HeosStringPropertyChangeListener] - Firing property change: {"heos": {"command": "event/player_now_playing_changed", "message": "pid=-761513172"}} Thread[Thread-785,6,main]
2021-03-29 13:48:57.802 [DEBUG] [eos.internal.api.HeosEventController] - Handling event: HeosEventObject{HeosObject{rawCommand='event/player_now_playing_changed', attributes={pid=-761513172}}, command=PLAYER_NOW_PLAYING_CHANGED}
2021-03-29 13:48:57.805 [DEBUG] [nternal.handler.HeosThingBaseHandler] - Received updated media state: Media{type='song', song='Url Stream', station='null', album='Url Stream', artist='Url Stream', imageUrl='', albumId='1', mediaId='1', queueId=1, sourceId=1024}
2021-03-29 13:48:59.196 [DEBUG] [ces.HeosStringPropertyChangeListener] - Firing property change: {"heos": {"command": "event/player_playback_error", "message": "pid=-761513172&error=Unable to play media. Please try again later."}} Thread[Thread-785,6,main]
2021-03-29 13:48:59.200 [DEBUG] [eos.internal.api.HeosEventController] - Handling event: HeosEventObject{HeosObject{rawCommand='event/player_playback_error', attributes={pid=-761513172, error=Unable to play media. Please try again later.}}, command=PLAYER_PLAYBACK_ERROR}
2021-03-29 13:49:01.048 [DEBUG] [ces.HeosStringPropertyChangeListener] - Firing property change: {"heos": {"command": "event/player_state_changed", "message": "pid=-761513172&state=play"}} Thread[Thread-785,6,main]
2021-03-29 13:49:01.051 [DEBUG] [eos.internal.api.HeosEventController] - Handling event: HeosEventObject{HeosObject{rawCommand='event/player_state_changed', attributes={pid=-761513172, state=play}}, command=PLAYER_STATE_CHANGED}
2021-03-29 13:49:01.555 [DEBUG] [ces.HeosStringPropertyChangeListener] - Firing property change: {"heos": {"command": "event/player_now_playing_changed", "message": "pid=-761513172"}} Thread[Thread-785,6,main]
2021-03-29 13:49:01.559 [DEBUG] [eos.internal.api.HeosEventController] - Handling event: HeosEventObject{HeosObject{rawCommand='event/player_now_playing_changed', attributes={pid=-761513172}}, command=PLAYER_NOW_PLAYING_CHANGED}
2021-03-29 13:49:01.559 [DEBUG] [ces.HeosStringPropertyChangeListener] - Firing property change: {"heos": {"command": "event/player_now_playing_progress", "message": "pid=-761513172&cur_pos=0&duration=6435000"}} Thread[Thread-785,6,main]
2021-03-29 13:49:01.564 [DEBUG] [nternal.handler.HeosThingBaseHandler] - Received updated media state: Media{type='song', song='Tha BoomHaus - 03 mars 2020 (1h, 47m)', station='null', album='', artist='4 Mar 2020', imageUrl='http://cdn-profiles.tunein.com/p1242659/images/logoq.png', albumId='', mediaId='http://opml.radiotime.com/Tune.ashx?id=t139443755&sid=p1242659&formats=aac,mp3,wma,hls&partnerId=hDPtcjC8&serial=d8d578ba-93d6-40a0-b7ae-245b31974f12', queueId=12, sourceId=3}2021-03-29 13:49:01.737 [DEBUG] [eos.internal.api.HeosEventController] - Handling event: HeosEventObject{HeosObject{rawCommand='event/player_now_playing_progress', attributes={duration=6435000, cur_pos=0, pid=-761513172}}, command=PLAYER_NOW_PLAYING_PROGRESS}
2021-03-29 13:49:02.122 [DEBUG] [ces.HeosStringPropertyChangeListener] - Firing property change: {"heos": {"command": "event/player_now_playing_changed", "message": "pid=-761513172"}} Thread[Thread-785,6,main]
2021-03-29 13:49:02.124 [DEBUG] [ces.HeosStringPropertyChangeListener] - Firing property change: {"heos": {"command": "event/player_now_playing_progress", "message": "pid=-761513172&cur_pos=0&duration=6435000"}} Thread[Thread-785,6,main]
2021-03-29 13:49:02.125 [DEBUG] [eos.internal.api.HeosEventController] - Handling event: HeosEventObject{HeosObject{rawCommand='event/player_now_playing_changed', attributes={pid=-761513172}}, command=PLAYER_NOW_PLAYING_CHANGED}
2021-03-29 13:49:02.130 [DEBUG] [nternal.handler.HeosThingBaseHandler] - Received updated media state: Media{type='song', song='Tha BoomHaus - 03 mars 2020 (1h, 47m)', station='null', album='', artist='4 Mar 2020', imageUrl='http://cdn-profiles.tunein.com/p1242659/images/logoq.png', albumId='1', mediaId='http://opml.radiotime.com/Tune.ashx?id=t139443755&sid=p1242659&formats=aac,mp3,wma,hls&partnerId=hDPtcjC8&serial=d8d578ba-93d6-40a0-b7ae-245b31974f12', queueId=12, sourceId=3}
2021-03-29 13:49:02.174 [DEBUG] [eos.internal.api.HeosEventController] - Handling event: HeosEventObject{HeosObject{rawCommand='event/player_now_playing_progress', attributes={duration=6435000, cur_pos=0, pid=-761513172}}, command=PLAYER_NOW_PLAYING_PROGRESS}
2021-03-29 13:49:05.002 [DEBUG] [ces.HeosStringPropertyChangeListener] - Firing property change: {"heos": {"command": "event/player_now_playing_progress", "message": "pid=-761513172&cur_pos=3000&duration=6435000"}} Thread[Thread-785,6,main]2021-03-29 13:49:05.006 [DEBUG] [eos.internal.api.HeosEventController] - Handling event: HeosEventObject{HeosObject{rawCommand='event/player_now_playing_progress', attributes={duration=6435000, cur_pos=3000, pid=-761513172}}, command=PLAYER_NOW_PLAYING_PROGRESS}
2021-03-29 13:49:09.999 [DEBUG] [ces.HeosStringPropertyChangeListener] - Firing property change: {"heos": {"command": "event/player_now_playing_progress", "message": "pid=-761513172&cur_pos=8000&duration=6435000"}} Thread[Thread-785,6,main]2021-03-29 13:49:10.002 [DEBUG] [eos.internal.api.HeosEventController] - Handling event: HeosEventObject{HeosObject{rawCommand='event/player_now_playing_progress', attributes={duration=6435000, cur_pos=8000, pid=-761513172}}, command=PLAYER_NOW_PLAYING_PROGRESS}
2021-03-29 13:49:12.163 [DEBUG] [ces.HeosStringPropertyChangeListener] - Firing property change: {"heos": {"command": "event/player_state_changed", "message": "pid=-761513172&state=pause"}} Thread[Thread-785,6,main]
2021-03-29 13:49:12.168 [DEBUG] [eos.internal.api.HeosEventController] - Handling event: HeosEventObject{HeosObject{rawCommand='event/player_state_changed', attributes={pid=-761513172, state=pause}}, command=PLAYER_STATE_CHANGED}
2021-03-29 13:49:14.999 [DEBUG] [ces.HeosStringPropertyChangeListener] - Firing property change: {"heos": {"command": "event/player_now_playing_progress", "message": "pid=-761513172&cur_pos=10000&duration=6435000"}} Thread[Thread-785,6,main]
2021-03-29 13:49:15.003 [DEBUG] [eos.internal.api.HeosEventController] - Handling event: HeosEventObject{HeosObject{rawCommand='event/player_now_playing_progress', attributes={duration=6435000, cur_pos=10000, pid=-761513172}}, command=PLAYER_NOW_PLAYING_PROGRESS}

The problem occurs if something is in the queue for the player. If i clear the queue before executing the
the voice command every thing is working correctly. Besides that the queue is lost… :roll_eyes:

Is there a way to force the url playback without loosing the queue?
Maybe there is another solution. I am open for suggestions :smiley:

Kind regards,
schnep

1 Like

I am not even able to get this working after clearing the queue. I get the "“Unable to play media. Please try again later.” everytime.