Home Assistant Cast

/32 or /24 refers to the amount of bits in your subnet mask. /32 is equal to 255.255.255.255. You don’t want to use that if you want to connect between multiple devices inside your network. 192.168.111.0 is a class C network. In your home network the subnet will most likely be 255.255.255.0, which equals to 24 bits. So you you will need to use 192.168.111.0/24 for your trusted networks.

Thanks for explanation, but /24 is for 255.255.255.0 submask (and it’s my case). My local ip address is 192.168.1.111 so I have to insert: 192.168.1.111/24 If I have my personal pc 192.168.1.15 I will add 192.168.1.15/24. all my internal network has submask 255.255.255.0 so /24. Is it right?

And last question: api_password: !secret http_password is the password to login in home assistant or a longlifetoken?

EDIT: if i insert 192.168.1.15/24 or 192.168.1.111/24 homeassistant restart in safe mode and the log tells me:

2020-04-19 22:04:22 ERROR (MainThread) [homeassistant.auth.providers] Invalid configuration for auth provider trusted_networks: not a valid value @ data['trusted_networks'][0]. Got '192.168.1.15/24'
2020-04-19 22:04:22 ERROR (MainThread) [homeassistant.config] Invalid config for [homeassistant]: not a valid value @ data['trusted_networks'][0]. Got None. (See /home/homeassistant/.homeassistant/configuration.yaml, line 29). 

If I insert 192.168.1.0/24 all it’s ok but compare the picture of the preview post. “Your computer is not whitelisted”.

You should use the entire range, not a single address. So you have to use 192.168.1.0/24.
From what station do you start catt? Is that station within that ip range you have set for your trusted networks?

Ok so I will use 192.168.1.0/24
I start the command catt from a shell command in home assistant that is in a rapserry pi 4 in the same home network. So for exemple:
raspberry 192.168.1.151
google nest hub 192.168.1.111
pc 192.168.1.31
and so on…
maybe is my api_password what i have to use? the password that I used to enter home assistant? or I have to create a long life token?

Do you start the shell command from the ssh within home assistant? Because that one is dockerized and I think that is using the internal 172.16.0.0/12 range if I am right… if you want that you should add that range to your trusted_networks also, but it’s a bad idea for this purpose. After each update of Home Assistant Core it gets flushed and you need to reinstall catt again.

To answer your question how i start shell command, in my configuration.yaml I added

shell_command:
  cruscottoorologi: catt -d 'Cucina' cast_site 'https://XXXXXXX.duckdns.org:XXXX/XXX'

And I use it in automations or when I need. It works great also to show pages of my apache server that I have in the same rasperrby (but outside home assistant)
In the raspberry there is not only home assistant but also other stuff (I install home assistant in virtual env).

The problem now is only the autentication. I tried to add also 172.16.0.0/12 but same result.

Can you confirm which api_password is it? I can’t understand very well from documentation… it’s look like long life token…

I’m only using the api_password with 2FA when I’m not at home.
Did you use the allow_bypass_login: true in your configuration.yaml under auth_providers?

Ok, Yes my settings are:

homeassistant:
  name: xxxx
  auth_providers:
    - type: trusted_networks
      trusted_networks:
        - 192.168.1.0/24
        - 172.16.0.0/12
      allow_bypass_login: true
    - type: homeassistant

Hi,

I have an issue casting my newly created Lovelace Dashboard to my Google Nest Hub.
When I try to cast the url it just states that the url path can not be found.

So far I’ve tried with the code below:

entity_id: media_player.nesthub
dashboard_path: lovelace-cast
view_path: 'https://xxxxxxxxxxx.duckdns.org:8123/nest_hub/home'

-> With and without the quotes (no difference)

… and

entity_id: media_player.nesthub
dashboard_path: lovelace-cast
view_path: '/nest_hub/home'

-> With and without the quotes (no difference)

If I try with my default lovelace view and uses the view_path: ‘0’ - then it works without any problems.

What am I doing wrong?

looks good to me. When you try to reach home assistant from your phone or computer, does it bypass the login as it should?

view_path cannot be your duckdns link. It should be only the path to a particular view, without the name of the lovelace dashboard.
So if your dashboard is called nest_hub, then your dashboard_path is nest_hub and view_path should be home IF that view is called home. Watch out for upper/lower case letters.

Unfortunately it doesn’t work for me.
When I use the below code it just stops at “Connected” on the Home Assi… Luvs Nabu Casa.

entity_id: media_player.nesthub
dashboard_path: nest_hub
view_path: nest

I’ve seen other having issues when using the names as I do ‘nest’ in the view_path, but if I use ‘0’ instead - it just opens the default old school “states” view with all the badges and entities.

EDIT: Well… I tried calling my maindashboard as written below and it pops up instantly.
If I then try calling the other dashboard while the other one is still being casted - it actually pops up as well.

entity_id: media_player.nesthub
dashboard_path: lovelace
view_path: home

Strange isn’t it?

I always found home assistant cast weird. It reacts inconsistent. Sometimes you cast, pops up immediately. Sometimes it hangs at connected, you swipe away the cast, try again, and it works. Sometimes you have to do that more times. It doesn’t make sense at all.

3 Likes

I guess I’m not the only one then.
Maybe I should take a look at Catt instead. I just don’t know if I can run it on my NUC where I have the Hass.io installed.

So you use home assistant in a docker on top of a Ubuntu host for example?

No, I just installed the NUC image of Home Assistant?

All dashboard URLs need to contain a hyphen, so nest_hub wouldn’t actually be valid. Check the URL for that dashboard in the configuration and you may find it is something like lovelace-nest_hub, which would be what you would need for dasboard_path.

Hi Steven,

Thanks for you reply, but I still can’t get it working “Smoothly”.
The links are not the same as written above in my previous posts. I tried changing it, so it matched your example.

Here is the link where the Dashboard is present:
image

And the service I try to call:

entity_id: media_player.nesthub_kokken
dashboard_path: lovelace-nest
view_path: kokken

… but unfortunately on the Nest Hub it shows: Error: Unable to find a view with path kokken

I don’t get it :frowning:

EDIT: Could it really be a matter of a Restart?
I just rebooted the HA Instance and voila, it not seems to start right away without the error. I will have to try 10 times more, to see if it are more stable.

Thanks!!

Looks amazing. Any chance you could share the basic setup for this dashboard?

Used custom cards and lovelace code.

Then you are a bit out of luck I guess. You need to install catt via ssh. You could do that with the ssh addon of home assistant, but the installation of catt is gone after a update of
Home assistant. You can also try to install it on another computer. Please see the options for catt on their github:

1 Like