b0mbays / continuously_casting_dashboards

HACS Integration for continuously casting a Home Assistant dashboard to your Google Chromecast Displays
MIT License
186 stars 9 forks source link

is CATT included or do I need to install it first? #4

Closed cozarkd closed 1 year ago

cozarkd commented 1 year ago

Hi,

I was reading the requeriments and I thought that CATT was included in your project but I can't see anything working. Should I install it manually? I'm running HA in a TrueCharts chart in Truenas scale.

Thanks, If this works would be what I was looking for days.

b0mbays commented 1 year ago

Hi, yes CATT will be installed automatically when you install the integration. If you have installed this and have all the requirements we can look into why it's not working for you.

Can you enable debug logging by changing the log_level inside the configuration.yaml (inside the continuous casting dashboards section) to 'debug' and then post any relevant logs here after letting it run for a few minutes after a home assistant restart?

Could you also post the same section from your configuration.yaml file here so I can look for any obvious issues.

Thanks!

cozarkd commented 1 year ago

Sure, I'll add a few lines before to check hierarchy.

Edit: Oh, with debug I can see: Error: Specified device "Google Hub" not found. Edit2: So I should take the name from the device settings, not device settings inside HA, right? I tried with that name and keeps saying that it can't be found.

I'm editing because I didn't thought about debug in the console before and it's helping me.

ty

binary_sensor:
  - platform: ping
    name: Internet
    host: 8.8.8.8
    scan_interval: 15

homeassistant:
# Note that this section is a subset of homeassistant: and is not tabbed all the way to the left like other things in configuration.yaml
  auth_providers:
    - type: trusted_networks
      trusted_networks:
        - 192.168.1.0/24 #to not lose access from local devices (not sure if the best way)
        - 192.168.1.11/32 # my google hub
      trusted_users:
        192.168.1.11: ecb214ecXXXXXXXXXX7cb48ac9056d0

      allow_bypass_login: true
      # Note that bypass_login only works if one user is authorized
    - type: homeassistant

ha-continuous-casting-dashboard:
  logging_level: debug #Required: Set the logging level - debug/info/warning (default is 'warning' - try 'debug' for debugging)
  cast_delay: 45 #Required: Time (in seconds) for casting checks between devices
  start_time: "08:30" #Required: Start time of the casting window (format: "HH:MM")
  end_time: "02:00" #Required: End time of the casting window (format: "HH:MM") and must be after "00:00"
  devices:
    "Google Hub": #Required: Display name of your device. Find this under device settings -> Information -> Device Name
        dashboard_url: "https://ha.mydomain.com.es/dwains-dashboard/home" #Required: Dashboard URL to be casted
cozarkd commented 1 year ago

So I tried to change the name in the Google Nest Hub to avoid weird characters. Keeps saying that can't find device.

But the volume is updating to 5 sometimes, weird...

Not sure what to try now, I restarted HA and disconnected Google Nest Hub and connected again.

2023-03-31 11:48:20.665732+00:002023-03-31 13:48:20.665 INFO (MainThread) [custom_components.ha-continuous-casting-dashboard.dashboard_caster] Executing the dashboard cast command...
2023-03-31 11:48:26.027377+00:00Error: Specified device "Google Hub" not found.
2023-03-31 11:48:26.182984+00:002023-03-31 13:48:26.182 INFO (MainThread) [custom_components.ha-continuous-casting-dashboard.dashboard_caster] Setting volume back to 5...
2023-03-31 11:48:31.610263+00:00Error: Specified device "Google Hub" not found.

Update again: Suddenly, without doing anything extra, DashCast appeared on the screen. Stuck there and logs say again that can't find the device name.

b0mbays commented 1 year ago

Can you post the configuration you have for the integration inside the ha-continuous-casting-dashboardsection?

Ignore the above. Just seen your other comment 👍

b0mbays commented 1 year ago

OK, your config looks good other than the dashboard url should be your local IP for your Home Assitant instance. For example, mine is: 192.168.12.104 rather than the URL to your externally hosted HA instance.

We can do some testing with CATT to see if your devices are accessibile over your network from Home Assistant, open up the 'Terminal and SSH' for Home Assistant (or any other way that you use a terminal within Home Assistant)

And try the command:

catt scan

And then post the output of that here? It should show any Chromecast devices on your network.

cozarkd commented 1 year ago

well, I have a problem I guess. I'm using a dns resolver locally so that's my local URL too but I can't change DNSs on my router and I guess I can't on the device manually. So, if I expose the IP too, then I guess I can't use my SSL certificate... I'll try just in case.

About the terminal I'm not sure how to do it because I don't have access to HA apps. I'll ask in the Truecharts community about that because it seems I don't have catt in the terminal I use.

I'll post back.

b0mbays commented 1 year ago

Ah right okay, sorry I am not familiar with Truecharts at all! I have my Home Assistant instance running on a spare Windows laptop inside a linux virtual environment so it's simple enough networking.

The terminal you do have access to, is it the HA terminal? If it is you can try 'login' which should take you inside the linux terminal from which where the 'catt' command should then work 👍

cozarkd commented 1 year ago

Yes, that's it. I just needed to "login" first. But... my HA user doesn't seem to work. I'm trying with the Owner user I use inside Home Assistant dashboard. Should I use a different user?

And I think I managed to change the DNS on the router, not sure if the Google Hub will get it tho. Maybe I have to do a factory reset or wait to the Google Hub DNS to update after a while.

b0mbays commented 1 year ago

Can you post a screenshot of this terminal you are using? Mine doesn't ask for any users/passwords when logging in with the terminal. I'm thinking it might be different if you are using a truenas setup..

cozarkd commented 1 year ago

I'm waiting for the community to tell me something about this. I'm confused, I can't use the truenas user neither home assistant user... Captura de pantalla 2023-03-31 a las 16 10 27

b0mbays commented 1 year ago

Hey, did you get anywhere with this?

klasenby commented 1 year ago

Hey, did you get anywhere with this?

Adding some of my experience running HA and this integration in Docker on my Synology NAS, sounds similar to Truenas.

I had already installed catt in the HA docker instance and used it to cast a website as a test (catt -d "ip address" cast_site http://www.google.com) "Catt scan" doesn't return anything, I'm not sure why, possibly because of the NAT config of the docker container I have to cast to the IP address of the Google Hub, then it works fine. I have DHCP reservations setup for all my hubs so I know their IP.

cozarkd commented 1 year ago

Sorry, I was fixing other things on my NAS and tbh, partying.

I didn't manage to solve the "login" part of the HA terminal so I don't know how to follow up.

I have DHCP reservation too so maybe I can try with the IP. Can I use IP on continuously_casting_dashboards config?

b0mbays commented 1 year ago

Hey @cozarkd, yes you can use the IP instead of the name inside the config for the integration 👍

cozarkd commented 1 year ago

Well, I changed to IP and google.com (as dashboard) cast works perfect now.

But, for some reason, I can't use the dashboard url. My Home Assistant is reachable through internet tho...

I get DashCast splash screen and gets stuck there.

b0mbays commented 1 year ago

That is odd. So you can access it fine on your home network.. But your cast doesn't like it. Is Home Assistant accessible by a direct IP on your home network? Check your router and see if you can see it anywhere?

@klasenby If you are using a similiar setup, do you use a direct IP address for the dashboard URL in the config?

klasenby commented 1 year ago

I do use a local IP address for the dashboard url, its the IP address of my NAS.

172.16.x.x is the IP range for Docker running on the NAS: image

10.30.0.10 is the IP address of my NAS that hosts the Docker images behind a NAT, port 8123 is passed through to the HA Docker container: image

dashboard_url: "http://**10.30.0.10:8123**/lovelace/default_view?kiosk"

cozarkd commented 1 year ago

My setup is something like this:

Global:

LAN:

Internet:

So the local address and Public address is the same, I double checked with friends devices that the public URL is accessible without any device DNS configuration.

Is it ok to send a http url instead of https to the Hub? I could access locally with ip:port but then I don't have a SSL connection. If that's a must for this to work I need to use the public domain and Google Hub would go through Cloudflare first because I think I can't change DNS on the Google Hub or router.

klasenby commented 1 year ago

On your phone, can you get to this URL?

http://192.168.1.60:8123/lovelace/default_view

If you can, then use that to cast to your hub.

cozarkd commented 1 year ago

Nice! It's working now. I was thinking all the time that I needed https.

Thanks for your help @b0mbays and @klasenby .

b0mbays commented 1 year ago

Amazing! Thank you @klasenby for stepping in to help. You only need some form of https setup for Home Assistant to allow you to cast things. But yeah you don't actually need to use that for casting 😄

Closing this issue now, if you have any issues or ideas for features raise a new issue 👍