b0mbays / continuously_casting_dashboards

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

Dashcast fails after upgrade to 2024.2.1 #45

Closed user34756361233 closed 4 months ago

user34756361233 commented 5 months ago

This morning I upgraded HA to 2024.2.1. After the upgrade the cast did not start as it usually does but is stuck on a screen which asks for input IMG_6887 Had to revert the upgrade and from then everything was back to normal again.

Kind regards

user34756361233 commented 5 months ago

Rebooting as per https://github.com/b0mbays/continuously_casting_dashboards/issues/44 did not help

b0mbays commented 5 months ago

Hi @user34756361233 , I've updated to 2024.2.1 as well as a friend and we're having no issues with casting. Could you update again and post your logs?

To change your logging level for CCD, change the 'logging_level' to 'debug' and then you'll get more logs inside HA's settings. Thanks!

user34756361233 commented 5 months ago

@b0mbays The logging after upgrade (same behaviour on the display):

[core-ssh config]$ tail -f home-assistant.log

2024-02-10 14:49:10.928 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Status output for Nest studeerkamer when checking for dashboard state 'Dummy': Volume: 50
Volume muted: False

2024-02-10 14:49:10.929 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] HA Dashboard (or media) is NOT playing on Nest studeerkamer!
2024-02-10 14:49:10.929 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Casting dashboard to Nest studeerkamer
2024-02-10 14:49:10.931 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Executing stop command...
2024-02-10 14:49:14.490 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Setting volume to 0...
2024-02-10 14:49:16.250 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Executing the dashboard cast command...
2024-02-10 14:49:18.936 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Setting volume to 50...
2024-02-10 14:50:04.962 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Current local time: 14:49:07.294337
2024-02-10 14:50:04.962 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Local time is inside the allowed casting time for Nest logeerkamer. Start time: 07:00:00 - End time: 01:00:00
2024-02-10 14:50:05.744 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Status output for Nest logeerkamer when checking for dashboard state 'Dummy': Volume: 50
Volume muted: False

2024-02-10 14:50:06.466 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Status output for Nest logeerkamer when checking for dashboard state 'Dummy': Volume: 50
Volume muted: False

2024-02-10 14:50:06.466 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] HA Dashboard (or media) is NOT playing on Nest logeerkamer!
2024-02-10 14:50:06.466 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Casting dashboard to Nest logeerkamer
2024-02-10 14:50:06.468 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Executing stop command...
2024-02-10 14:50:08.017 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Setting volume to 0...
2024-02-10 14:50:08.745 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Executing the dashboard cast command...
2024-02-10 14:50:10.012 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Setting volume to 50...
2024-02-10 14:50:55.759 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] All device map: {'Nest studeerkamer': {'instances': [{'dashboard_url': 'http://172.30.2.10:8123/lovelace-rooms/studeerkamer?kiosk', 'dashboard_state_name': 'Dummy', 'media_state_name': 'PLAYING', 'volume': 5, 'start_time': datetime.time(7, 0), 'end_time': datetime.time(1, 0), 'instance_change': False}], 'current_instance': 0}, 'Nest logeerkamer': {'instances': [{'dashboard_url': 'http://172.30.2.10:8123/lovelace-rooms/logeerkamer?kiosk', 'dashboard_state_name': 'Dummy', 'media_state_name': 'PLAYING', 'volume': 5, 'start_time': datetime.time(7, 0), 'end_time': datetime.time(1, 0), 'instance_change': False}], 'current_instance': 0}}
Current device map: {'Nest studeerkamer': {'dashboard_url': 'http://172.30.2.10:8123/lovelace-rooms/studeerkamer?kiosk', 'dashboard_state_name': 'Dummy', 'media_state_name': 'PLAYING', 'volume': 5, 'start_time': datetime.time(7, 0), 'end_time': datetime.time(1, 0), 'instance_change': False}, 'Nest logeerkamer': {'dashboard_url': 'http://172.30.2.10:8123/lovelace-rooms/logeerkamer?kiosk', 'dashboard_state_name': 'Dummy', 'media_state_name': 'PLAYING', 'volume': 5, 'start_time': datetime.time(7, 0), 'end_time': datetime.time(1, 0), 'instance_change': False}}
2024-02-10 14:50:55.759 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Current local time: 14:50:55.759286
2024-02-10 14:50:55.759 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Local time is inside the allowed casting time for Nest studeerkamer. Start time: 07:00:00 - End time: 01:00:00
2024-02-10 14:51:03.179 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Status output for Nest studeerkamer when checking for dashboard state 'Dummy': Volume: 50
Volume muted: False

2024-02-10 14:51:03.179 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] HA Dashboard (or media) is NOT playing on Nest studeerkamer!
2024-02-10 14:51:03.179 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Casting dashboard to Nest studeerkamer
2024-02-10 14:51:03.182 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Executing stop command...
2024-02-10 14:51:06.065 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Setting volume to 0...
2024-02-10 14:51:07.868 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Executing the dashboard cast command...
2024-02-10 14:51:10.082 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Setting volume to 50...
2024-02-10 14:51:56.121 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Current local time: 14:50:55.759286
2024-02-10 14:51:56.121 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Local time is inside the allowed casting time for Nest logeerkamer. Start time: 07:00:00 - End time: 01:00:00
2024-02-10 14:51:56.852 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Status output for Nest logeerkamer when checking for dashboard state 'Dummy': Volume: 50
Volume muted: False

2024-02-10 14:51:57.616 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Status output for Nest logeerkamer when checking for dashboard state 'Dummy': Volume: 50
Volume muted: False

2024-02-10 14:51:57.616 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] HA Dashboard (or media) is NOT playing on Nest logeerkamer!
2024-02-10 14:51:57.616 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Casting dashboard to Nest logeerkamer
2024-02-10 14:51:57.619 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Executing stop command...
2024-02-10 14:51:59.114 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Setting volume to 0...
2024-02-10 14:51:59.873 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Executing the dashboard cast command...
2024-02-10 14:52:01.120 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Setting volume to 50...
2024-02-10 14:52:46.868 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] All device map: {'Nest studeerkamer': {'instances': [{'dashboard_url': 'http://172.30.2.10:8123/lovelace-rooms/studeerkamer?kiosk', 'dashboard_state_name': 'Dummy', 'media_state_name': 'PLAYING', 'volume': 5, 'start_time': datetime.time(7, 0), 'end_time': datetime.time(1, 0), 'instance_change': False}], 'current_instance': 0}, 'Nest logeerkamer': {'instances': [{'dashboard_url': 'http://172.30.2.10:8123/lovelace-rooms/logeerkamer?kiosk', 'dashboard_state_name': 'Dummy', 'media_state_name': 'PLAYING', 'volume': 5, 'start_time': datetime.time(7, 0), 'end_time': datetime.time(1, 0), 'instance_change': False}], 'current_instance': 0}}
Current device map: {'Nest studeerkamer': {'dashboard_url': 'http://172.30.2.10:8123/lovelace-rooms/studeerkamer?kiosk', 'dashboard_state_name': 'Dummy', 'media_state_name': 'PLAYING', 'volume': 5, 'start_time': datetime.time(7, 0), 'end_time': datetime.time(1, 0), 'instance_change': False}, 'Nest logeerkamer': {'dashboard_url': 'http://172.30.2.10:8123/lovelace-rooms/logeerkamer?kiosk', 'dashboard_state_name': 'Dummy', 'media_state_name': 'PLAYING', 'volume': 5, 'start_time': datetime.time(7, 0), 'end_time': datetime.time(1, 0), 'instance_change': False}}
2024-02-10 14:52:46.868 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Current local time: 14:52:46.868541
2024-02-10 14:52:46.868 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Local time is inside the allowed casting time for Nest studeerkamer. Start time: 07:00:00 - End time: 01:00:00
2024-02-10 14:52:48.781 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Status output for Nest studeerkamer when checking for dashboard state 'Dummy': Volume: 50
Volume muted: False

2024-02-10 14:52:50.774 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Status output for Nest studeerkamer when checking for dashboard state 'Dummy': Volume: 50
Volume muted: False

2024-02-10 14:52:50.774 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] HA Dashboard (or media) is NOT playing on Nest studeerkamer!
2024-02-10 14:52:50.774 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Casting dashboard to Nest studeerkamer
2024-02-10 14:52:50.776 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Executing stop command...
2024-02-10 14:52:53.619 DEBUG (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Setting volume to 0...
2024-02-10 14:52:55.439 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Executing the dashboard cast command...
2024-02-10 14:52:57.293 INFO (MainThread) [custom_components.continuously_casting_dashboards.dashboard_caster] Setting volume to 50...
b0mbays commented 5 months ago

Thanks, could you post your config too?

user34756361233 commented 5 months ago

@b0mbays I have a split config, below is the config for CCD

---
  # This handles the loading of my cast dashboards
  #
  # https://github.com/b0mbays/continuously_casting_dashboards
  #
continuously_casting_dashboards:
  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 each device.
  start_time: "07:00" #Optional: Global start time of the casting window (format: "HH:MM") - Default is set to "07:00" and can be individually overwritten per device below.
  end_time: "01:00" #Optional: Global end time of the casting window (format: "HH:MM") and must be after "00:00". Default is set to "01:00" and can be individually overwritten per device below.
  devices:
    "Nest studeerkamer": #Required: Display name of your device. Find this on the actual device's settings or inside the Google Home app.
        - dashboard_url: "http://192.168.1.1:8123/lovelace-rooms/studeerkamer?kiosk" #Required: Dashboard URL to be casted (This must be the local IP address of your HA instance, not homeassistant.local)
          volume: 5 #Optional: Volume to set the display. (If you remove this, the device will remain the same volume)
          start_time: "07:00" #Optional: Set the start time for this device
          end_time: "01:00" #Optional: Set the end time for this device
    "Nest logeerkamer": #Required: Display name of your device. Find this on the actual device's settings or inside the Google Home app.
        - dashboard_url: "http://192.168.1.1:8123/lovelace-rooms/logeerkamer?kiosk" #Required: Dashboard URL to be casted (This must be the local IP address of your HA instance, not homeassistant.local)
          volume: 5 #Optional: Volume to set the display. (If you remove this, the device will remain the same volume)
          start_time: "07:00" #Optional: Set the start time for this device
          end_time: "01:00" #Optional: Set the end time for this device        

https://github.com/b0mbays/continuously_casting_dashboards/assets/16369502/a21076ca-65ed-4378-97e6-8c61bf331282

b0mbays commented 4 months ago

Thanks! Everything looks ok.. could you post your trusted networks section too?

You can blank out the IP addresses if you wish etc but keep the formatting

user34756361233 commented 4 months ago

@b0mbays , see my trusted network section below:

  auth_providers:
    - type: trusted_networks
      trusted_networks:
        - 192.168.1.10/32
        - 192.168.1.11/32
      #  - IP_ADDRESS_3/32
      trusted_users:
        192.168.1.10: xxxxxxxxxxxxxxxxxxxxxxxx
        192.168.1.11: xxxxxxxxxxxxxxxxxxxxxxxxx
      #  IP_ADDRESS_3: DASHBOARD_USER_ID
      allow_bypass_login: true
      # Note that bypass_login only works if one user is authorized
    - type: homeassistant
b0mbays commented 4 months ago

Nothing wrong with any of your config... There must be something happening with the update.

Other than the CCD logs, do you have any other errors/warnings in the logs, any that are to do with pychromecast/dashcast etc? (On the main page for logs, not 'load full logs')

Please post any you find 👍

user34756361233 commented 4 months ago

I am trying to setup a test enviroment to see if I see other things in the logs. Going forth and back on my production machine is taking its toll on the family

user34756361233 commented 4 months ago

I am now looking into the fact that the Nest hub is using a refresh token and with 2024.2.1 things have changed with refresh tokens https://github.com/home-assistant/core/pull/108428. Not sure if it is related but will check if test HA is online if there is a thing with refresh tokens.

b0mbays commented 4 months ago

Maybe try creating a new user and setting that new user up in the trusted network for the hubs?

user34756361233 commented 4 months ago

I ended up changing my password. This also clears all of the refresh tokens. Performed the upgrade again and behold... my Google nests have their dashboard.

b0mbays commented 4 months ago

I ended up changing my password. This also clears all of the refresh tokens. Performed the upgrade again and behold... my Google nests have their dashboard.

That's great news! I'll remember this for any other users who have this issue.