I found quite an easy way to use CATT when using Hassio on a Raspberry pi:
Step 1. Install https://github.com/hassio-addons/addon-ssh
Important! :DO NOT USE “Terminal & SSH” addon, that addon will not work, use the addon in this link above.
Step 2. In the configuration of this addon add this (it will install CATT everytime the whole system is rebooted, this is needed as the container of the addon is clean at every system reboot)
init_commands:
- python3 -m pip install catt
(Make sure that this is executed after changing the configuration)
Step 3. Now you can make an automation like this (this launches the cast every 10 minutes as the cast is removed on the hub every 10 minutes):
- id: '1589529246400'
alias: CastToHub
description: ''
trigger:
- minutes: /10
platform: time_pattern
condition: []
action:
- data:
addon: a0d7b954_ssh
input: catt -d "Living Room display" cast_site http://192.168.178.87:8123/lovelace-test/0
service: hassio.addon_stdin
What this final step does is execute the CATT command within the ssh terminal add on.
This all took me the better part of the day to figure out, so hope it helps some other people. This solution does not require any fiddeling with SSH keys or passwords. Just works straight away.
Edit:
Some additional posts with more info that I created after this one:
If you have problems with logging in on your hub see: Using CATT
To remove the beep every 10 minutes see: Using CATT