Using CATT

The message you were worried about, ie WARNING (MainThread) [supervisor.addons.validate] Add-on config 'startup' with 'before' is deprecated. Please report this to the maintainer of Resting Catt isn’t coming from that setup. It is coming grom the resting catt addon.

Hoping someone can point me in the right direction.

When I try to cast lovelace I’m unable to get past the login screen. Just getting ‘your computer is not allowed’ error and the Start Over button.

This is in my config:

  auth_providers:
    - type: trusted_networks
      trusted_networks:
        - 192.168.55.0/24
        - 192.168.1.0/24
      trusted_users:
        192.168.55.0/24: <my User ID>
        192.168.1.0/24:  <my User ID>

192.168.55.0/24 is the network (vlan) my Google devices are on
192.168.1.0/24 is the network HA is on

I also tried adding type: homeassistant which brings up a login with trusted networks option on the display, but this also doesn’t work.

I’m casting via my duckdns domain (https://xxx.duckdns.org:8123) if that makes a difference? I use that address to access HA internally and externally.

Any hints appreciated!

It’s ok the penny dropped! For anyone else, the issue was using my duckdns domain. When I added my external IP into trusted networks it worked as expected.

Hi @wimpie007 @mirecekd (re: fork). resting-catt looks like what I want to run CATT as an API in Docker (but not as an addon).
How is this project going?

Hi,

there is no change for app, it just works for me over 3 months.

To use it just compile/use docker image, run it as described on GitHub - mirecekd/resting-catt: [WIP] A REST API wrapping skorokithakis/catt intended for Home Automation usage. and try to cast some site to hub/chromecast with:

curl -X POST http://docker.server.local.lan:9898/cast_site -H 'Content-Type: application/json' -d '{"device":"address.of.chromecast.local.lan","url":"http://site.to.cast.to.chromecast"}'

I will add this simple curl line to github readme :slight_smile:

1 Like

Hi, just simple question, after update to 2021.5.5 core HA, the catt from HA stopped working for me, from Community Web Terminal it´s fully working. There is no log error in HA, so seems like the catt is called, but nothing is casted. So just question - does this calling via addon: a0d7b954_ssh work for you after last update or not?

Simple enough reply, how are you calling catt?

service: hassio.addon_stdin
data:
  addon: a0d7b954_ssh
  input: 'catt -d "ChromecastName" cast_site https://...'

I fully restarted raspberry, did catt installation again, run it and now it works with hassio again.
In the end of catt installation was date that could helped: youtube-dl-2021.5.16.

Am I right that no one has made a custom component for CATT?
I’m prepared to give it a go…
Would I start with a media_player or…? Any tips or attempts that anyone knows of?

I reality I think you are dealing with an addon rather than a custom component. See GitHub - homeassistant-addons-eliseo/resting-catt: [WIP] A REST API wrapping skorokithakis/catt intended for Home Automation usage. for starters.

Thanks. I saw resting-catt earlier in this thread, modified the code and ran it in Docker… but then thought why run another service just to provide the Python package, when I could install the package and call it using a custom component?..
As for add-ons, I can’t use them :slight_smile:

Add-ons are only available if you’ve used the Home Assistant Operating System or Home Assistant Supervised installation method. If you installed Home Assistant using any other method then you cannot use add-ons.

1 Like

Hi,

I might be late to the party but I think I found the workaround solution to the issue of “not able to bypass login when using duckdns” and “force loading when using local IP with https”.

  1. Comment out the whole http: component in your configuration.yaml where you setup your ssl cert and privkey.
  2. Go to Supervisor → Addon, and install NGINX Home Assistant SSL Proxy. Type in your domain in nginx config as such domain: yourdomain.duckdns.org and save it.
  3. Start the nginx service. Go to Log and make sure it is fully running, with log as such INFO: Running nginx...
  4. Port forward TCP external 443 to internal 443. (Your previous setting should be 443 → 8123. Just change that).
  5. Test that you can now access to your home assistant via http://yourIP:8123. Just in case.
  6. Restart your home assistant.

Now you should be able to access to your home assistant via https with duckdns, and http with local IP. You are not forced to use https when you are in local network now. After that simply cast it using your http local IP. catt -d "Living Room display" cast_site http://yourLocalIp:8123/yourDashboard

Reason being is that http component can’t serve SSL cert to both HTTP and HTTPS at the same time, so we need to use nginx to manage HTTPS portion. This way we can remain to use http when we are in local network, especially for such occasion.

1 Like

Have you succeeded with this idea? I was thinking the same. And then just call catt by a script to cast. (I am not looking for to cast Lovelace but other stuff.)

No, I haven’t tried yet. I was waiting to get a response to avoid reinventing the wheel. I guess no response probably means no custom component exists. I might give it a go soon (during lockdown).

Just to confirm, your idea was that to include in the manifest.json of a custom component the catt package to be part of HA, and then call the package with a script?

Sounds like you’ve thought about it more than me already :slight_smile:
Yes, a custom component that installs catt as part of the requirements and calls it based on some event you can specify in HA. Happy to hear more ideas.

A way of using it was discussed recently on reddit.

And there is a write up linked in this topic already.

I am looking for casting YouTube videos, and not the Frontend.

I’ve had long-time success with casting an HA kiosk-style dashboard to my Nest Hub, via CATT, usually seeing a dashboard for 10 mins before (what I believe is called) ‘Ambient’ mode kicks in. The typical workaround to this is an automation which reloads the dashboard on a 9.5-minute cycle.

But today my hub involuntarily took a new firmware version when I rebooted it, with the net result being that instead of a 10-minute cycle the Hub now give me just 30 seconds of HA dashboard before Ambient. I can’t find anywhere in the settings to lengthen this time.

I’ve had to increase the frequency of my HA automation to counter this, which renders the kiosk/dashboard almost unusable; the duty cycle of reloading via CATT is about 20% of the 30-second refresh period! And this more frequent polling has led to instability; it seems that calling catt the way I do has a sort of ‘mean time to failure’.

Question: does anybody know how to set the period of inactivity before Ambient mode takes over? Or, ya know, disable it altogether?


Google Hub details:
Google Hub firmware version: 1.52.260996
Google Hub software version: 35.34.10.374969784
Operating system version: 1.20210119.2.1390060

HA details:
Supervisor and Core: 2021.06.6
Host: Home Assistant OS 6.1
SSH & Web Terminal, version 9.0
SSH add-on Configuration section, init_commands section:

  - python3 -m pip install catt
  - catt --device my_nest_hub_ip_address set_default
  - catt cast_site 'http://my_ha_ip_address:8123/lovelace/nest-hub?kiosk'

HA automation: Node-RED Inject node, running every 30 seconds, triggering a Call Service node with this data:

{
    "addon": "a0d7b954_ssh",
    "input": "catt cast_site 'http://my_ha_ip_address:8123/lovelace/nest-hub?kiosk'"
}

I dont have that update yet on my Hub, so cant test it. But can you explain what you mean with Ambient mode? Does the screen just Dim? Or does the normal screen of the Hub take over?