Closed didericko closed 3 years ago
In regards to playing a known media URI of a radio station, this should be possible already. Do I therefore assume correctly, that you're referring to support within the Media Browser?
So how do i instruct the entity Room: ['Keuken'] to play a TuneIn radiostation. From the raumfeld app this is very easy, just select the station from my favorites and it plays. But there is no access to the radio stations from the media browser.
You could grab the uri of the station and play it via the method play_media
of the media_player component.
However, I just commited some changes that introduce more comprehensive support of media sources rsp. containers to play in the media browser. It's availabel beginning with 6b58494.
PS: Including TuneIn ;)
Cool!
Thanks for your feature request!
Browsing for a station is nice, but how can is start a specific TuneIn station using the play_media service?
I want my speaker to turn on and play my favorite TTuniIn radio station when i arrive home. I wrote a script that turns on a speaker (using the powerstate service), and would like to add a action to start the radio station (using the play_media service).
What is the best way to do this?
Currently it should work by passing the play_uri
for Content ID
and "object.item.audioItem.audioBroadcast.radio" for Content type
.
The play_uri
you can grab from the logs after playing the radio station manually:
2021-03-11 21:02:36 DEBUG (MainThread) [custom_components.teufel_raumfeld] media_player.py->async_play_media: self._rooms=['Living room'], play_uri=dlna-playsingle://uuid%3A26cf0c06-7bef-4f45-9d1e-6f5e87b37c3a?sid=urn%3Aupnp-org%3AserviceId%3AContentDirectory&iid=0%2FRadioTime%2FCategoryMusic%2Fc-c57951%2Fc-g54%2Fs-s47800
By the way, play_media
should turn on the device before playing, if it is disabled.
With the raumfeld app I can play radio stations using the tune-in service. Can this service be made available through your add-in, would be great!