core: Samsung TV new integration doesn't work
The problem
Can’t integrate my Samsunt TV with HA
Environment
- Home Assistant release with the issue: 0.105.0
- Last working Home Assistant release (if known): 104
- Operating environment (Hass.io/Docker/Windows/etc.): Hass.io/Home Assistant
- Integration causing this issue: Samsung TV
- Link to integration documentation on our website: https://www.home-assistant.io/integrations/samsungtv/
Problem-relevant configuration.yaml
removed integration from configuration.yaml.
Traceback/Error logs
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/real_ip.py", line 39, in real_ip_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 72, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 135, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 123, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 160, in post
return await super().post(request, flow_id)
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 50, in wrapper
result = await method(view, request, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 89, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 130, in async_configure
result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 172, in _async_handle_step
result: Dict = await getattr(flow, method)(user_input)
File "/usr/src/homeassistant/homeassistant/components/samsungtv/config_flow.py", line 129, in async_step_user
result = await self.hass.async_add_executor_job(self._try_connect)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/samsungtv/config_flow.py", line 92, in _try_connect
with Remote(config.copy()):
File "/usr/local/lib/python3.7/site-packages/samsungctl/remote.py", line 11, in __init__
self.remote = RemoteWebsocket(config)
File "/usr/local/lib/python3.7/site-packages/samsungctl/remote_websocket.py", line 30, in __init__
self._read_response()
File "/usr/local/lib/python3.7/site-packages/samsungctl/remote_websocket.py", line 67, in _read_response
response = self.connection.recv()
File "/usr/local/lib/python3.7/site-packages/websocket/_core.py", line 310, in recv
opcode, data = self.recv_data()
File "/usr/local/lib/python3.7/site-packages/websocket/_core.py", line 327, in recv_data
opcode, frame = self.recv_data_frame(control_frame)
File "/usr/local/lib/python3.7/site-packages/websocket/_core.py", line 340, in recv_data_frame
frame = self.recv_frame()
File "/usr/local/lib/python3.7/site-packages/websocket/_core.py", line 374, in recv_frame
return self.frame_buffer.recv_frame()
File "/usr/local/lib/python3.7/site-packages/websocket/_abnf.py", line 383, in recv_frame
frame.validate(self.skip_utf8_validation)
File "/usr/local/lib/python3.7/site-packages/websocket/_abnf.py", line 182, in validate
raise WebSocketProtocolException("Invalid close opcode.")
websocket._exceptions.WebSocketProtocolException: Invalid close opcode.
Additional information
Manually adding the integration also does not work in the latest version.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 56 (32 by maintainers)
@twsl error will be fixed with 0.106. TV will work with mentioned PR.
Where have you seen it? Here are the release notes: https://github.com/home-assistant/home-assistant/releases It’ll be in 0.106 or should we add it to a minor 0.105, @balloob?
If I’m right and the timeout is the problem, this should fix our problems: https://github.com/escoand/home-assistant/commit/3c5ff511b0a02bf3c4e1b5adf361e736b6d8e509
Please look at #32942.
@escoand with 0.106 I now get “Aborted” - “The Samsung TV device is currently not supported”.
What is the plan for handling old TVs where the socket error was at least used for determining power state? Is that capability coming back, or do I need to work on a new method?
version 0.105.4 and UE75MU6179, same issue. custom version with port 8002 can at least connect to tv