Using CATT

This is exactly what I’m trying to figure out as well. Have you made any progress?

I have catt working great on my host Ubuntu system but I’d like a way to run a script through HA and have it run the command on my host. I have ssh working between the two just fine but I can never get catt to work through HA. Other commands like reboot work though.

With

ssh -i /config/ssh/id_rsa -o StrictHostKeyChecking=no [email protected] 'catt -d "Living Room display" cast_site "http://192.168.1.3:8123/lovelace/0"'

I get catt: command not found.

I could just install it in my docker container but I want to avoid having to do it each time I update HA… Does anyone have a solution?

Try giving the full path to catt.

1 Like

What do you mean by that? Full path to what?

catt works directly from the host machine to cast my views, I just can’t get it to work through my HA docker container using ssh. Other commands seem to work just fine though.

Where exactly is catt installed? Which directory?

I honestly don’t know. I just did pip3 install catt on my Ubuntu machine and got it working. I’m not too savvy when it comes to Linux.

So thanks to your hint I was able to figure it out finally! For anyone else struggling with this here’s what I did.

$ which catt to find out that the directory is in /home/user/.local/bin/catt

Then added this to my shell_commands.yaml:

cast_living_room_display: ssh -i /config/ssh/id_rsa -o StrictHostKeyChecking=no [email protected] "/home/user/.local/bin/catt -d 'Living Room display' cast_site 'http://192.168.1.3:8123/lovelace/0'"

Finally, I added this to my script.yaml:

cast_living_room_display:
   sequence:
     - service: shell_command.cast_living_room_display

Now I can write automations to cast my views and I don’t have to worry about HA updates undoing everything :grinning:

4 Likes

Yes that is what I was referring to, great it is working.

1 Like

Just a message to thanks everyone who posted their conf and tips here. I am now using CATT on a google nest hub with lovelace and custom cards. Great job !

Can anyone tell me if you are able to get around the problem using HA Cast as is described here: Cast - Size of Cards too big on Full HD Screen? I have this same problem. I see in the CATT page, it says “The display resolution is 1280x720.” On mine, it appears to be more like 720x1280, because it looks nearly the same as on an iPad in portrait mode, showing white bars on either side of the screen. Since I have a 4k screen and a Chromecast Ultra, this is just unacceptable.

Do you know how to cast only one tab in fullscreen (without menu and top bar)?

I used to have this working in the past but now I always get the error message Error: no devices found when I run catt scan

I have home assistant latest version0.107.5 running on a raspberry pi.

any idea why the chromecast devices are not found, I have multiple in my network

Hey guys!

I am trying to get a Live Picture glance to be streamed but no luck, did anyone managed to have a live camera on this?

Any Help appreciated!

did you have find a solution? i’ve the same error, if i catt cast_site https://demo.home-assistant.io/#/lovelace/0
i can see on the Nest Hub the Hassio demo page , if i use my https://xxx.duckdns.org/lovelace/0 i’m stuck on the login page, i’ve added to the trusted networks my local net 192.168.1.0/24, in my router i’ve forwarded port 8123 to 443 and i can reach locally with chrome both https://hassio.local:8123/lovelace/0 and https://192.168.1.xx:8123/lovelace/0
this is my config

homeassistant:
  auth_providers:
   - type: homeassistant
   - type: trusted_networks
     trusted_networks:
       - 127.0.0.1
       - ::1
       - 192.168.1.0/24
       - fd00::/8
       - 172.16.0.0/12
     allow_bypass_login: true
1 Like

Have you tried clicking just below the next field on the hub to see if you can open trusted networks there?
The field was not visible for me either, probably due to the dark theme, but is present and when you click it you can select a user as part of the trusted network.

I use my internal IP address of HA with catt though.

Edit: see the picture in this post for more details -> Using CATT

1 Like

mmm i can’t see (dark theme, how to change?) but if i click there says:
“start over” …

Did you use the internal url for catt cast_site instead of the duckdns one?
And you have allow_bypass_login: true in the config, but that will only work if you only have one user in HA. Is that the case?
And you can change the theme in HA by clicking on the round button with your initials.

yes, i’ve used the internal url:
https://192.168.1.xx:8123/lovelace/0
but the Nest hub gets stuck on the dashcast screen. Says “force loading: https://192.168.1.xx:8123/lovelace/0”
i’ve only one user ( with the exception of users automatically generated by the homeassistant system)
i’ve changed the theme to default white but the cast keeps the black theme…
PS: i’m on Raspberry Pi4 with rasbian lite and hassio installed trought docker

Do you use https? Try using http as it’s your internal network.

And no need to anominize your internal IP, nobody here is able to reach that :slight_smile:

LOL it’s a paranoid thing u r right!
if i use http i can’t reach the server with hassio,
could it be due to duckdns? I forwarded the ports on the router from 8123 to 443 and i can reach the hassio at https://xxx…duckdns.org/lovelace/0 without problems, if through a browser, I try to connect to http://192.168.1.12:8123 (yes yes this is the hassio internal IP I confess :wink: ) the browser says: ERR_EMPTY_RESPONSE

1 Like

I’m trying to use CATT but it keeps asking for a username and password on the google home hub, I’ve added auth providers to my config as below, not sure where else to go?

homeassistant:
  auth_providers:
   - type: homeassistant
   - type: trusted_networks
     trusted_networks:
       - 127.0.0.1
       - 192.168.68.0/24
     allow_bypass_login: true