Samsung Smart TV - No control?

Interesting. Can you just issue a power on/off command only? The issue I might have with this is my TV is connected to a receiver. The second I turn on Anynet+ it starts creating all sorts of problems with the receiver because HDMI control is a mess.

UPDATE: So the HTTP API for the iTach won’t work yet but might by the end of the year. The only option then is to send the EX-Link hex code directly via TCP to the iTach but I have yet to figure out the right shell_command in HASS to do that.

I also have a Sony blue ray player connected via HDMI to Samsung TV and can use anynet+ to turn the SamsungTV on as well.

I use the media player to power on the Firestick which in turn powers on the TV and when I do, this does not turn on the blue ray player.

Hi, thanks for the code. I am trying to get my Samsung TV QLED 70R up and running with hassio (Home Assistant 0.94.4). I am trying to run the service from within the development tools and get the following message:

Service media_player/send_key. Service not found.

service: media_player.send_key

{
  "entity_id": "media_player.livingroom",
  "key_code": "KEY_HOME"
}

The configuration.yaml is :

media_player:
  - platform: samsungtv_custom
    name: livingroom
    host: _hidden_
    port: 8001
    mac: _hidden_

The updated code is in the media_player.py in the /custom_components/samsungtv_custom/ directory. Is there anybody who could give me a hint. It seems that the media_player.py is not updated as custom component since “send_key” service is not found.

I have decided to create a custom component, it is working on the latest version of HA 0.99.3, I have uploaded the code to:

I hope it helps you.

2 Likes

Not working with my 2017 MU6300. :frowning:

I get a failed opcode message.

Did you ever got this working with your qled 70r?

Sorry for my late reply. I haven’t got it working since I had no time to look further into it. On one of the next weekends I will look into it and hopefully get it working. I will keep you updated.

1 Like

Hello!
I use this fork https://github.com/xchwarze/ha-samsungtv-custom/releases in 2016+ tv
All TizenOS tv should work

@xchwarze thank you kindly for your reply. I am not so familiar with forks and especially getting them in HA. Can you tell me how to get it working?

Hi, I have uploaded the latest version 2.0.1 in HACS If not working by default samsungctl protocol, try changing it to WS protocol for 2016+ TVs model…

platform: samsungtv_custom
host: xxx.xxx.xxx.xxx
port: (8001 or 8002)
mac: xx:xx:xx:xx:xx
sourcelist: xxxx
protocol: ws

Tried:

I managed to do it manually following:
GitHub - roberodin/ha-samsungtv-custom: 📺 HomeAssistant - SamsungTV Custom Component via a samba share add-on to my hass machine. I have the “tile” now but it is not able to turn on the TV.

The repository “SamsungTV Custom” is visible for HA 0.99.3+ versions.
After copy files, then delete ‘pycache’ directory inside ‘samsungtv_custom’ and restart HA, after reboot, add ‘protocol: ws’ to configuration and restart again. Good luck!

Did that, but cant get it working… not on port 8001 and not on 8002… any onther suggestions?

I would like to have your TV to be able to do tests :yum:

Haha, wanted to write you back I just sent back one TV to samsung last week due to problems. Now I have this new (same) model. I just discovered I changed everything in the config except the MAC address. Now the TV can be switched on… but not off and not any others.

I also saw on github it was just updated last hour and downloaded thos files installed them and now HA is accepting the ws parameter in the config.

Thus… a little further but no luck expect turning on (but I could also have acheived that via WOL :-).

All together: I had to say goodbye to my old TV (ES8000 Samsung) with deep regret… the new model is too much software and smart for me :wink:.

update:
This is my config:
image

I am not getting the input sections in the tile:
image

image

@sender try port 8002

Not working on 8002 as well…

I have a custom component I use for a few weeks with my Q9FN from last year. It’s not perfect but I can use basic media_player function and launch apps. It has never been tested on another TV model but this year TVs should not be very different. Hope it helps you.
https://github.com/giefca/ha-samsungtv-qled

Hi @giefca , Thanks for this. i am using your component on port 8002 with a samsung ue55nu7100 not a qled, It didnt work on the wifi but when i switched to ethernet i got different results.

At first it showed up in entity registry, it was switched on (it was) but i got an error when trying to switch the tv off, When i tried to press the volume button i got a notification on the tv to accept the connection which i accepted, then it popped up again and i accepted again but still didnt control the volume. so i tried changing the port to 8001 and nothing happened, I changed back to 8002 and now it doesnt load and i get the following:

Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py”, line 408, in _async_add_entity
await entity.async_update_ha_state()
File “/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py”, line 273, in async_update_ha_state
self._async_write_ha_state()
File “/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py”, line 314, in _async_write_ha_state
attr.update(self.state_attributes or {})
File “/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/media_player/init.py”, line 832, in state_attributes
for attr in ATTR_TO_PROPERTY
File “/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/media_player/init.py”, line 833, in
if getattr(self, attr) is not None
File “/home/homeassistant/.homeassistant/custom_components/samsungtv_qled/media_player.py”, line 305, in source
if self._application.current_app() is None:
File “/home/homeassistant/.homeassistant/custom_components/samsungtv_qled/samsungctl/application.py”, line 68, in current_app
if (self.is_visible(app) is True):
File “/home/homeassistant/.homeassistant/custom_components/samsungtv_qled/samsungctl/application.py”, line 54, in is_visible
return app_state[‘visible’]
KeyError: ‘visible’

I have deleted the _pycache _ folder, restarted HA but still not getting past that error. the tv is set to only notify on the first connection, the only thing in the list is “smart device” and only appeard since your custom component. my config is:

  - platform: samsungtv_qled
    host: 192.168.0.9
    port: 8002
    mac: removed
    timeout: 5

any ideas?
thanks

edit:

I managed to get the entitiy to show after a reboot of the tv and home assistant a few times. it always shows as switched off, still get the same visible error. But i can switch on the tv using the power button on the entity and i can also switch it off by sending KEY_POWER. KEY_VOLUP works and gave me the notification for home assistant to allow connection. But it still shows as its turned off. when i try to open an app on the TV i get the visible error above