b0mbays / continuously_casting_dashboards

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

Casting starts then instantly stops #37

Closed louispires closed 10 months ago

louispires commented 11 months ago

So I have looked at old issues, gone through all the steps multiple times, but for some reason it just does not work for me.

Using a Google Hub

Here is a video of what happens, pretty straight forward

Here is my device info: image

I have double checked the ha-catt-fix: image

Here is my continuously_casting_dashboards config:

continuously_casting_dashboards:
  logging_level: debug 
  cast_delay: 45 
  start_time: "07:00" 
  end_time: "01:00" 
  devices:
    "Kitchen display": 
      dashboard_url: "https://10.0.0.247/lovelace/homepage?kiosk" 

One thing to note, I have changed my port to be 443 instead of 8123

Here is my httpconfig:

http:
  server_port: 443
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem
  use_x_forwarded_for: true
  trusted_proxies:
    - 10.0.0.0/24
    - 10.253.0.0/24
    - 10.10.10.0/24
  ip_ban_enabled: true
  login_attempts_threshold: 5

Here is my homeassistantconfig:

homeassistant:
  country: ZA
  packages: !include_dir_named packages
  name: Home
  customize: !include customize.yaml
  auth_providers:
    - type: trusted_networks
      trusted_networks:
        - 10.0.0.0/24
        - 10.253.0.0/24
        - 10.10.10.0/24
      trusted_users:
        10.0.0.91: !secret my_user_id
      allow_bypass_login: true
    - type: homeassistant
  external_url: !secret external_url

Then lastly, here are my logs:

2023-10-18 18:41:07.837 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Current local time: 18:41:07.837409 2023-10-18 18:41:07.837 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Local time is inside the allowed casting time for Kitchen display. Start time: 07:00:00 - End time: 01:00:00 2023-10-18 18:41:08.349 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Status output for Kitchen display when checking for dashboard state 'Dummy': Volume: 5 2023-10-18 18:41:08.896 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Status output for Kitchen display when checking for dashboard state 'Dummy': Volume: 5 2023-10-18 18:41:08.896 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] HA Dashboard (or media) is NOT playing on Kitchen display! 2023-10-18 18:41:08.896 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Casting dashboard to Kitchen display 2023-10-18 18:41:08.897 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Executing stop command... 2023-10-18 18:41:09.919 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Setting volume to 0... 2023-10-18 18:41:10.407 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Executing the dashboard cast command... 2023-10-18 18:41:11.521 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Setting volume to 5... 2023-10-18 18:41:56.992 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Current local time: 18:41:56.992410 2023-10-18 18:41:56.992 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Local time is inside the allowed casting time for Kitchen display. Start time: 07:00:00 - End time: 01:00:00 2023-10-18 18:41:57.483 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Status output for Kitchen display when checking for dashboard state 'Dummy': Volume: 5 2023-10-18 18:41:58.043 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Status output for Kitchen display when checking for dashboard state 'Dummy': Volume: 5 2023-10-18 18:41:58.043 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] HA Dashboard (or media) is NOT playing on Kitchen display! 2023-10-18 18:41:58.043 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Casting dashboard to Kitchen display 2023-10-18 18:41:58.044 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Executing stop command... 2023-10-18 18:41:59.005 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Setting volume to 0... 2023-10-18 18:41:59.519 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Executing the dashboard cast command... 2023-10-18 18:42:00.935 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Setting volume to 5... 2023-10-18 18:42:46.482 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Current local time: 18:42:46.482088 2023-10-18 18:42:46.482 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Local time is inside the allowed casting time for Kitchen display. Start time: 07:00:00 - End time: 01:00:00 2023-10-18 18:42:47.021 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Status output for Kitchen display when checking for dashboard state 'Dummy': Volume: 5 2023-10-18 18:42:47.527 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Status output for Kitchen display when checking for dashboard state 'Dummy': Volume: 5 2023-10-18 18:42:47.527 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] HA Dashboard (or media) is NOT playing on Kitchen display! 2023-10-18 18:42:47.527 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Casting dashboard to Kitchen display 2023-10-18 18:42:47.529 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Executing stop command... 2023-10-18 18:42:48.550 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Setting volume to 0... 2023-10-18 18:42:49.051 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Executing the dashboard cast command... 2023-10-18 18:42:50.634 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Setting volume to 5...

Any ideas on what could be causing this and how I could get this to work on my environment?

Thank you so much

panhans commented 10 months ago

Same here. I think it has something todo with local https usage since the certificate is not installed on the cast device.

b0mbays commented 10 months ago

Hey @louispires apologies about the late reply to this. Are you still experiencing the same issue?

I think @panhans is onto something, Instead of using 'https' for your URL in your configuration can you try 'http' instead?

panhans commented 10 months ago

I have to disable https first. HTTP is blocked in my setup.

Can't access the google admin console for some reason. As I read there I would be able to install my self signed certificates for managed devices like nest hub. This would be my favorite solution.

louispires commented 10 months ago

I also have HTTP blocked from my side, thus I am unable to change to HTTP.

panhans commented 10 months ago

When set it to http nothing happens. But I am using an reverse proxy and in my local network I directly link the domain to my local ip. Casting works but the auto login doesn't work with this setup. When using https the connection gets canceled immediately.

So imho there are two options. Installing certificates on the nest hub somehow or switching back to http for local access.

b0mbays commented 10 months ago

Closing this ticket for now. Unfortunately it looks like the only solution would be to get http for local access working.