Lovelace: Chromecast Radio Jukebox

Hi Giovanni,

I created an automation to turn the radio on with a single zigbee button press, but would like to be able to toggle it on or off instead.

Would it be possible?

Thanks

The icons are only used in the Media Browser panel in home assistant, not in the card. I wanted to add them but not sure about the design / UI.

HACS sounds interesting too.

Will put both on the backlog.

Toggle is interesting. Should be pretty easy to add.

I think that you can hack it through an automation in the mean time. Make an automation to turn on conditional on the radio not playing. Another one to turn off conditional on a radio playing. You can stop playback by just stopping the media player.

I use this ā€˜conditionā€™ to sense that my chrome cast is playing, the exact condition may be different if you use a different media player:

Hi Giovanni,

Can you give an example of the use of the icon entry? Where should it be saved and where will it be shown?

And as someone pointed out on github, the logs shows this message regarding netradio:

No ā€˜versionā€™ key in the manifest file for custom integration ā€˜netradioā€™. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of ā€˜netradioā€™

Thanks

Ok added the version key to the github repository.

The Icon works like this. However it is only visible in the media browser. I havenā€™t yet implemented it in the lovelace card.

netradio:
  radios: 
    - url: 'http://streams.greenhost.nl:8080/jazz'
      name: Concertzender Jazz
    - url: 'http://icestreaming.rai.it/5.mp3'
      name: RAI Radio Classica
      icon: 'https://cdn-profiles.tunein.com/s17167/images/logoq.png?t=153677'

Actually, @oguime Iā€™ve implemented the icons inside the Lovelace card, so you should try the new code.

Thanks @g.iac!

This looks really good. Iā€™m about to set it up. Any plans to put it in HACS?

Thatā€™s a good idea, didnā€™t do it because I am quite short on time. If you have time to do it, please let me know.

I was actually hoping to make it part of the standard home assistant distribution.

Hi g.iac,
the icons do not work.
I replaced all files from github.

image

Try clearing Web Browsing Data on your web browser and let me know if it works.

Starting about 2021.10, the buttons no longer display in the jukebox. This happened to all of my custom cards, making me think HA changed the way buttons need to be displayed. Most of my other custom cards updated, causing the buttons to reappear. Iā€™m researching what changes need to be made in the code to redisplay buttons. In the meantime, does anyone else know how to fix this? Reloading HA, clearing cache, updating HA didnā€™t help.

jukebox

I opened an issue here. Closing in on the fix, but Iā€™m not smart enough on JS to make it happen. Any ideas?

Thanks for improving this card. I canā€™t believe we donā€™t have like a really nice looking pro radio card part of Home assistant. Anyway. I do have a sonos and itā€™s not working right now. My google nest works fine but not the sonos. When I select it and select a station, I get "Failed to call service media_player/play_media. Error calling SonosMediaPlayerEntity.play_media on media_player.livingroom_sonos: UPnP Error 714 received: Illegal MIME-Type from 192.168.1.251

That IP is my Sonos IP. Sonos plays my Spotify integration fine (from Home assistant)

Also, where could I edit your code to make the icons bigger? Right now they are tiny. And delete the volume fader? I donā€™t need it as I have a mini media player right above the card.
Thanks for your help and your work.

One more question. Would it be possible to have the radio always startup at a specific volume?

Try downloading again the netradio plugin. I changed code to better support sonos

1 Like

For the icons size and removing the volume slider, check the javascript file. It should have all the details for the ui in there.

1 Like

just installed: fabulous

now if only there was a way to incorporate this in automations. I get home and my favorite radio station streams in the house.

Cool Thanks
Github still says latest changes 8 days ago so Iā€™m guessing it didnā€™t propagate yet.

I think I found the icon size which was 32. Trying 64.
Iā€™m not good enough as java to find where to turn off slider and stop button. :man_shrugging:t3:
I know sono is hard to support. thanks for trying