roberodin / ha-samsungtv-custom

📺 HomeAssistant - SamsungTV Custom Component
Apache License 2.0
122 stars 177 forks source link

ctl_beta not working #17

Open erudebu opened 4 years ago

erudebu commented 4 years ago

Trying to connect Samsung TV UE22H5610 (2014)

There are Errors on activating protocol ctl_beta:


Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 270, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 450, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  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_custom/media_player.py", line 198, in update
    self.send_key("KEY")
  File "/config/custom_components/samsungtv_custom/media_player.py", line 218, in send_key
    self.get_remote().control(key)
  File "/config/custom_components/samsungtv_custom/samsungctl_080b/utils.py", line 303, in wrapper
    result = func(*args, **kwargs)
  File "/config/custom_components/samsungtv_custom/samsungctl_080b/websocket_base.py", line 261, in control
    ' -- is the TV on?!?'
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'```
kirichkov commented 4 years ago

I got similar errors, then I installed lxml module and the errors are gone, but my H-series still isn't accepting commands. A pin code shown on the TV is required to setup the communication and I'm not sure this module supports this method yet.

erudebu commented 4 years ago

I have hassio installed through docker, and on the command line of the container it says that lxml is installed.

kirichkov commented 4 years ago

I'm using virtualenv install so I installed it in the virtual environment. If for some reason hassio uses virtualenv lxml might have been installed in the wrong location