Time triggered radiostream to receiver(marantz sr 6007)

My goal is to let HA startup a radiostream on my receiver everymorning at a specific time.

To do this, i am using an Automation that has the trigger set to a specific time.

The action is media_player.play_media with the target correctly configured ( Marantz sr6007 is showing up in HA, and is controllable via HA).

Target: marantz
Media_content_id: the url of the stream (which directly works if i open it on Any browser).
Media_content_type: Music

This automation does not seem to work; the log states; stopped because internal error.

I have tried to use the “play media” function and then browse the radio station but the UI States that my marantz can not use media browsing.

What am I doing wrong?

Hello, can you share the complete automation (correctly formatted with indentation) and the logs related to the problem ? Thanks…

alias: Radio
description: “”
trigger:

When you copy/paste you should use the “</>” (see above in the bar line of the post/answer you are currently writing) so we have the code with indentation like in HA as indentation is very critical for flawless execution… So based on what you submitted, indentation is not correct but I am sure it is not like this… It should be something like:

  trigger:
    - platform: time
      at: “22:25:00”
  condition: []
  action:
    service: media_player.play_media
    target:
      entity_id: media_player.marantz_sr6007
    data:
      media_content_id: >-
            http://playerservices.streamtheworld.com/api/livestream-redirect/RADIO10.mp3
      media_content_type: music
  mode: single

I’m still struggeling with all the functions here.

The code markup in my automation is exactly the way you presented it.

Maybe an issue on your equipment (Marantz ?) ? Do you have the complete error message coming from home-assistant.log ?


Logger: homeassistant.components.automation.nieuwe_automatisering
Source: components/media_player/__init__.py:762 
Integration: Automatisering (documentation, issues) 
First occurred: 13:38:53 (2 occurrences) 
Last logged: 13:38:53

Radio: Error executing script. Unexpected error for call_service at pos 1:
While executing automation automation.nieuwe_automatisering
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 447, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 680, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1713, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1750, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 676, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 930, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 713, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 766, in async_play_media
    await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 762, in play_media
    raise NotImplementedError()
NotImplementedError



Ok, so I have tried the same automation but used a different device and everything worked fine.

So it clearly had to do something with the device (marantz).

Using the UI to configure the automation, when selecting a device it automatically states that “Media browsing is not available for this device”

I have tried to work around this, by using the code editor and manually change the automation that worked with the different device, and change it to Marantz, it still did not work.

1 Like