17-03-27 10:35:55 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.tv_salotto fails
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-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 "/usr/local/lib/python3.4/dist-packages/homeassistant/components/media_player/samsungtv.py", line 120, in update
return self.send_key('KEY')
File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/media_player/samsungtv.py", line 133, in send_key
self.get_remote().control(key)
File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/media_player/samsungtv.py", line 126, in get_remote
self._remote = self._remote_class(self._config)
File "/root/.homeassistant/deps/samsungctl/remote.py", line 10, in __init__
self.remote = RemoteWebsocket(config)
File "/root/.homeassistant/deps/samsungctl/remote_websocket.py", line 21, in __init__
self.connection = websocket.WebSocket()
TypeError: __init__() missing 3 required positional arguments: 'environ', 'socket', and 'rfile'
Same problem with UE40H5300.
When i put the option discover and i don’t put any ip or mac address, i see in the log the discover of the tv and the same image you post but nothing works.
When i put the ip mac address, the tv is no longer recognized by HA.
In another tv i had, the UE32H5300 it works. The TV software is different. As comparative, it seems i have the same problem with the samsung software Smart view for android phones.
In my android phone, if i use Youtube or in the video, the option share » view content on »» it works well in the two tv’s.
same on UA65JS9000. I can get the state displayed using port 8001 and websocket, but nothing much after that.
I have even tried running barebones samsungctl. Doesnt seem to work.
Not just UE models. I have a UA60H6400 and I have the same problem. Though my UA46D6600 works fine.
From what I can gather, it looks like everything around the H series is affected. From memory, these are from 2014. Models from before and after that time frame seem to be working fine.
I have almost the same issue as @Stefan609.
My TV (UE48H6500) is not working wit HA. nmap shows same results and discovery component finds the TV on port 7676. I have to manually play with smasungctl (both legacy and websocket methods) to check the communication flow. There are 2 things obvious with this model:
It doesn’t use default port (55000) - which makes me wonder which method should i use
something is going on with the authentication process i guess, since i don’t see the TV showing pin code.
Ah. Solved the issue for me to. The Samsung remote has been working with my old (2012-ish) non-Smart tv until I upgraded to 0.6x. Adding “timeout: 5” worked for me.
Been trying to get this to work with my UE49KU6400 and finally managed to get it to work. The steps to get thos to work were as follows:
Install the websocket-client sudo pip3 install websocket-client (Whilst I’m not sure it is necessary or not as well as doing this in the virtualenv I also installed it on the main setup).
Due to having made a lot of changes to my system I then rebooted the home assistant server (In my case a RPI 3 sudo reboot now). However you will probably get away with just restarting the Home-Assistant service (sudo service home-assistant@pi restart)
So now I can do the following:
Turn Off the TV if already on (However the TV always shows as On)
Use the Next and Previous Track Buttons (These allow you to navigate some menus and also skip forward and back in cetain apps but not all)
Turn the Volume Up, Down and Mute the Volume.
That’s all I’ve managed so far. But thought this may help a few others that have been struggling to get it to work at all.
I had mine working fairly well (UN40EH5300 and a UN55MU8000) using this code with my Echo:
I currently have it commented out in my config but the service still runs (and paired to my Echo) so I can say things like: Alexa, TV off (or) Alexa, TV on – and it works. Maybe something in here might help someone more savvy than me figure out how to talk to these devices (as I had similar results in HA as posted here) with the python code linked above.