Google mini (local)?

Hello - is there an integration that would allow me locally to play audio through my google minis? I see the google assistant integration but that requires external access and HA cloud.

You don’t need HA Cloud to use the Google Assistant integration.

https://community.home-assistant.io/search?q=cast%20local

I can’t copy and paste an example at the moment but it is possible to play local files to Google Home devices.

I’m guessing you meant to say you don’t need a cloud subscription to connect google assistant to home assistant? The cloud subscription makes it easier, but there is the free manual setup option too.

@repomanz, as Dave said, it’s possible to play local audio from home assistant to your Google home speakers using the cast integration and a media_player.play_media service call:

Here’s an example from my config:

    - service: media_player.play_media
      entity_id: media_player.bedroom_speaker
      data:
        media_content_id: "http://10.0.0.2:8123/local/audio/white_noise.mp3"
        media_content_type: audio/mp3

correct; this was exactly what I was wanting. Thanks everyone.

Is the URL you using a link back to HA server?

Yep, sorry. Fixed my typo

1 Like

Yes it does, but the file you want to play doesn’t necessarily need to be hosted on your home assistant server.

Hi Tediore,

can you tell me where this path resides on the host?
http://10.0.0.2:8123**/local/audio/**white_noise.mp3”

digging around in the console but not finding it easily. I threw some files in a samba share called media but not finding those either.

/config/www is mapped to local/

You have to create that directory though.

Tediore - so I’ve got google cast setup, i got my file setup. I even have the google cast in the lovelace dashboard. When I power off/on or change volume sounds I can hear the audible feedback. However I can’t seem to cast my mp3 file to it.

Here is my automation:

- id: '1599148726435'
  alias: alert_send
  description: send notification when alarm is triggered
  trigger:
  - entity_id: alarm_control_panel.home_alarm
    platform: state
    to: triggered
  condition: []
  action:
  - data:
      message: ALARM! The alarm has been triggered
    service: notify.notify
  - data:
      message: ALARM! The alarm has been triggered
    service: notify.pushover
  - data:
      media_content_id: http://10.180.50.20:8123/local/audio/bigdogbarking.mp3
      media_content_type: audio/mp3
    entity_id: media_player.living_room_speaker
    service: media_player.media_play
  mode: single

Any suggestions here on what to check? I read that the google mini may require my HA to be under https but I was under the impression that may not be the case.

Are you able to access your URL from the browser? You should probably register a domain, and set up HTTPS.

You want the media_player.play_media service. Easy one to mix up honestly.

yes - i can hit this URL (http://10.180.50.20:8123/local/audio/bigdogbarking.mp3) and the audio will play in browser.

Not necessary–you can cast local media over HTTP to google homes.

is what I have created. No sound yet. Any troubleshooting guidance?

Try audio/mp3 instead of music. Either way, any errors in the log?

found this in the logs:

**edit; think i found issue with vlan routing.

I can’t reach http://10.180.50.20:8123/local/audio/bigdogbarking.mp3 from my browser. Can you reach it from yours?
Can you reach it from https://hide.me/en/proxy

You’re not able to reach that because it’s not a publicly routable IP address. OP also said they’re able to reach that URL in a browser.

I found the issue. The google mini is in an IOT vlan and homeassistant is in another vlan. Apparently when casting, the google mini makes a separate connection back to homeassistant. I wasn’t covering this routing rule in my IOT vlan. After updating, the mini is now playing the correct audio.

thanks everyone for the assist here.

1 Like

Ah yep, that’ll do it. I have a similar setup with my network but I didn’t even think to ask about that… :man_facepalming: