Project: reliable Samsung TV power-on and HDMI scene in Home Assistant (local, no cloud)

Discuss Application Development and Smaart Home Integrations for Samsung Tizen Smart TVs
Post Reply
User avatar
ZerOne
Site Admin
Posts: 292
Joined: Sun Dec 13, 2020 8:21 am

Goal

Turn a Samsung Tizen TV on from Home Assistant reliably, switch it to HDMI, and send a few remote key presses, all over your LAN. I have not run this exact config on your model, so test each step in order and expect to tweak. The overview thread I posted in this forum covers the options and caveats (local vs SmartThings, the SmartThings API change and so on).

You need: Home Assistant, a Samsung Tizen TV (2016 or later per the HA docs) on the same subnet/VLAN as HA, and ideally the TV on a network cable.

Step 1: Prepare the TV
  1. Give the TV a DHCP reservation on your router.
  2. Enable Power On with Mobile (Settings > All Settings > Connection > Network > Expert Settings on recent models; General > Network on older ones; names vary).
  3. If your model has it, enable IP Remote (Samsung's IP Control guide mentions it).
  4. Note the MAC address for the connection the TV actually uses (wired vs Wi-Fi are different).
Step 2: Add the integration

In HA go to Settings > Devices & services. The TV may be auto-discovered; otherwise Add Integration > Samsung Smart TV and enter its IP. Accept the prompt on the TV screen when it appears. If it keeps asking later, see the "First time only" Access Notification note in the docs.

Step 3: Wake-on-LAN turn-on automation

The docs say HA tries WoL itself if it learned the MAC from discovery, and that you can supply your own turn-on action. This is the docs' example (change the entity and MAC):

Code: Select all

wake_on_lan:

automation:
  - alias: "Turn On Living Room TV with WakeOnLan"
    triggers:
      - trigger: samsungtv.turn_on
        entity_id: media_player.samsung_smart_tv
    actions:
      - action: wake_on_lan.send_magic_packet
        data:
          mac: aa:bb:cc:dd:ee:ff
Reload the config or restart, then press turn on from the media player card. Reference: Wake on LAN integration.

Step 4: A "movie mode" script

This turns the TV on, waits for it, selects HDMI and sends a key. Entity names are examples. The docs say the integration exposes TV and HDMI as sources, so check your source list first.

Code: Select all

script:
  lounge_tv_hdmi:
    alias: "Lounge TV to HDMI"
    sequence:
      - action: media_player.turn_on
        target:
          entity_id: media_player.samsung_smart_tv
      - wait_template: "{{ is_state('media_player.samsung_smart_tv', 'on') }}"
        timeout: "00:01:00"
        continue_on_timeout: false
      - action: media_player.select_source
        target:
          entity_id: media_player.samsung_smart_tv
        data:
          source: "HDMI"
      - action: remote.send_command
        target:
          entity_id: remote.samsung_smart_tv
        data:
          command: KEY_MUTE
The remote entity takes key codes such as KEY_HOME, KEY_VOLUP, KEY_HDMI and KEY_ENTER; supported keys vary by model, and the docs have the full list.

Step 5: Troubleshooting
  • Won't turn on from deep standby: confirm the right MAC, try cabling the TV, and check Power On with Mobile. Some older TVs lack WoL support.
  • Not discovered or unavailable: check HA and the TV are on the same subnet; the docs say the WebSocket cannot cross VLANs.
  • Entity shows unavailable while the TV is off: this can happen on some models, so rely on the turn_on trigger rather than state checks alone, and test on your own TV.
Keep it safe
  • Don't port-forward TV ports to the internet.
  • A script that sends power keys only affects the TV, but be careful with anything that chains TV power to other devices.
  • Back up your HA config before editing YAML.
Discussion: Did WoL work for your TV on Wi-Fi or only on a cable, and which model year are you on?
Post Reply

Return to “Samsung Tizen Smart TV Discussion”