Using CATT

also tried this on my Hub 2 (fw 1.56.265669) but without any result :frowning:
Also restarted by Hub and HA but still no luck…hope to get a fix soon!

Strange… If you issue the stop command manually after timeout, does the cast site command work?

Is the cast stream still active i the GH app after timeout?

whoops…sorry, my mistake! :roll_eyes:
It works after I installed CATT again.

So, is it normal behaviour that CATT needs to be reinstalled after rebooting HASS ?
Previously I used to run HASS in a container where I didn’t notice this issue, but since some weeks I have a HA Blue :smiley:

Yes CATT needs to be reinstalled. I have a automation that (re)installs CATT with the “HA started” trigger incase of a reboot or power loss.

Good idea!

I tried to create an automation to install catt in HA start, but for some reason it doesn’t install CATT.

My code:

alias: Install CATT on Boot
description: ''
trigger:
  - platform: homeassistant
    event: start
condition: []
action:
  - service: hassio.addon_stdin
    data:
      addon: a0d7b954_ssh
      input: bash pip3 install catt
mode: single

Do you might sharing your automation to see what’s wrong with mine ? :grimacing:
Thanks!

You don’t need an automation to install on boot. Just add an init_command to your ssh & web terminal add on configuration. I have it to install a specific version, as I had some issues that I’m not sure are resolved.

init_commands:
  - python3 -m pip install catt==0.11.3
2 Likes

Thanks, but does not seem to work for me :frowning:

For anyone experiencing the 30s timeout issue on their nest hub. I have created a forum topic to request the timeout get increased on the nest hub community for you to add your support for visibility.

2 Likes

Got the same firmware, but no luck…I’ve restarted my hub2, home assistant…re-installed SSH&webterminal, re-installed catt

if ! catt -d “Woonkamer” status | grep ‘PLAYING’; then
catt -d “Woonkamer” volume 0
catt -d “Woonkamer” stop
catt -d “Woonkamer” cast_site http://192.168.1.9:8123/lovelace/home
fi

something wrong in here? it’s the only thing that has changed…

Hope you can help me out

How do the manual commands react when running via terminal?

  1. catt -d “Woonkamer” stop

  2. catt -d “Woonkamer” cast_site http://192.168.1.9:8123/lovelace/home

Thanks for the reply Tuxx.

When I enter the commands, they do what they should do…

  1. catt -d “Woonkamer” stop ==> stops the casting.
  2. catt -d “Woonkamer” cast_site http://192.168.1.9:8123/lovelace/home ==> casts the site.

but after 10 minutes, the casting stops and the colck shows up…

oke, that’s good.

Next:

  1. where did you store the .sh-file containing the script ?
  2. can you run the .sh-file via de terminal ?
  3. can you post you automation YAML calling this script
  1. the .sh file is stored in the root file /config/cast.sh

  2. not sure how to do that

- id: '1630864902779'
  alias: cast dashboard
  description: ''
  trigger:
  - platform: time_pattern
    minutes: /10
  condition: []
  action:
  - service: hassio.addon_stdin
    data:
      addon: a0d7b954_ssh
      input: bash /config/cast.sh
  mode: restart

type

bash /config/cast.sh

Thanks for the reply nick.

When i try

bash /config/cast.sh

I get:

Screenshot 2021-09-23 04.52.35

Looks like a mistype or the wrong line ending is your script.

it looks like this:

if ! catt -d "Woonkamer" status | grep 'PLAYING'; then 
    catt -d "Woonkamer" volume 0
    catt -d "Woonkamer" stop
    catt -d "Woonkamer" cast_site http://192.168.1.9:8123/lovelace/home
fi

I also think there is maybe a ‘special/hidden character’ where you see a space (maybe behind the word ‘then’?)

What I usally do in this case:
Or retype full script manually again (if not too long)
Or copy-past in Notepad++ (or other advanced editor) en show hidden chars to see what’s wrong.

It refers to a \r which should not be there.

https://www.cs.toronto.edu/~krueger/csc209h/tut/line-endings.html

I think i’m almost there, but now i got this error…can’t see what’s wrong, any ideas?

Naamloos