Automatically Cast Home Assistant to Nest Hub?

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

Iā€™ve installed the SSH & Web Terminal addon in Supervisor.
In the configuration tab:

ssh:
  username: xxx
  password: xxxx
  authorized_keys: []
  sftp: false
  compatibility_mode: false
  allow_agent_forwarding: false
  allow_remote_port_forwarding: false
  allow_tcp_forwarding: false
zsh: true
share_sessions: false
packages: []
init_commands:
  - python3 -m pip install catt

Than an automation:

- id: '1589529246400'
  alias: CastToHub
  description: ''
  trigger:
  - minutes: /10
    platform: time_pattern
  condition: []
  action:
  - service: media_player.volume_set
    data:
      entity_id: media_player.nesthub7736
      volume_level: '0'
  - delay: '5'
  - data:
      addon: a0d7b954_ssh
      input: bash /config/cast.sh
    service: hassio.addon_stdin
  mode: single

Cast.sh:

if ! catt -d "Keuken" status | grep 'PLAYING'; then 
    catt -d "Keuken" volume 0
    catt -d "Keuken" cast_site http://10.0.0.250:8123/lovelace/default_view
fi

Works fine.

2 Likes

I think i Fixed it
logging out at https://cast.home-assistant.io/
now it works every time with out a turn around

how do you fix the login into HA via catt?
I tried it and I get prompted with the login page, but of course I get no keyboard to enter username or passwordā€¦
[edit]
Ignore the above, because the page was dark I could not see the ā€œtrusted networkā€ option below the login button. All sorted and actually works much better than the standard cast.show_lovelace_view as I can see the background picture that I had set up (cctv feed)

Iā€™m not sure exactly what to do with this info. Got the SSH and web terminal set up some time ago, but the automation part is confusing.

Anyone feel like explaining it like Iā€™m 5?

  auth_providers:
  - type: trusted_networks
    trusted_networks:
      - 192.168.2.0/24
      - 10.0.0.0/24
    **allow_bypass_login: true**
http:
  base_url: https://xxxxxx.ui.nabu.casa/
  cors_allowed_origins:
  - https://cast.home-assistant.io
  - https://xxxxx0emdb4wswvx.ui.nabu.casa/

Not sure what part is nessecary but this is mij configuration in configuration.yaml

1 Like

You can copy/paste this configuration in your automation.yaml and replace my hub name with yours
Make a new file via file editor, name it cast.sh and copy/paste the code I wrote in the post above.

- id: '1589529246400'
  alias: CastToHub
  description: ''
  trigger:
  - minutes: /10
    platform: time_pattern
  condition: []
  action:
  - service: media_player.volume_set
    data:
      entity_id: media_player.nesthub7736
      volume_level: '0'
  - delay: '5'
  - data:
      addon: a0d7b954_ssh
      input: bash /config/cast.sh
    service: hassio.addon_stdin
  mode: single
2 Likes

Great, thatā€™s what I had planned on doing.

In the cast.sh file, what is the ā€œKeukenā€ reference? Thatā€™s what was throwing me off.

Thatā€™s te name of mij Google Nest Hub. In the cast.sh file you donā€™t use the entity ID but the name.

1 Like

hi, i also ended up with log in page in black background. how did you get past that?

tap towards the bottom of the screen / swipe up to bring the trusted network option

thanks :slight_smile:
i kept tapping downwards and found an option to select userā€¦after that its always logging in.

If you are struggling with the cast and recasting to a Nest device (Hub etc) I recommend this blueprint:

Works perfect! Try it :slight_smile:

2 Likes