Chromecast errors everyday during the night

Hi,
I get these errors in my log every night about my Chromecast. Is this something wrong with my config, or is it nothing to worry about? Is it fixable, or not necessary to fix?

Cheers

The following errors have been logged this session:

16-04-22 03:29:39 pychromecast.socket_client: Heartbeat timeout, resetting connection
16-04-22 03:29:42 pychromecast.socket_client: Failed to connect, retrying in 5.000000s
Traceback (most recent call last):
  File "/home/pi/.homeassistant/deps/pychromecast/socket_client.py", line 233, in initialize_connection
    self.socket.connect((self.host, self.port))
  File "/usr/lib/python3.4/ssl.py", line 840, in connect
    self._real_connect(addr, False)
  File "/usr/lib/python3.4/ssl.py", line 827, in _real_connect
    socket.connect(self, addr)
ConnectionRefusedError: [Errno 111] Connection refused
16-04-22 16:32:31 pychromecast.socket_client: Heartbeat timeout, resetting connection
16-04-22 16:33:02 pychromecast.socket_client: Failed to connect, retrying in 5.000000s
Traceback (most recent call last):
  File "/home/pi/.homeassistant/deps/pychromecast/socket_client.py", line 233, in initialize_connection
    self.socket.connect((self.host, self.port))
  File "/usr/lib/python3.4/ssl.py", line 840, in connect
    self._real_connect(addr, False)
  File "/usr/lib/python3.4/ssl.py", line 827, in _real_connect
    socket.connect(self, addr)
socket.timeout: timed out
16-04-22 16:47:15 pychromecast.socket_client: Heartbeat timeout, resetting connection
16-04-22 16:47:33 pychromecast.socket_client: Failed to connect, retrying in 5.000000s
Traceback (most recent call last):
  File "/home/pi/.homeassistant/deps/pychromecast/socket_client.py", line 233, in initialize_connection
    self.socket.connect((self.host, self.port))
  File "/usr/lib/python3.4/ssl.py", line 840, in connect
    self._real_connect(addr, False)
  File "/usr/lib/python3.4/ssl.py", line 827, in _real_connect
    socket.connect(self, addr)
OSError: [Errno 113] No route to host
16-04-22 17:58:10 pychromecast.socket_client: Heartbeat timeout, resetting connection
16-04-22 17:58:28 pychromecast.socket_client: Failed to connect, retrying in 5.000000s
Traceback (most recent call last):
  File "/home/pi/.homeassistant/deps/pychromecast/socket_client.py", line 233, in initialize_connection
    self.socket.connect((self.host, self.port))
  File "/usr/lib/python3.4/ssl.py", line 840, in connect
    self._real_connect(addr, False)
  File "/usr/lib/python3.4/ssl.py", line 827, in _real_connect
    socket.connect(self, addr)
OSError: [Errno 113] No route to host
1 Like

I’m starting to get this too.

pychromecast.socket_client: Heartbeat timeout, resetting connection

Any ideas?

I’m getting the same issue randomly (usually within 1-2 days from a reboot)… Running the latest version of HASS with a rPi 2. I get the following error code:

16-08-12 02:08:07 pychromecast.socket_client: Heartbeat timeout, resetting connection 16-08-12 02:08:07 pychromecast.socket_client: Heartbeat timeout, resetting connection 16-08-12 02:08:10 pychromecast.socket_client: Failed to connect, retrying in 5.000000s Traceback (most recent call last): File "/home/hass/.homeassistant/deps/pychromecast/socket_client.py", line 233, in initialize_connection self.socket.connect((self.host, self.port)) File "/usr/lib/python3.4/ssl.py", line 840, in connect self._real_connect(addr, False) File "/usr/lib/python3.4/ssl.py", line 827, in _real_connect socket.connect(self, addr) ConnectionRefusedError: [Errno 111] Connection refused 16-08-12 02:08:10 pychromecast.socket_client: Failed to connect, retrying in 5.000000s Traceback (most recent call last): File "/home/hass/.homeassistant/deps/pychromecast/socket_client.py", line 233, in initialize_connection self.socket.connect((self.host, self.port)) File "/usr/lib/python3.4/ssl.py", line 840, in connect self._real_connect(addr, False) File "/usr/lib/python3.4/ssl.py", line 827, in _real_connect socket.connect(self, addr) ConnectionRefusedError: [Errno 111] Connection refused

Really annoying since I have to reboot my rPi in order to get HASS up and running again… Is there a fix for the issue?

//F

Keeping this thread alive as I am seeing the same issues as well.

Me too!
I don’t even have chromecast included.

Any solution?
Sonos related?

I haven’t raised an issue on this in github, and I’m going to wait until .34 to see if some of the changes/updates in async have any effect.

I’m really gun shy about putting in an issue because the last two turned out to be something stupid in my configs. :blush:

Still getting these errors in 0.34.2. I think if I see another new user on the thread with this problem, I’ll put in an issue.

I’m getting these, but I just assumed it was because the Chromecast is turned off on a night so it can’t be reached (we switch the TV off at the wall, so no power gets to it at all).

It seems to work fine, so I just ignored the errors. It’d be nice to sort if it’s an easy fix though, to stop my logs getting filled up.

I’m pretty sure mine is plugged into AC but I better check that first before I post any issue. Thanks.

I’ve just seen this too, looks like it might be related:

I’m seeing this as well after the upgrade to 34. I skipped 33 and haven’t seen it under 32.

So to me it looks like it started after 32

Hi

Running 0.33.4 here and have the error present …

Dec 08 13:11:36 raspberrypi hass[503]: ERROR:pychromecast.socket_client:Failed to connect, retrying in 5.000000s
Dec 08 13:11:36 raspberrypi hass[503]: Traceback (most recent call last):
Dec 08 13:11:36 raspberrypi hass[503]: File "/home/hass/.homeassistant/deps/pychromecast/socket_client.py", line 239, in initialize_connection
Dec 08 13:11:36 raspberrypi hass[503]: self.socket.connect((self.host, self.port))
Dec 08 13:11:36 raspberrypi hass[503]: File "/usr/lib/python3.4/ssl.py", line 840, in connect
Dec 08 13:11:36 raspberrypi hass[503]: self._real_connect(addr, False)
Dec 08 13:11:36 raspberrypi hass[503]: File "/usr/lib/python3.4/ssl.py", line 827, in _real_connect
Dec 08 13:11:36 raspberrypi hass[503]: socket.connect(self, addr)
Dec 08 13:11:36 raspberrypi hass[503]: socket.timeout: timed out

I am still getting this. Any resolution on this?

Still getting these in 38.1- causing issues with my lights dimming during playback/full brightness when paused/stopped as well.