Samsung Smart TV - No control?

I have a Frame TV and can verify Ollo69 component works flawlessly with my 2020 Frame. I can turn off and on and also switch between art mode (via custom switch) in HA.

Thanks Ollo!

1 Like

how are you getting it to switch into art mode?

I use a custom switch, see below for the setup i have in configuration.yaml.

switch:

  • platform: template
    scan_interval: 10
    switches:
    art_mode:
    friendly_name: “Art Mode”
    value_template: “{{ is_state_attr(‘media_player.frame_tv’, ‘art_mode_status’, ‘on’) }}”
    turn_on:
    service: media_player.play_media
    data:
    entity_id: media_player.frame_tv
    media_content_type: send_key
    media_content_id: ‘KEY_POWER’
    turn_off:
    service: media_player.play_media
    data:
    entity_id: media_player.frame_tv
    media_content_type: send_key
    media_content_id: ‘KEY_POWER’

hope that helps

argh, i guess send_key/KEY_POWER doesnt work on 2019 models

Sorry about not being to find a answer as I suppose it’s somewhere to be found.

I have a Q9fn with native HA integration which seems to work as expected. The only data I really need is however not available: media player play/pause/stopped states. Through searching I’ve noticed comments about more data being available through alternative integrations, but didn’t specifically see any comments mention additional states. Are these states available through use of any of the other integrations? Or in combination with Smarthings?


or is it possible to get mentioned state from individual applications? Noticed that some integrations offer application specific data, but I didn’t see any information about play/pause states.

Good question
 I can’t see why don’t all these projects couldn’t work more closely together as a collective and post TV model compatibility lists.

This used to be the case on the HA plugin but some new developers got on board and deleted this list :frowning:

1 Like

FYI I have a Frame TV purchased in 2017 and I was able to make the above template sort of work. You obviously need to adjust the indentation and the single quotes (I am not proficient with YAML and it took me a while to figure out the right syntax).

The switch itself does not work as is in my case if you add it as a lovelace card (again not sure if this is expected for template switches or just an issue with the TV itself), but I included it in an automation to turn on art mode and it does the job provided that the tv is on. So I start the automation with a turn_on command and a 5s delay that handles all situations.

I can now have art mode turn itself on automatically every morning which my tv was reluctant to do consistently before.

Hi guys, I am just getting started with Home Assistant on a RPI4B. I’ve focused on my plants and house climate and big parts is up and running, love it!

I have 4 Samsung TVs that I’ve done nothing about. One QLED Q65Q70 and three older Samsung’s from 2013. The last couple of days I’ve tried to get some kind of reaction from them, especially starting with the older two.

Two of them from 2013 show up in HA:
image

My latest attempt look like this:
media_player:

- platform: samsungtv_custom
host: 192.168.86.20
mac: 5c:a3:9d:[intentionally omitted]:c8:d6
port: 8001
sourcelist: '{"PlayStation": "KEY_HDMI1", "RaspberryPi": "KEY_HDMI2", "Chromecast": "KEY_HDMI3"}'
name: Samsung Vardagsrummet

SamsungTV Custom is installed through HACS. It just looks like this and I get zero reaction when pushing the button:
image

Anyone got any tips on what to do to move forward with this?

I have an older samsung tv and had a lot of trial and error setting it up. I had to use the ctl_beta and get the token and ID

The token get be fetched via https://github.com/eclair4151/SmartCrypto The id can be fetched vie http://IP_ADDRESS:8001/api/v2/

My config looks like this

- platform: samsungtv_custom
    name: Bedroom TV
    host: 10.10.10.10
    port: 8001
    mac: 00:00:00:00:00
    protocol: ctl_beta
    id: xxxxxxxxxx
    token: xxxxxxxxxxxxxx:1

I am able to control power, volume and source now. I hope this helps

2 Likes

Many thanks!

I couldn’t get any torken. I get “No module named ‘command_encryption’” with SmartCrypto and “No module named ‘PySmartCrypto’” with GetToken. But my TVs are 2013’s model, maybe they don’t have a Token? I also couldn’t get the deviceid with the available options for that (this http://IP_ADDRESS:8001/api/v2/ and two other versions of it). They just didn’t connect.

Anyway, I could connect all three super easy with this:

All I had to do was download the files into the right folder in hassio and it worked instantly. Almost fell of a chair after messing around with worse options for days.

I can also change sound, source and turn off. They aren’t connected to ethernet, I think they maybe have to be that. But its better than nothing!

1 Like

Do you may show full config of this section?
I got this error, and i don’t understand, when :unamused:

(venv_3.9.2) homeassistant@orangepiplus2e:/srv/homeassistant/venv_3.9.2$ hass --script check_config
Testing configuration at /home/homeassistant/.homeassistant
Failed config
  media_player.samsungtv_custom: 
    - Invalid config for [media_player.samsungtv_custom]: [token] is an invalid option for [media_player.samsungtv_custom]. Check: media_player.samsungtv_custom->token. (See ?, line ?). 
    - platform: samsungtv_custom
      host: 192.168.0.104
      id: aceeeed0-fff7-4538-a530-ef1cf96677f8
      mac: cc:b1:1a:be:b3:6b
      port: 8001
      protocol: ctl_beta
      sourcelist: {"RaspberryPi": "KEY_HDMI2", "Chromecast": "KEY_HDMI3"}
      token: af7071f753960e5c9c1baec56c71e850:2

Successful config (partial)
  media_player.samsungtv_custom:

with my config:

media_player:
     platform: samsungtv_custom
     host: 192.168.0.104
     port: 8001
     mac: cc:b1:1a:be:b3:6b
     sourcelist: '{"RaspberryPi": "KEY_HDMI2", "Chromecast": "KEY_HDMI3"}'
     protocol: ctl_beta
     token: af7071f753960e5c9c1baec56c71e850:2
     id: aceeeed0-fff7-4538-a530-ef1cf96677f8

My TV - UE50J6240

It looks like your indentation is wrong. You can try copying mine above and see if that works. Remove any extra attributes until you get it working

Don’t work.
I get “Safe Mode” status, or error about token, then if i’m delete token, i get error about id

Can you send on the errors from your logs?

1 Like

My conf - https://pastebin.com/rVD6b7VA
My error log https://pastebin.com/7RympbR2

It look like there might be an issue with the custom component. Did you copy all of the contents from github?

I’m install it across HACS https://hacs.xyz/

You need to edit the media_player.py file in the samsungtv_custom folder under custom_components

Go to line 65/66 and change

CONF_ID = ""
CONF_TOKEN = ""

to

CONF_ID = "id"
CONF_TOKEN = "token"

Thank you! It’s working for me.
But now i don’t may set lovelace panel for media player :grinning:
http://SSMaker.ru/7dbc8603/ :roll_eyes:

Has anyone succeeded to turn on a F6400 model via WOL or otherwise? I can control volume, mute/unmute, select source and turn off, but not the TV turn on
 Thanks in advance!