home-assistant-libs / pychromecast

Library for Python 3 to communicate with the Google Chromecast.
MIT License
2.52k stars 378 forks source link

Cannot connect to LG SK6 with built-in chromecast - Connection reset by peer during ssl.wrap_socket #272

Open tomasrollo opened 5 years ago

tomasrollo commented 5 years ago

While trying to set up my new LG SK6 sounbar with built-in Chromecast I can add the LG as Chromecast in Google Home app (Android, iOS) but cannot cast to it (no application - Spotify, TuneIn, etc. is showing the LG soundbar as available to cast to).

Further analysis with pychromecast (current master -> commit 85e0b6ae...) revealed pychromecast fails to connect to the LG soundbar with error [Errno 104] Connection reset by peer during self.socket = ssl.wrap_socket(self.socket) at pychromecast/socket_client.py:310

Here's what I tried:

Python 3.7.2 (default, Dec 29 2018, 06:19:36) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> import pychromecast
>>> import logging
>>> logging.basicConfig(level=logging.DEBUG)
>>> ch2 = pychromecast.Chromecast('192.168.1.34')
INFO:pychromecast:Querying device status
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 192.168.1.34:8008
DEBUG:urllib3.connectionpool:http://192.168.1.34:8008 "GET /setup/eureka_info?options=detail HTTP/1.1" 200 1586
DEBUG:pychromecast.socket_client:[192.168.1.34:8009] Connecting to 192.168.1.34:8009
[Errno 104] Connection reset by peer

The LG SK6 soundbar firmware version is: Main:18081240 Micom: 18062100 Sound Effect: 161104B0 Chromecast: 1.21.75965

Is this something that can be solved or is it better to just return the soundbar...?

tomasrollo commented 5 years ago

Here is the result of curl "192.168.1.34:8008/setup/eureka_info?options=detail"

https://pastebin.com/wvsTq53P

aldrichang commented 1 year ago

Sorry for bringing up an old post, but did you ever resolve your issue? I have the exact same problem. Eureka Info shows setup_state 52

tomasrollo commented 1 year ago

@aldrichang sorry, I never managed to get it work. I ended up not using the Chromecast function of that soundbar at all.