Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Cast Integration doesn't detect paused state when cast from HA #70836

Open
chrisjenx opened this issue Apr 26, 2022 · 24 comments
Open

Google Cast Integration doesn't detect paused state when cast from HA #70836

chrisjenx opened this issue Apr 26, 2022 · 24 comments
Assignees

Comments

@chrisjenx
Copy link

chrisjenx commented Apr 26, 2022

The problem

HomeAssistant doesn't detect when something cast to a Google Nest Hub (gen 2) as paused when initiated from Home Assistant.

Replicate:

  • Cast dashboard to screen
  • Media State updates to playing (correct)
  • Swipe away dashboard, still "playing" (should be "paused")

Expected behavior:

  • Cast youtube/etc to device from phone/etc
  • Media state updates to playing (correct)
  • Swipe content away on screen, media state updates to "paused", (correct)

Not sure why but when casting from HA, it doesn't detect paused state (see screenshot) - is this intended behavior?
I attached the affected script I'm using, but affects anything else that is relying on state not being "playing" when it's not.

image

What version of Home Assistant Core has the issue?

core-2022.4.7

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Google Cast

Link to integration documentation on our website

https://www.home-assistant.io/integrations/cast/

Diagnostics information

No response

Example YAML snippet

trigger:
  - platform: state
    entity_id: media_player.nesthub51a4
    to: 'off'
    for: '00:00:20'
  - platform: state
    entity_id: media_player.nesthub51a4
    to: paused
    for: '00:00:20'
  - platform: time_pattern
    minutes: /9
  - platform: time_pattern
    minutes: '0'
action:
  - choose:
      - conditions:
          - condition: or
            conditions:
              - condition: state
                entity_id: media_player.nesthub51a4
                state: 'off'
              - condition: state
                entity_id: media_player.nesthub51a4
                state: paused
                for: '00:00:20'
        sequence:
          - service: media_player.volume_mute
            data:
              is_volume_muted: true
              entity_id: media_player.nesthub51a4
          - service: media_player.turn_off
            data:
              entity_id: media_player.nesthub51a4
          - delay:
              seconds: 2
          - service: media_player.turn_on
            data:
              entity_id: media_player.nesthub51a4
          - service: cast.show_lovelace_view
            data:
              view_path: dining-room
              dashboard_path: lovelace
              entity_id: media_player.nesthub51a4
          - service: cast.show_lovelace_view
            data:
              view_path: dining-room
              dashboard_path: lovelace
              entity_id: media_player.nesthub51a4
          - delay:
              seconds: 10
          - service: media_player.volume_mute
            data:
              is_volume_muted: false
              entity_id: media_player.nesthub51a4
id: '1650506777972'
alias: Cast Dashboard to Dining Room Nest
description: ''

Anything in the logs that might be useful for us?

ha.logs.log

Additional information

No response

@probot-home-assistant
Copy link

cast documentation
cast source
(message by IssueLinks)

@probot-home-assistant
Copy link

Hey there @emontnemery, mind taking a look at this issue as it has been labeled with an integration (cast) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@chrisjenx
Copy link
Author

Let me know if there's anything you want me to test/try

@emontnemery
Copy link
Contributor

Home Assistant relies on the chrome cast device signalling that it's been paused.

Please enable the logs below, then share a log file where the problem is reproduced.

logger:        
  default: info
  logs:
     homeassistant.components.cast: debug             
     homeassistant.components.cast.media_player: debug
     pychromecast: debug                              
     pychromecast.dial: debug                         
     pychromecast.discovery: info                     
     pychromecast.controllers.media: debug            
     pychromecast.socket_client: debug                
     homeassistant.components.zeroconf: debug         
     zeroconf: info                                   

@chrisjenx
Copy link
Author

Added log to initial ticket, although can't see any media status for any of the cast devices, just CONNECTING/CONNECTED?

The device in question is media_player.nesthub51a4 I grabbed the logs after swiping off, "pausing", the HA Dashboard Cast to the Nest Hub.

I can try and grab another log when streaming from a different source? Or when actually dismissing the cast completely?

@chrisjenx
Copy link
Author

Just to throw more weirdness into the mix. Here's me manually streaming my cameras to the device from home assistant. The stream while choppy does work and play. But as you can see home assistant thinks it's paused

CDC0A461-7D42-486E-8848-E78A63A32579
E35D1675-E146-4F86-A655-122338E16C04

@chrisjenx
Copy link
Author

Here's YouTube from my phone. So home assistant is for sure getting state updates, very fast infact.

I'm wondering if the home assistant cast implementation is off? Trying to think of other experiments to do.

54A3BB18-AC3C-482E-9E52-DD2EA33EF299
F78B0671-4958-418B-8192-5B0155357E98
E126D361-53DB-4155-AFC5-E304BD70A7B5

@DanDixon
Copy link

DanDixon commented Jun 4, 2022

I have a Google Nest Hub v2 and can confirm that Home Assistant does not show the cast Lovelace/dashboard as paused when you swipe away.

@bartbakels
Copy link

not sure if related but i see more differences between v1 and v2, streaming (rtsp) cameras via lovelace is only working on V1s and not V2s

@chrisjenx
Copy link
Author

Bump, @emontnemery if you need a Nest to test I'm happy to send you one.

@chrisjenx
Copy link
Author

Also from what I understand, this uses the Cloud service to cast to these devices, is there a way to test casting directly from HA?

@chrisjenx
Copy link
Author

Just tested this with a Google Hub Max, same issue. Not sure what other info you guys need?

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@chrisjenx
Copy link
Author

This is still very much an issue

@github-actions github-actions bot removed the stale label Feb 27, 2023
@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@chrisjenx
Copy link
Author

This is still an issue

@DanDixon
Copy link

Agreed that this is still an issue. If this worked it would be so much easier to make the dashboards more reliable.

@chrisjenx
Copy link
Author

This has gotten better for me. I need to check if HA is getting state updates for me now.

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@harshithmohan
Copy link

This is still an issue on the latest version

@wmoss
Copy link

wmoss commented Nov 11, 2023

Confirming I'm still seeing this issue as well.

@emontnemery I added the log lines you suggested above and when I dismiss the UI on the screen, nothing shows up in the logs. Interestingly, even after the UI has been dismissed, the regular discovery log lines appear to show it still casting,

2023-11-11 09:29:54.210 DEBUG (MainThread) [homeassistant.components.zeroconf] Discovered new device google-nest-hub-<snip>._googlecast._tcp.local. ZeroconfServiceInfo(...<snip>... properties={'rs': 'Casting: Home: Thermostats', ...<snip>... })

Happy to provide more detailed log lines or anything else that might help debug.

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@harshithmohan
Copy link

Not fixed yet.

@harshithmohan
Copy link

harshithmohan commented Mar 19, 2024

Seems to be fixed as of 2024.3.1. Can anyone else confirm?
EDIT: Nope. I was just being stupid 🤦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants