question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pychromecast.socket_client heartbeat timeout, resetting connection and other errors

See original GitHub issue

The problem

All google home devices on the home network are systematically registering logging entry WARNING messages about timing out on the heartbeat. We have about 10 devices on the network and every one of them is doing it. We have google home mini’s, max, home hub, original google home.

Another interesting thing happens when i try to turn on one of the google home devices in home assistant. When i push the power button on say a google home mini, i get this message:

2021-08-12 11:03:04 ERROR (Thread-12) [homeassistant.components.cast.media_player] Failed to cast media https://www.home-assistant.io/images/cast/splash.png. Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address

Which is weird because its trying to cast a PNG image to a google home mini device. Almost seems like its identifying the devices as the wrong model. I tried turning on another google home mini, same error message.

What is version of Home Assistant Core has the issue?

core-2021.8.6

What was the last working version of Home Assistant Core?

unknown

What type of installation are you running?

Home Assistant Core

Integration causing the issue

Google Cast

Link to integration documentation on our website

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

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2021-08-12 12:09:44 WARNING (Thread-21) [pychromecast.socket_client] [Kitchen Hub(192.168.1.116):8009] Heartbeat timeout, resetting connection
2021-08-12 12:11:23 WARNING (Thread-21) [pychromecast.socket_client] [Kitchen Hub(192.168.1.116):8009] Heartbeat timeout, resetting connection
2021-08-12 12:13:03 WARNING (Thread-21) [pychromecast.socket_client] [Kitchen Hub(192.168.1.116):8009] Heartbeat timeout, resetting connection
2021-08-12 12:13:26 WARNING (Thread-21) [pychromecast.socket_client] [Kitchen Hub(192.168.1.116):8009] Heartbeat timeout, resetting connection
2021-08-12 12:14:09 WARNING (Thread-21) [pychromecast.socket_client] [Kitchen Hub(192.168.1.116):8009] Heartbeat timeout, resetting connection
2021-08-12 12:14:11 ERROR (Thread-32) [homeassistant.components.cast.media_player] Failed to cast media https://www.home-assistant.io/images/cast/splash.png. Please ma
ke sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address
2021-08-12 12:14:32 WARNING (Thread-21) [pychromecast.socket_client] [Kitchen Hub(192.168.1.116):8009] Heartbeat timeout, resetting connection


### Additional information

_No response_

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:25 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
mrdanbosticcommented, Apr 22, 2022

I tried to research my error here before coming to post here. Apologies if this was previously covered. Just installed a fresh install of HASS OS on an rpi4. . Have been testing the Google Cast integration & all tested media plays perfecly (mp3 audio files, casting using the Spotify integration, and YouTube). Speaker group playing works & end point media controls work as well. Have tested with a Nest Hub, a few Google minis, Chromecast, Android TV and TCL Smart TV. Even got the tts speech to work quite well. All changes to volume, channel, media, on the cast receiving device instantly reflect back in the entity properties. But when idle, this timeout error has been piling up.

2022-04-22 02:40:45 WARNING (Thread-10) [pychromecast.socket_client] [Bathroom Speaker(192.168.1.192):8009] Heartbeat timeout, resetting connection 2022-04-22 02:40:52 ERROR (Thread-10) [pychromecast.socket_client] [Bathroom Speaker(192.168.1.192):8009] Failed to connect to service ServiceInfo(type=‘host’, data=(‘192.168.1.192’, 8009)), retrying in 5.0s

Thanks much to all in advance

2reactions
ThatTallGuy21commented, Apr 15, 2022

I’m on 2022.4.3 and am experiencing the same warning and errors as above. Is anyone still experiencing this? I have probably a dozen Google Nest smart speakers, displays, chromecasts, and chromecast audios all giving the same warning and errors. Going to attempt to delete and setup the integration again to see if that resolves it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Google Cast devices generating errors each night
The fix has made it so when the heartbeat goes out on one cast device HA now reconnects to it. That's why you...
Read more >
python/1153/pychromecast/pychromecast/socket_client.py
may return a different port number so we need to use that. ... self .logger.warning( "Heartbeat timeout, resetting connection" ). reset = True....
Read more >
Devices keeps disconnecting : r/homeassistant - Reddit
My Apple Tv keeps changing from "off" to "idle". ... Speaker:8009] Heartbeat timeout, resetting connection 2019-03-31 01:23:47 ERROR ...
Read more >
Developing a Python plugin - Domoticz
Link to the plugin usage documentation on the Domoticz wiki. ... Numeric field where 0 (false) is not timed out and other value...
Read more >
PyChromecast - PyPI
Library for Python 3.6+ to communicate with the Google Chromecast. It currently supports: Auto discovering connected Chromecasts on the network.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found