Help to configure a samsung tv ks7000

Hi, i tryed to configure my samsung tv (model ks7000) without success. For me would be enough to be able to switch it on or off. This is my config with latest ha on Hassbian:

- platform: samsungtv
  host: 192.168.1.130
  port: 8001
  mac: 5c:49:7d:08:e5:ad
  name: "TV Soggiorno"
  timeout: 30

in the logs I found this:

2019-01-22 21:44:16 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.tv_soggiorno fails
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
    await self.async_device_update()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 349, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/media_player/samsungtv.py", line 130, in update
    self.send_key("KEY")
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/media_player/samsungtv.py", line 151, in send_key
    self.get_remote().control(key)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/media_player/samsungtv.py", line 136, in get_remote
    self._remote = self._remote_class(self._config)
  File "/srv/homeassistant/lib/python3.5/site-packages/samsungctl/remote.py", line 11, in __init__
    self.remote = RemoteWebsocket(config)
  File "/srv/homeassistant/lib/python3.5/site-packages/samsungctl/remote_websocket.py", line 28, in __init__
    self.connection = websocket.create_connection(url, config["timeout"])
AttributeError: module 'websocket' has no attribute 'create_connection'

any help?
thanx in advance!

only works if the tv is plugged into network, wifi doesnt work.

my tv is connected to the network with ethernet cable, but doesn’t work…

with samsungctl I get:

(homeassistant) **homeassistant@hassbian** : **/ $** samsungctl --host 192.168.1.130 --port 8001 --method websocket --name myremote KEY

Traceback (most recent call last):

File "/srv/homeassistant/bin/samsungctl", line 11, in <module>

sys.exit(main())

File "/srv/homeassistant/lib/python3.5/site-packages/samsungctl/__main__.py", line 110, in main

with Remote(config) as remote:

File "/srv/homeassistant/lib/python3.5/site-packages/samsungctl/remote.py", line 11, in __init__

self.remote = RemoteWebsocket(config)

File "/srv/homeassistant/lib/python3.5/site-packages/samsungctl/remote_websocket.py", line 28, in __init__

self.connection = websocket.create_connection(url, config["timeout"])

AttributeError: module 'websocket' has no attribute 'create_connection'



(homeassistant) **homeassistant@hassbian** : **/ $** samsungctl --host 192.168.1.130 --port 8001 --name myremote KEY

Error: Connection closed!

nobody have my same problem?

Probably the problem is that there is only one SamsungTV component and there are lots of different Samsung TV models. Every series react different to the HA component. Actually there should be a different component for each series (or one component for which you can define your model).
I have a KS7000 too and I am using an old version (I think the 0.80 version) of the Samsungtv component as a custom component. Actually I am not using HA to control the TV but I am using the TV state (on/off) to control light scenes.

For me would be enough to switch the tv state on or off… could you please share your version so I can try if it works better? Seems there’s low interest in the samsungtv component from HA…

Check out this thread:

There you can find a way to use the older version (0.80.3). The more recent answers in that thread may solve your issue too.

Hi not sure where you got with this, but I managed to get some functionality with mine. I am using the latest custom code out of HACS with the following config

  • platform: samsungtv_custom
    name: “Samsung TV KS7000”
    host: 192.168.1.158
    port: 8001
    mac: xx:xx:xx:xx:xx
    sourcelist: ‘{“PlayStation”: “KEY_HDMI1”}’
    protocol: ctl_beta