Using CATT

I got it kinda working…

Naamloos
gives me a “mini cast” and then goes back to the art gallery.

Naamloos
gives me a 10 minute cast, but when it tries to reconnect i get the DashCast logo and then the hub goes back to the gallery.

1 Like

My last nesthub just updated so now none of them work :confused:

Can you help whenever i try and run the bash file i get a syntax error

if ! catt -d “Entryway Display” status | grep ‘PLAYING’; then
catt -d “Entryway Display” volume 0
catt -d “Entryway Display” stop
catt -d “Entryway Display” cast_site http://192.168.8.154:8123/lovelace-tablet/0
fi

im getting this same syntax error how did you fix

Yet you don’t tell us what the error actually is.

Apologies my comment was in reply to the post 2 above

Naamloos

@robbrown92 and @marinesjeng

I got the “syntax error near unexpected token fi” error tried everyting.
How did you guys fix it?

Looks like you have “fancy” quotes. “Entryway Display” instead of "Entryway Display". Copy/paste my quote and replace all of yours with it.

On my google hub Max I have to stop streaming with catt -d “hub_name” stop in order to load a new view whereas on my nvidia shield I can just cast another view and that interrupts the old view. What are you guys seeing? Can I fix it. I’m afraid the extra stop command may fubar some of my plans.

Edit: I see that somebody also had the same issue but I almost missed that little post. Guess you have to introduce the catt -d stop command which I hope doesn’t slow the process.

Just for others and since its been awhile since I had such a hard time with hidden carriage returns and dos and unix.

There is a hidden character which gets introduced usually using a windows text editor but surprisingly I also got it in notepad+++. BASH does not like this hidden character. I thought when I saved it as a .sh file it would automatically fix this in notepad +++. I copied and pasted into notepad +++ so I think that is how that carriage return got introduced.
You can see how to remove that carriage return with notepad +++ here if you like https://code2care.org/2015/notepad-plus-plus-remove-cr-carriage-return-and-lf-line-feed-crlf

And here is my code with the stop command not sure if the carriage returns get picked up if you copy and paste from the browser

if ! catt -d "Kitchen display" status | grep 'PLAYING'; then
    catt -d "Kitchen display" volume 0
	catt -d "Kitchen display" stop
    catt -d "Kitchen display" cast_site http://redacted:8123/lovelace/default_view
fi

Also I found it was much quicker to manipulate the dashboard than cast a whole new page using the browser_mod custom integration(in hacs).
https://github.com/thomasloven/hass-browser_mod/blob/master/README.md
https://www.youtube.com/watch?v=cN7R5OKYiaI

So if motion is detected I just use hass browser mod to navigate to a tab with the camera panel card displayed.
Last thing you can disable the catt call for volume zero and in your automation use the media player service to mute then unmute the media player. I needed a delay for the umute to allow the dash to load first or it would just unmute to rapidly and I would get the beep anyway

I am having severe problems to get my Nest Hub to show the family Calendar as like a screen saver, at least when triggered.

Anyone have any idea if it would be possible to cast it with CATT from like Google Calendar - Sign in to Access & Edit Your Schedule?

Does this still work? My HA is setup with https and I’m trying to send it to the duckdns redirect but it’s asking for me to login. I setup the trusted networks, but can’t seem to get past it. I send the command, click “Or login with: Trusted Networks” and it says “Login aborted: Your computer is not allowed”

Any help appreciated!

I have a certificate from letsencript what i use externaly en internaly. When i cast homeassistant with CATT it say’s the ip it’s not on the trusted network. I think i have to use my external ip adres in the configuration, but that is not safe with te option “allow_bypass_login: true”. I there another solution to expose only lovelace page from homeassistant and only internal? Can i make a different certificate voor only localy en cast i with CATT to the next hub gen2 of does that also not work?

catt -d "Nest Hub Mini" status shows only “volume” but no “PLAYING” wording even catt -d "Nest Hub Mini" cast_site is already called. Is it normal?

That is a question for the catt github I think :slight_smile:

I always manage to have it working for the first few minutes, then it’s going back to google’s gallery…
when the gallery is back I can’t CATT it again, even manually

catt -d display cast_site http://myip:port/lovelace/here

no error on the terminal but nothing happening on the hub
on top of that, how do you guys manage to install catt all the time ?

when I add in the options, I have “invalid YAML”

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

when I add in the options, I have “invalid YAML”

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

I ran into this too; @john2014 had a good answer

Worth noting I am still fighting the same issue as you - works the first time and then will not reinitiate the cast. Usually lasts ~15min. Even with a manual attempt of running CATT, and will usually require a reboot of the nest hub and/or the home assistant box.

Still plugging away at it, will report back if I make progress.

This appears to be a catt issue then. File an issue on their github.

well… looks like it started working without any changes to the automation code, or the the bash script.
My hub max updated and restarted at least twice this week.

My current versions:

Cast Firmware Version: 1.56.276689
Software Version: 45.0.26.400811527

No luck finding release notes, but appears their production release page is a little behind showing:

Google Nest Hub Max	1.56.265669

Any luck with you @lowrisk75 ?

With latest SSH addon update we can no loger issue addon_stdin. So how to trigger catt command from automation?

      - service: hassio.addon_stdin
        data:
          addon: a0d7b954_ssh
          input: /usr/bin/catt -d "{{ states('input_select.catt_device') }}" {{ states('input_select.catt_service')  }} "{{ states.input_text.catt_text.state | string }}"