Using CATT

I think it’s time to update the guide…


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

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

  Running 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/'"'"'; __file__='"'"'/tmp/pip-install-jq_xzlfc/pycryptodomex_3c88741b62074860b949b418ce022b6b/'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);'"'"'\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?

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!

  - 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!


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

  - python3 -m pip install catt==0.12.2
packages: []
share_sessions: false
  allow_agent_forwarding: false
  allow_remote_port_forwarding: false
  allow_tcp_forwarding: false
    - >-

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

Big Thanks to Lesley

1 Like

Hi, i have got CATT auto installing now using your above code (Thank you), do you or anyone here know how i can automate the cast, since the latest version of SSH doesn’t support the old method ( Using CATT - #492 by thehijacker )

Has the CATT 30 second display on a V1 hub problem been resolved ?
Using terminal, I am able to CATT to my V1, but it disappears after 30 seconds. My V2 hub will display the CATT 10 minutes. Then I issue a STOP then I can re-CATT.

@Luitertje I am working on your SSH method of creating a switch. Testing in terminal but it is asking for a password. No passwords I have tried have worked. I think it wants the key. How can I copy/paste the key into Terminal ? I used CTRL-right click-paste the key but it still has permission denied.

SOLVED: My issue was that the username&password should have been the username that is set up in the SSH&Web add-on and NOT one of the HA usernames

Hi Braindrian,
the purpose of a ssh key means that you don’t have to use a password actually. You did create the key right? Where did you store it? Also did you put the content of the public key ( in the configuration of the ssh add-on? Furthermore make sure that the /config/ssh/id_rsa in the code is the right path to where your id_rsa lives.

1 Like

Thanks for the reply.
You mentioned testing the key with a login. Could you explain how I would do that?
When we generate the key-pair does it get associated with a specific user account? I will test logging in with Putty and the key.

I stored the keys in a folder /config/ssh.

init_commands doesn’t work, what do I use now? I don’t see anything in the ssh addon documentation for init_commands, is it a modified addon?

Did you try the init_commands in this post? That one worked with my terminal addon.

python3 is removed every time the ssh addon restarts. I am unable to use init_commands at all and I am wondering if it got renamed to something else.