Automatically Cast Home Assistant to Nest Hub?

Seeing as though people are complaining about it from sources other than Hass, I’d imagine it’s a bug. We’ll find out if they push an update with a fix and we’re still SOL.

I put my hub in a wall mount that is flush with the wall so I hope this gets fixed. It worked perfectly before this issue.

the 100% always work method is using:

entity_id: media_player.hub_huiskamer
view_path: '0'

if you want a custom dashboard to load i tinkered around and found out if u use the normal way you will get the "page not found error"but if you do an extra cast in the automation it works:

- id: '1591682005536'
  alias: Test Nest Hub
  description: ''
  trigger:
  - event: start
    platform: homeassistant
  - entity_id: media_player.hub_huiskamer
    platform: state
    to: 'off'
  action:
  - data:
      entity_id: media_player.hub_huiskamer
      view_path: begane-grond
    service: cast.show_lovelace_view
  - delay: '00:00:05'
  - data:
      dashboard_path: nest-hub
      entity_id: media_player.hub_huiskamer
      view_path: begane-grond
    service: cast.show_lovelace_view

here i first cast the wrong code to trigger the page not found error and after a delay i trigger the right dashboard with it and then it works. if i only trigger the right one it doesn’t work it first has te be in the page not found without dashboard input v=before it works with the right code. strange, but it works effective now. i alse tried to make the delay shorter but that doesn’t give a 100% value. this 5 seconds delay does. i uploaded a video on youtube how i made my cast look and how to jump between screen and navigation.

My setup for casting

5 Likes

Hi @licky_lauda thanks for your update. I do want to do some casting to my Google Nest Hub also.
When I call the cast.show_lovelace_view service with entitity id and view_path included like your first method (without the custom dashboard) via DeveloperTools/Services in HASSIO, the casting stops after 10minutes on my Google Nest Hub. But looking to my Chrome, it says Casting is still ongoing. Did you faced this issue also and how did you solved it? Thanks! I’m using the latest version 0.111.2 and HassOS 4.10.

@paullions:
The casting only stops if the nest hub is streaming something else like radio.
if you swipe down on your nest hub go to media and you will see your nest hub and the stream it is receiving, if you tab the strem (home assistant) your view pops right back up.
i ussually say hey google play radio and then hey google stop (im to lazy to touch the screen ;))

or you can do an automation every x minutes to media_player.turn_off and the start the cast again.
i do not do this, i think the screensaver is there for a reason and when the HA screen is up 24/7 i think it will burn in after a while.

1 Like

I tried this and for some reason my Nest Hub shows as off even when casting HA. HA doesn’t recognize anything being sent to the device, but the Google home app does.

Do you see this behavior with your setup?

@paullions
i checked, while casting the state is off. when streaming radio the player is in state playing.
i tried:
media_player.turn_on
and then
media_player.turn_off
after turning off my automation kicks in and the casting starts again.
and you can trigger this every x minutes in a automation.

2 Likes

Just tried this (and blocking access to google’s DNS servers from my nest hub) and it works great! Thanks!

How did you block access to Google DNS from the hub?

All devices in my network have a dhcp reservation based on their mac address, so I made a rule in my opnsense firewall to block access to 8.8.8.8 and 8.8.4.4 for my nest hub.

Do we still need workarounds like this or has .113.0 brought us a fix (I didn’t see it in the changelog). There’s some Nest hub discount running again, so tempted to buy if fixed.

I am also struggling with this. I cannot get the HUB to update status to HA when it is casting. Not sure why this is happening and sadly I do not have a configurable firewall set up right now, and I have not other need for it so the workaround is really not an option without redesign of the network.

Do we know why it has this behaviour and why blocking DNS gives this effect?

Blocking google DNS didn’t do anything for me to stop this issue from happening.

2 Likes

Ok jumping into this too
Whats the best method now?
Using this workaround?
Will the photo album/clock on google still work?
I agree with @licky_lauda that we dont want the screen to burn in
@Nicky how are you using it now? It still works?

Other thing i found but harder to setup is with https://github.com/skorokithakis/catt

burn in isnt an issue. This is an issue on a lot of devices like phones, because they use OLED screens. The Nest Hub uses an LCD screen, like computer monitors.

On second thought, it is an issue if you are using Home Assistant cast on an OLED TV.

after a while the photo album/clock kicks in if you are not reapplying the cast over and over again.

i’m trying to cast this also…
My script looks like this

cast_dashboard_naar_keuken:
  alias: HA dashboard naar keuken
  icon: mdi:cast
  sequence:
    - data:
        dashboard_path: lovelace_tablet
        entity_id: media_player.keuken
        view_path: Home
      service: cast.show_lovelace_view

When i activate it, i see onm hub home assistant connected nabu case
and it stays on that screen, i dont see my dashboad, then i swipe and its gone
when i call it back, nothing comes, when i try the day after, i get the same

any idea?

You may need to have home in lowercase for your view_path, both in lovelace and in the automation. Not sure it’ll fix it but I’d try anyway to keep names lowercase especially when they’re not being displayed

Doenst make any difference capital or not :stuck_out_tongue:
still not able to cast?
Whats wrong?

did you find a answer ?
because i got the same problem
with the screen that it connected butt than is nothing happening

Call the cast.show_lovelace_view with an incorrect dashboard name, wait 5 sec, then call our again with the right details. That’s what works for me