Using CATT

Ok, I managed to get met cast up & running

The only problem left: I need to login everytime I cast into hassio portal

I do have my users configured:

auth_providers:
- type: homeassistant
- type: trusted_networks
trusted_networks:
- 192.168.1.0/24
- 192.168.2.0/24
- 192.168.3.0/24
trusted_users:
192.168.1.0/24: c3b3f8e750cd43ed92bffXXXXXXXX
192.168.2.0/24: c3b3f8e750cd43ed92bffXXXXXXXX
192.168.3.0/24: c3b3f8e750cd43ed92bffXXXXXXXX

  allow_bypass_login: true

I thought everything went by the book, but unfortunately I get the login page

Anyone have a clue ?

Thanks a lot guys,

B

allow_bypass_login This is a feature to allow you to directly jump to main page if you are accessing from trusted networks, the allow_bypass_login is on, and you have ONLY ONE available user to choose in the login form.

I created a dashboard with only one user. that solved it for me.

The 30 second timeout is a major problem; is there a way to use IFTTT to have a google assistant voice command trigger the catt casting of a lovelace card ? This way the desired display (in my case an internal network webpage) can be made available on demand. thanks

I am trying to run a shell command with catt with IFTTT using google assistant to trigger the service. When I install catt using the terminal add-on suggested in post 267 by @john2014 I get error return code 127 when I do a call service test in developer tools. The catt cast command line works in the terminal. Please advise.

Post 267 is not the right post ,it is not by @john2014

Sorry post 268

This is 268 Using CATT - #268 by 4kauto

Click on the date to the right of the post you are referring to. It will show the post number and a url linking directly to that post. It even allows you to copy that url, you can then post it here.

Sorry post #277

I actually found 127 which is, I think, the one you mean Using CATT - #127 by john2014

I think the service hassio.addon_stdin has been removed from the ssh addon.

Indeed it has been removed it seems: repository/CHANGELOG.md at 9d08973517f1e7cb2808e79a8518cefad859a463 · hassio-addons/repository (github.com)

I dont use CATT anymore due to the 30 second issue. So didnt notice.

I am trying to run catt as a shell command and have been unsuccessful due to return code error 127.

You can’t use post 127 solution any more for reasons we have explained.

Please post exactly what you are typing in and what response you see

using this shell command

then test shell command in Developer Tools

This is the error message i get in logs

A 127 error indicates that the shell couldn’t find the command you asked it to execute

what type of install are you running?

I have to say that you referred to an addon before, which means you must be running hassos or ha supervised. In which case /home/michael is an odd path.

Hello everyone:

With all this cast “time” problems , im using a little trick to get unlimited cast time to the google nest Hub (lenovo in my case), just in case anyone want to test it. Im using “cast.show_lovelace_view” no CATT until everything works fine again.
What i do first is cast anything with video or audio (camera in my case) ,so i get a notification in my phone so i can control volume,track… once is in this state i cast my lovelace page. The controls still on my phone the cast act like audio or video so never stops.

Here is my config:

action:
  - service: media_player.turn_off
    target:
      device_id: 2bXXXXXXXXXXXXXXXXXXXXXXX56
    data: {}
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - service: cast.show_lovelace_view
    data:
      entity_id: media_player.lenovosmartdisplay
      dashboard_path: lovelace
      view_path: camara-entrada
  - delay:
      hours: 0
      minutes: 0
      seconds: 4
      milliseconds: 0
  - service: cast.show_lovelace_view
    data:
      entity_id: media_player.lenovosmartdisplay
      dashboard_path: lovelace
      view_path: camara-entrada
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - service: cast.show_lovelace_view
    data:
      entity_id: media_player.lenovosmartdisplay
      dashboard_path: lovelace
      view_path: camara-entrada
  - delay:
      hours: 0
      minutes: 0
      seconds: 10
      milliseconds: 0
  - service: cast.show_lovelace_view
    data:
      entity_id: media_player.lenovosmartdisplay
      dashboard_path: lovelace
      view_path: pantalla
mode: single

Sorry for my english and i hope that it helps.

Thanks

Don’t worry about your english,but please post your code properly. Point 11 In the forum rules.

Sorry i didnt know how to do it, its ok right now?
Thanks.

Looks good, well done.

I have tried almost everything here and I just gave up on it finally. Here’s a quick run down of how I eventually got CATT to work with HA by offloading it.

  1. On a windows machine that I have running 24/7 I installed node-red
  2. Install CATT on that windows machine
  3. Created 2 batch files one to start CATT and one to stop it
  4. Created a very simple flow:
  5. In HA I created a rest_command via the configuration.yaml
  6. In the HA automation I trigger the rest command.

Done, and now I don’t have to mess with HA’s finicky behavior with CATT and shell commands. It’s also a lot faster than it was on HA.

I solved the “cast timeout” problem in this way:

  • created a shell folder under config
  • created a file cast.sh in shell dir with the following commands:
    catt -d device stop
    catt -d device cast_site url
  • SSH & Web Terminal → chmod 777 /root/config/shell/cast.sh
  • SSH & Web Terminal config:
    init_commands:
    python3 -m pip install catt==0.12.2
    (crontab -l 2>/dev/null; echo “*/12 * * * * /root/config/shell/cast.sh”) | crontab -
    crond -f -l 8 &

The shell is called up every 12 minutes through crond.

The shell can be improved, please help me.

I have chosen 12 minutes to minimize the burn-in on the screen.

That’s all

Sebastiano

1 Like