Using CATT

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 }}"

Yes it has been removed as a result of an exploit that requires some social engineering? Wish there was some more detail? Is it like clever or is like oh ya try typing rm -rf *dontypethisudiot . Anyways Frenck said we can use ssh…so is that better security wise and how do we do that?

I think it’s time to update the guide…

4 Likes

@idov
Hi Great guide and really good timing as I’ve just purchased a nest hub and find the cast integration to be flaky
because you are adding a install via PIP on a home assistant OS will it not remove itself when you update HA OS
I’m currently on 6.4 and can now see there is a 7.0

Yeah, I had to deal with the same issue. I found a way, it might be a bit
You can create a ssh keypair in the terminal with ssh-keygen -t rsa. Add the (content of the) public key in the configuration of the add-on.
Check if your key is working by loggin in with the key.

After that you can create a shell command or a command_line switch.
Here’s my example of the switch:

  - platform: command_line
    scan_interval: 60
    switches:
      castmorning:
        friendly_name: "Cast ochtend"
        command_on: "ssh -o StrictHostKeyChecking=no -i /config/ssh/id_ha_rsa **user**@192.168.178.XX catt -d 'your_device' cast_site http://ha-url/lovelace-cast/morning" #replace the /config/ssh/ link to the place where you host the key.
        command_off: "ssh -o StrictHostKeyChecking=no -i /config/ssh/id_ha_rsa **user**@192.168.178.XX catt -d 'device' stop" 
3 Likes

Hi. I run Ha on Raspberry.
“pip install catt” returns

  Running setup.py install for pycryptodomex ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jq_xzlfc/pycryptodomex_3c88741b62074860b949b418ce022b6b/setup.py'"'"'; __file__='"'"'/tmp/pip-install-jq_xzlfc/pycryptodomex_3c88741b62074860b949b418ce022b6b/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-5hlr8vg3/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.9/pycryptodomex
         cwd: /tmp/pip-install-jq_xzlfc/pycryptodomex_3c88741b62074860b949b418ce022b6b/
...
 gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -g -fno-semantic-interposition -g -fno-semantic-interposition -g -fno-semantic-interposition -DTHREAD_STACK_SIZE=0x100000 -fPIC -DPYCRYPTO_LITTLE_ENDIAN -DSYS_BITS=64 -DLTC_NO_ASM -Isrc/ -I/usr/include/python3.9 -c src/MD2.c -o build/temp.linux-aarch64-3.9/src/MD2.o
    error: command 'gcc' failed: No such file or directory

How can I install gcc?
Thanks

Having the same problem since yesterday. Using Home Assistant Blue (ondroid n2+).

Help is needed… Catt installation fails.

I fixed this by changing the initial command to:

python3 -m pip install catt==0.12.2

There have been a few updates in the past week which for some reason create an error during installation. Using the command above, you’ll install the latest version that doesn’t create errors on setup.

Side note: I also partially restored the SSH addon through Supervisor to v9.1.1 because I won’t have time soon to edit my automations that use the stdin service. Maybe if only changing the init command doesn’t work, you should do that too. Let me know if it worked for you!

6 Likes
init_commands:
  - apk add build-base
  - apk add py3-wheel #optional
  - python3 -m pip install catt

This fixed it for me

Thanks!! It works!!

work for me! thanks!

4 Likes

Does anyone have a guide to use ssh instead of stdin?

1 Like

This would be helpful. I haven’t updated the Terminal add-on b/c I rely on the addon.stdin for several automations.

This is probably unrelated but I wanted to share it to see if anyone else has seen it.

Yesterday I saw a Welcome to Home Assistant splash screen appear on one of my Google Home Hubs.
It was full screen and included the HA logo and blue background.

I was in a hurry heading out the door so didn’t get to touch the screen to see if there was any interaction.

Has anyone else seen this and if so what is it?

CATT via ssh works exactly as described by Lesley.
only one little typo :wink: ssh-keygen -t rsa
Config for SSH Terminal should look somehow like

init_commands:
  - python3 -m pip install catt==0.12.2
packages: []
share_sessions: false
ssh:
  allow_agent_forwarding: false
  allow_remote_port_forwarding: false
  allow_tcp_forwarding: false
  authorized_keys:
    - >-
      ssh-rsa     
      AAAAB3NzaC1y..........****yourKey**********........

and same as using stdin
always use stop command before starting new cast in automation

Big Thanks to Lesley

1 Like