Using CATT

Ok thank you so much!

First the Home Assistant cloud was just more information in case it mattered to the problem.

So, for anyone else having the same issues as mine. I had the lovelace theme on one tablet in the house set to dark mode, everything else was on light mode… in the end, I changed that to home assistant default and then tried the exact set up I had yesterday but this time it didn’t go to the black screen, it just went into the lovelace UI… Not sure why that would make a difference but thank you so much!

1 Like

My Home Assistant 0.112.4 (HassOS 4.11) is installed in a Proxmox VM.

I believe my auth_providers are configured properly because the following executes successfully directly from the SSH & Web Terminal add-on:

catt -d 'Entryway display' cast_site 'https://mysite.duckdns.org/lovelace/0'

I am now implementing the automation suggestion as per Step 3 in Post 127:

- id: '1594505907762'
  alias: CastToGHHMAR
  description: ''
  trigger:
  - minutes: '10'
    platform: time_pattern
  condition: []
  action:
  - data:
      addon: a0d7b954_ssh
      input: catt -d 'Entryway display' cast_site 'https://mysite.duckdns.org/lovelace/0'
    service: hassio.addon_stdin

However, the Entryway display does not react as if it does not receive anything. It does not beep. It does not change what it is displaying. It does not flicker.

I hope someone can provide some assistance.

Solution:
In the configuration of the SSH & Web Terminal add-on, make sure that “share_sessions” is false.

1 Like

Try running the action in developer tools.

Okay, I tried Developer Tools > Services.

Service:
hassio.addon_stdin

Service Data (YAML, optional):
addon: a0d7b954_ssh
input: catt -d ‘Entryway display’ cast_site ‘https://mysite.duckdns.org/lovelace/0

Still no reaction from Entryway display.

Logs? Do they say anything?

Where does this slug come from? a0d7b954_ssh. I know it is in post 127, but what is its origin?

I see you posted logs now.

Here is the log entry again.


Log Details (ERROR)

Logger: pychromecast.socket_client
Source: /usr/local/lib/python3.7/site-packages/pychromecast/socket_client.py:405
First occurred: 6:21:04 PM (1 occurrences)
Last logged: 6:21:04 PM

[Entryway display(192.168.1.xxx):8009] Failed to connect to service Google-Nest-Hub-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx._googlecast._tcp.local., retrying in 5.0s


But I don’t think the log entry is related to the Developer Tools > Services call. It appears to be related to booting the Google Hub.

After booting the Google Hub, the catt call directly from the SSH & Web Terminal add-on succeeds. It fails from automations.yaml or Developer Tools > Services.

I see “a0d7b954_ssh” when looking inside the snapshot. It appears to be how the SSH & Web Terminal add-on is identified.

Solution to Post 187:

In the configuration of the SSH & Web Terminal add-on, make sure that “share_sessions” is false.

Anyone else having trouble using catt status on a google nest hub?
Casting my lovelace cards works great using my local IP, but I have no way to test if the cast is active.

  1. When casting from catt is running i see all empty/unknown fields for catt status (see below).
  2. When I use catt stop to end cast I get a nonzero return code (Error: Chromecast is inactive) from catt status
  3. When casting stops due to hub timeout or if dismissed at the device the catt status still returns the empty/unknown results below.
  4. When casting from Chrome, catt status returns PLAYING status, then returns the Error: Chromecast is inactive when cancelled.

Basically I can’t find a way to differentiate between the “actively casting” state and the “user dismissed”/“timeout” condition, since all three return the same status below.

catt status output:

current_time: 0
content_id: None
content_type: None
duration: None
stream_type: UNKNOWN
idle_reason: None
media_session_id: None
playback_rate: 1
player_state: UNKNOWN
supported_media_commands: 0
volume_level: 0.0
volume_muted: False
media_custom_data: {}
media_metadata: {}
subtitle_tracks: {}
current_subtitle_tracks: []
last_updated: None
is_active_input: False
is_stand_by: True
app_id: 84912283
display_name: DashCast

I dont have that kind of output when I use status. What is the exact command you are using?

Im my case, when I use

catt -d "Living Room display" status

I get
Volume 0

or

Title: Song title
State: PLAYING
Volume: 10

If something is playing.

I see your display is called DashCast, did you try using
catt -d "DashCast" status?

update: DashCast is not your display. Use

CATT scan

to see the name of your display, then use that name in the status command

ooop! I meant catt info not catt status.
But to answer your question, I only have the one cast device so I get the same results with and without the -d <device> option.
My display is not called “DashCast” that is the name of the program running (catt uses DashCast for cast_site).
For the record, catt status exhibits the same behavior described above but with fewer outputs.
When running catt cast_site or when dismissed/timeout:

Volume: 0

When nothing is running:

Error: Chromecast is inactive.

When playing youtube via catt cast or from chrome:

State: PLAYING
Volume: 0

Sorry i am a bit confused now what the results are from your commands and what the issue is. For me the command “catt status” or “catt info” both return “Error: Chromecast is inactive.” I have no idea how you got that long output list.

For me this has worked perfectly:

if ! catt -d "Living Room display" status | grep 'PLAYING'; then 
    catt -d "Living Room display" volume 0
    catt -d "Living Room display" cast_site http://192.168.178.87:8123/lovelace-test/0
fi

Which version of CATT are you using and do you add the -d in the command? I am using “catt v0.11.2, Yearning Yachtman”

Which version of CATT are you using and do you add the -d in the command?

  • Version: catt v0.11.2, Yearning Yachtman.

  • Again, the -d command doesn’t make a difference (as previously stated), and I’ve tested with and without pretty extensively.

I have no idea how you got that long output list.

Try running catt info while the stream is running to see the full output. You should only see “Error: Chromecast is inactive.” when the chromecast is inactive. Read the script you pasted, it will only prevent the call to cast_site if the status return code is 0 (non-error) and contains the string “PLAYING”.

Sorry i am a bit confused now what the results are from your commands and what the issue is

I listed the conditions and the outputs above, the issue is:

  1. When running via catt cast_site the information returned from catt info and catt status does not show the device is “PLAYING”

  2. When the Nest Hub automatically dismisses the cast session, or when the user dismisses it (by swipping it away) the information returned from catt status and catt info remain the same.

My question was: Has anyone seen this behavior on a Nest Hub before?

i tried playing and casting all kind of stuff now on my Hub

But in ALL cases “catt status” and “catt info” always return “Error: Chromecast is inactive.” So i dont think you should use CATT without the “-d [displayname]” part. I also just have 1 HUB running, but using CATT without “-d [displayname]” seems to default to a non existing chromecast.

Did find something new, if i use
catt -d "Living Room display" status
i get a short description AND with

catt -d "Living Room display" info
indeed shows the long list

Hi,

Does anyone use a Amazone Echo Show? I want to buy a echo show 5 but cant find if Catt will support it.

It has amazone cast but is that the same as google cast?

Is this still a thingy ?

Yes, as of 1 or 2 days ago.

Yeah, just got one delivered and seeing the same issue/feature.
Guess I’m going to put it in the box and send it back for a refund.

I rather not want to initiate the cast every x minutes.