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
lolouk44
(lolouk44)
December 30, 2020, 4:02pm
43
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
arifroni
(Arif Roni)
January 15, 2021, 2:33pm
49
hi, i also ended up with log in page in black background. how did you get past that?
lolouk44
(lolouk44)
January 15, 2021, 2:48pm
50
tap towards the bottom of the screen / swipe up to bring the trusted network option
arifroni
(Arif Roni)
January 15, 2021, 2:53pm
51
thanks
i kept tapping downwards and found an option to select user…after that its always logging in.
corvy
(Corvy)
January 20, 2021, 11:10am
52
If you are struggling with the cast and recasting to a Nest device (Hub etc) I recommend this blueprint:
Small automation that casts a lovelace view to a Google Hub (or any Chromecast device for that mattter) when the hub is not playing anything. It re-casts the same view every 9 minutes to compensate for the fact that the hub automatically goes into picture frame mode after 10 min.
For this to function you need have the lovelace cast setup:
Have HTTPS setup on your HA install
Make sure you HA is accesible from the internet via HTTPS and also check in Configuration -> General (the external URL)
H…
Works perfect! Try it
2 Likes