Samsung Tizen Support

I’m not sure… I didn’t have to fiddle with anything other than the configuration. I was, however, able to get samsungctl to work prior to Tizen support being added.

I was never able to get samsungctl to work before and after Tizen support.

What year/model is your TV? Is it possible it’s an older version? did you try the older port/method in samsungctl or HA?

Tv model is UN75JU641D, I was using the older method with samsungctl but same result as websocket method.

Hi!

I have also tried this on an UE55JS8005, but it doesn’t work either, neither does samsungctl.

Starting Nmap 7.01 ( https://nmap.org ) at 2017-02-02 22:54 CET
Nmap scan report for [Samsung TV]
Host is up (0.0056s latency).
Not shown: 995 closed ports
PORT STATE SERVICE
7676/tcp open imqbrokerd
8000/tcp open http-alt
8001/tcp open vcom-tunnel
8002/tcp open teradataordbms
8080/tcp open http-proxy

Nmap done: 1 IP address (1 host up) scanned in 0.16 seconds

Telnet on port 8001:

Escape character is ‘^]’.
GET / HTTP/1.0

HTTP/1.1 500 Internal Server Error
Content-Type: text/plain
Content-Length: 56
Date: Thu, 02 Feb 2017 21:54:48 GMT
Connection: close

As it seems to respond in clear text I’ll have a closer look with tcpdump as soon as i have the time.

My TV responds with “{“event”:“ms.error”,“data”:{“message”:“unrecognized method value : ms.remote.control”}}”

Same thing both with home assistant and samsungctl.

I get this error: samsungctl: error: argument -h/–help: ignored explicit argument ‘ost’

how do you send a command say volume up from command line?

kylerw, when you say it’s working for you, what attributes are available from the developer’s “state” panel? I’ve got a KS8000 and the only thing I see is a single attribute, on or off. This kinda works but is so sluggish that it’s virtually unusable. I think you have the same TV, so I’m wondering what’s different? My configuration looks like this:

media_player samsung:
  - platform: samsungtv
    host: 192.168.1.11
    port: 8001
    name: TV

Any clues would be appreciated.

If you use this command you will get an interactive GUI:
samsungctl --host 10.10.10.10 --method websocket --interactive --port 8001

replace 10.10.10.10 with the actual IP of your TV.

I tried that command and replaced the ip address but now I am getting this error:

Traceback (most recent call last):
  File "/usr/local/bin/samsungctl", line 11, in <module>
    load_entry_point('samsungctl===0.6.0-git', 'console_scripts', 'samsungctl')(                                                                                  )
  File "build/bdist.linux-armv7l/egg/samsungctl/__main__.py", line 93, in main
  File "build/bdist.linux-armv7l/egg/samsungctl/__main__.py", line 37, in _read_                                                                                  config
NameError: global name 'FileNotFoundError' is not defined

Has anyone got this working? as it works for me in OpenHab2 using the samsung component so i know its possible

Mine has worked from the beginning without any issues.

Mine does not work, however it does on openhab2 with https://github.com/openhab/openhab2-addons/tree/master/addons/binding/org.openhab.binding.samsungtv

I got it working but i had to install the websocker-client dependency manually pip3 install websocket-client.
I have a KS8005

Think it may be an issue with the underlying samsungctl.

I cant even control the tv with:

pi@homeassistant:~ $ sudo samsungctl --host 192.168.5.91 --port 8001 KEY_MUTE --method websocket --name “home-assistant” --id 1234567890 --timeout 30 -v
Sending control command: KEY_MUTE
pi@homeassistant:~ $

@Jonny_Davey im on windows but i had no problem sending commands to my tv using the samsungctl, but i don’t think i used the --id, --name, --timeout or -v parameters.

@Jonny_Davey Mine works with openhab2 and I get the message on my samsung tv to allow the connection from openhab2 but nothing works with HA. I wonder if there will be some files installed automatically on openhab2’s image that allows it to connect to the samsung tv.

I will try and install HA on my pi which is running openhab2 and see if it then works via HA.

My openhab2 works fine but that looks to use JavaScript to control the tv Vs. home assistant that i believe uses https://github.com/Ape/samsungctl

Did you manage to test this?

I wasnt able to install HA on my pi running openhab2

1 Like

I also can’t get the plugin to work. I have a UE65JU6075.

Getting this error in the home-assistant.log with port 8001:
2017-05-22 02:43:36 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.tv_stue fails
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity.py”, line 225, in async_update_ha_state
None, self.update)
File “/usr/lib/python3.4/asyncio/futures.py”, line 388, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.4/asyncio/tasks.py”, line 286, in _wakeup
value = future.result()
File “/usr/lib/python3.4/asyncio/futures.py”, line 277, in result
raise self._exception
File “/usr/lib/python3.4/concurrent/futures/thread.py”, line 54, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/media_player/samsungtv.py”, line 121, in update
return self.send_key(‘KEY’)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/media_player/samsungtv.py”, line 134, in send_key
self.get_remote().control(key)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/media_player/samsungtv.py”, line 127, in get_remote
self._remote = self._remote_class(self._config)
File “/home/homeassistant/.homeassistant/deps/samsungctl/remote.py”, line 10, in init
self.remote = RemoteWebsocket(config)
File “/home/homeassistant/.homeassistant/deps/samsungctl/remote_websocket.py”, line 13, in init
import websocket
ImportError: No module named ‘websocket’

It’s looks like it’s working on the default 55000, but it reports wrong status and I only get a “power-button” that doesn’t work.