home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.65k stars 29.94k forks source link

Chromecast devices: "Error reading from socket" + "Failed to connect to service HostServiceInfo()" #122744

Open exocyt0sis opened 1 month ago

exocyt0sis commented 1 month ago

The problem

Using a barebones installation of Home Assistant Core 2024.7.3, I get a constant stream of errors all concerning Chromecast devices in my home. I haven't altered the Chromecast settings in any way, so I don't know why these errors keep showing up. Please see the attached error log for details.

Shouldn't it work out of the box?

What version of Home Assistant Core has the issue?

2024.7.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Core

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: pychromecast.socket_client
Source: deps/lib/python3.12/site-packages/pychromecast/socket_client.py:616

[Pixel Tablet(192.168.86.33):8009] Error reading from socket.

Logger: pychromecast.socket_client
Source: deps/lib/python3.12/site-packages/pychromecast/socket_client.py:655
First occured: 22:10:11 (1 events)
Last logged: 22:10:11

[Pixel Tablet(192.168.86.33):8009] Error communicating with socket, resetting connection

Logger: pychromecast.socket_client
Source: deps/lib/python3.12/site-packages/pychromecast/socket_client.py:412
First occured: 22:10:47 (1 events)
Last logged: 22:10:47

[Pixel Tablet(192.168.86.33):8009] Failed to connect to service HostServiceInfo(host='192.168.86.33', port=8009), retrying in 5.0s

Additional information

No response

elupus commented 1 month ago

Most of it is log spam. I've opened a request to reduce it here: https://github.com/home-assistant-libs/pychromecast/pull/933

One of the entries above looks somewhat correct with a failure to connect.

home-assistant[bot] commented 1 month ago

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!

Code owner commands Code owners of `cast` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign cast` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


cast documentation cast source (message by IssueLinks)

dinan5 commented 3 weeks ago

I have the same issue. Only happens once a day, overnight on every device.

steamboy23 commented 3 hours ago

same issue here. only happens when streaming music from LMS addon every two or three songs. streaming from jellyfin is without any issues.