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 home mini stays in 'playing' state after playing 1 second sound for more or less 5 minutes #62007

Closed
majkers opened this issue Dec 16, 2021 · 11 comments · Fixed by #62390
Assignees

Comments

@majkers
Copy link

majkers commented Dec 16, 2021

The problem

Because of situation described in https://community.home-assistant.io/t/i-did-it-i-defeated-the-horrible-google-home-cast-start-prompt-sound/36123/74 I wrote an automation to play 1 second lasting sound every 2 minutes. Everything was working fine till 2012.12.2 version. Now after playing this short sound my google home mini stays in 'playing' state for more or less 5 minutes so my autmation is being fired after 6 minutes and I hear google prompt sound again.
Firing media_player.media_stop is not working. Seems like there is no 'idle' state for google home media player like it used to be before.

What version of Home Assistant Core has the issue?

2021.12.2

What was the last working version of Home Assistant Core?

2021.11

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Media player, Cast

Link to integration documentation on our website

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

Example YAML snippet

- alias: 'Stop google idle'
  id: stop_google_idle
  trigger:
  - platform: time_pattern
    minutes: '/2'
  condition:
    condition: and
    conditions:
      - condition: not
        conditions:
        - condition: state
          entity_id: media_player.google_home
          state: 'playing'
      - condition: or
        conditions:
        - condition: state
          entity_id: media_player.google_home
          state: 'off'
        - condition: state
          entity_id: media_player.google_home
          state: idle
  action:
  - service: media_player.play_media
    data:
      media_content_id: 'http://192.168.1.XXX:8123/local/sounds/1sec.mp3'
      media_content_type: music
      entity_id: media_player.google_home
  - delay: '00:00:05'    
  - condition: numeric_state
    entity_id: media_player.google_home
    attribute: volume_level
    below: '0.1'   
  - service: media_player.volume_set
    data:
      entity_id: media_player.google_home
      volume_level: '0.4'       
  mode: single

Anything in the logs that might be useful for us?

Logger: pychromecast.controllers
Source: /usr/local/lib/python3.9/site-packages/pychromecast/controllers/media.py:364
First occurred: 07:35:06 (10 occurrences)
Last logged: 08:37:34

STOP command requested but no session is active.
PAUSE command requested but no session is active.

Additional information

No response

@probot-home-assistant
Copy link

media_player documentation
media_player source
(message by IssueLinks)

@majkers
Copy link
Author

majkers commented Dec 16, 2021

Seems like google home mini do not return to 'idle' state after playing any sound so it statys in 'playing' and then turn to 'off' after 5 minutes

@Rockman18
Copy link

Rockman18 commented Dec 16, 2021

Same for me, after playing a tts sound on my google home, i'm waiting until the state is leaving "playing" before turning the google home off. But since the last update my scenario is stuck for 5 minutes.

How to know the sound/tts speach is fully played ?

@crispywisp
Copy link

I thought my Google speaker was the problem. I only noticed this problem this morning after updating to the latest home assistant version core-2021.12.3? So is this an issue with the latest version? If so, I'm thinking of rolling back to previous version tomorrow.

I had to redo some automations because most are dependent to the "idle" state to proceed to the next step. Using timeout is a workaround, but it's not as great as using wait for trigger idle.

@ervwalter
Copy link

Based on comments in #62054, I suspect this is an issue with the cast integration. It sounds like a new method was used to send to google cast devices in 12.2.

@emontnemery, does that seem plausible?

@DanDon
Copy link

DanDon commented Dec 19, 2021

You need to add the cast integration label to this item ... not media_player.

This issue is due to the changes in the cast integration and the update has broken a few things.

@emontnemery is probably the best person for this

I also logged this issue in this thread ... #61846

@crispywisp
Copy link

You need to add the cast integration label to this item ... not media_player.

This issue is due to the changes in the cast integration and the update has broken a few things.

@emontnemery is probably the best person for this

I also logged this issue in this thread ... #61846

Sorry. Cast Integration label?

@b1nuzz
Copy link

b1nuzz commented Dec 19, 2021

Add the ‘cast’ label to this ticket as that seems to be the route of the problem.

@majkers
Copy link
Author

majkers commented Dec 19, 2021

I added cast the label to the issue

@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)

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

Successfully merging a pull request may close this issue.

7 participants