ollo69 / ha-samsungtv-smart

📺 Home Assistant SamsungTV Smart Component with simplified SmartThings API Support configurable from User Interface.
Apache License 2.0
456 stars 60 forks source link

Error in the log #3

Closed Krocko closed 4 years ago

Krocko commented 4 years ago

Hi. I catched some errors in the log. Maybe it is useful for you?

Logger: homeassistant.core
Source: custom_components/samsungtv_smart/websockets.py:152
First occurred: 6:01:25 (1 occurrences) 
Last logged: 6:01:25

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1257, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 198, in handle_service
    self._platforms.values(), func, call, required_features
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 402, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 599, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 433, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 710, in async_toggle
    await self.async_turn_off()
  File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 526, in async_turn_off
    await self.hass.async_add_job(self.turn_off)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/samsungtv_smart/media_player.py", line 651, in turn_off
    self.send_command("KEY_POWER")
  File "/config/custom_components/samsungtv_smart/media_player.py", line 497, in send_command
    self._ws.send_key(payload, key_press_delay)
  File "/config/custom_components/samsungtv_smart/websockets.py", line 181, in send_key
    key_press_delay
  File "/config/custom_components/samsungtv_smart/websockets.py", line 109, in _ws_send
    self.open()
  File "/config/custom_components/samsungtv_smart/websockets.py", line 152, in open
    response = self._process_api_response(self.connection.recv())
  File "/usr/local/lib/python3.7/site-packages/websocket/_core.py", line 313, in recv
    opcode, data = self.recv_data()
  File "/usr/local/lib/python3.7/site-packages/websocket/_core.py", line 330, in recv_data
    opcode, frame = self.recv_data_frame(control_frame)
  File "/usr/local/lib/python3.7/site-packages/websocket/_core.py", line 343, in recv_data_frame
    frame = self.recv_frame()
  File "/usr/local/lib/python3.7/site-packages/websocket/_core.py", line 377, 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.
Logger: homeassistant.helpers.entity
Source: custom_components/samsungtv_smart/smartthings.py:216
First occurred: 8:30:06 (1 occurrences) 
Last logged: 8:30:06

Update for media_player.fernseher_wohnzimmer fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 474, in async_device_update
    await self.async_update()
  File "/config/custom_components/samsungtv_smart/media_player.py", line 467, in async_update
    await self._st.async_device_update()
  File "/config/custom_components/samsungtv_smart/smartthings.py", line 216, in async_device_update
    raise_for_status=True,
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 1012, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 588, in _request
    resp.raise_for_status()
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 946, in raise_for_status
    headers=self.headers)
aiohttp.client_exceptions.ClientResponseError: 500, message='Internal Server Error', url='https://api.smartthings.com/v1/devices/xxxxxxxxxxxxxxx/states
Logger: custom_components.samsungtv_smart.media_player
Source: custom_components/samsungtv_smart/media_player.py:469
First occurred: 11:28:59 (1 occurrences) 
Last logged: 11:28:59

Samsung TV - Error refreshing from SmartThings
Logger: custom_components.samsungtv_smart.media_player
Source: custom_components/samsungtv_smart/media_player.py:313
First occurred: 6:08:33 (4 occurrences) 
Last logged: 11:48:19

Error getting HTTP info for app: Netflix
Error getting HTTP info for app: AccuWeather
Error getting HTTP info for app: TuneIn
ollo69 commented 4 years ago

But the component is working?

Krocko commented 4 years ago

Yes, it is working. I am on the lates version.

ollo69 commented 4 years ago

OK, I will check. Some error are just related to state chenge, I should change to debug.

Thanks.

ollo69 commented 4 years ago

This should be fixed from a lot Pls reopen or create a new one if you have other comment