Top Tags

Home Assistant YouTube App Control on Samsung Tizen OS

Comprehensive guide for integrating Samsung Smart TV with Home Assistant using the Samsung TV Smart component. Learn how to control YouTube and other Tizen apps, configure app IDs, and automate media playback on Samsung Tizen OS devices.

Overview

This guide explains how to integrate Samsung Smart TVs running Tizen OS with Home Assistant, enabling full control over app launching, media playback, and source selection. Samsung Tizen TVs use unique application identifiers that can vary between firmware versions and TV models. This documentation will help you identify and configure the correct app IDs for seamless automation.

Prerequisites

System Requirements

  • Home Assistant Core: Version 2023.1 or later
  • Samsung Smart TV: Tizen OS 4.0 or later (2018+ models recommended)
  • Network: TV and Home Assistant must be on the same local network
  • Permissions: TV should be in "Developer Mode" or have remote control enabled

Required Integrations

  1. HACS (Home Assistant Community Store) - For installing custom components
  2. Samsung TV Smart Component - Enhanced Samsung TV integration with app control
  3. Optional: SmartThings integration for additional device management

Installation Steps

Install HACS

If you haven't installed HACS yet, follow the official installation guide at hacs.xyz. HACS allows you to easily manage custom integrations and frontend components.

Install Samsung Smart TV Component

The Samsung TV Smart component provides advanced control over Samsung Tizen TVs, including app management, source selection, and improved state tracking compared to the built-in Home Assistant integration.

Installation via HACS

  1. Open Home Assistant and navigate to HACSIntegrations
  2. Click the "+" button in the bottom right corner
  3. Search for "SamsungTV Smart"
  4. Click "Download" and restart Home Assistant
  5. Repository: https://github.com/ollo69/ha-samsungtv-smart

Manual Installation (Alternative)

bash
1# Navigate to your Home Assistant custom_components directory
2cd /config/custom_components
3
4# Clone the repository
5git clone https://github.com/ollo69/ha-samsungtv-smart.git samsungtv_smart
6
7# Restart Home Assistant

Configure Integration

Initial Setup

  1. Navigate to SettingsDevices & ServicesAdd Integration
  2. Search for "SamsungTV Smart"
  3. Enter your TV's IP address (you can find this in TV Settings → General → Network → Network Status)
  4. The integration will discover your TV and create a media player entity

Alternative: Manual Configuration in configuration.yaml

If you prefer YAML configuration or need more control, add the following to your configuration.yaml:

yaml
1# Basic Samsung TV configuration
2samsungtv_smart:
3 - host: 192.168.1.XXX # Replace with your TV's IP address
4 name: Living Room TV
5 port: 8002 # Default port for Tizen TVs
6 api_key: YOUR_API_KEY # Optional: SmartThings API key
7 device_name: HomeAssistant # Name shown on TV for connection approval
8 device_id: HomeAssistant # Unique device identifier
### Understanding Tizen Application IDs Samsung Tizen OS uses two types of application identifiers: 1. **Legacy Numeric IDs**: Used on older firmware versions (pre-2020) - Format: String of numbers (e.g., "111299001912") - Example: YouTube uses "111299001912" on Tizen 4.0-5.5 2. **Modern Package IDs**: Used on newer firmware versions (2020+) - Format: Package.AppName (e.g., "9Ur5IzDKqV.TizenYouTube") - More reliable and consistent across firmware updates ## Application ID Configuration ### Finding the Correct YouTube App ID ```yaml copy app_list: YouTube: "111299001912"

on new TV`s try using this ID

yaml
1YouTube: 9Ur5IzDKqV.TizenYouTube

Then in HA Dev tools try Developer Tools -> Actions ->

Media player: Select source

Use Source Field like YouTube

Misc

Get Token From Samsung Smart Things https://account.smartthings.com/tokens

Get Device ID from Samsung Smart Things https://my.smartthings.com/advanced/devices


Extended Configuration Guide

Complete Multi-App Configuration

Here's a comprehensive configuration with multiple popular streaming apps:

yaml
1# Advanced Samsung TV configuration with multiple apps
2samsungtv_smart:
3 - host: 192.168.1.100
4 name: Living Room Samsung TV
5 port: 8002
6 api_key: YOUR_SMARTTHINGS_API_KEY # Optional but recommended
7 device_name: HomeAssistant
8 device_id: ha_livingroom
9
10 # Application list - adjust IDs based on your TV model
11 app_list:
12 # Streaming Services (Modern IDs for 2020+ TVs)
13 YouTube: "9Ur5IzDKqV.TizenYouTube"
14 Netflix: "3201907018807"
15 Disney Plus: "3201901017640"
16 Prime Video: "3201910019365"
17 Hulu: "3201601007625"
18 HBO Max: "3201601007230"
19 Apple TV: "3201807016597"
20 Paramount Plus: "3201908019041"
21 Peacock: "3201910019378"
22
23 # Music Services
24 Spotify: "3201606009684"
25 YouTube Music: "eDYF0FXdGw.YouTubeMusic"
26
27 # Other Apps
28 Plex: "hKfNDgSKZ3.tizenplex"
29 Twitch: "UhHSKyDHuf.Twitch"
30 Browser: "org.tizen.browser"
31
32 # Source list - HDMI inputs and other sources
33 source_list:
34 HDMI1: "HDMI 1"
35 HDMI2: "HDMI 2"
36 HDMI3: "HDMI 3"
37 HDMI4: "HDMI 4"
38 TV: "TV"
39
40 # Advanced options
41 show_channel_number: true
42 sync_turn_off: true
43 update_method: websocket
44 scan_interval: 30

How to Find Application IDs

Method 1: Using Samsung Developer Mode

Enable Developer Mode on your TV to access advanced debugging:

  1. Open Apps screen
  2. Press 1-2-3-4-5 quickly on your remote
  3. Toggle Developer Mode ON
  4. Enter your computer's IP address
  5. Restart TV

Then install Tizen Studio and use SDB (Smart Development Bridge):

bash
1# Connect to TV
2sdb connect YOUR_TV_IP:26101
3
4# List all installed applications with their IDs
5sdb shell 0 applist
6
7# Example output:
8# App ID: 9Ur5IzDKqV.TizenYouTube, Name: YouTube
9# App ID: 3201907018807, Name: Netflix
10# App ID: org.tizen.browser, Name: Internet

Method 2: Enable Debug Logging in Home Assistant

Add debug logging to capture app IDs automatically:

yaml
1logger:
2 default: warning
3 logs:
4 custom_components.samsungtv_smart: debug
5 custom_components.samsungtv_smart.media_player: debug
6 custom_components.samsungtv_smart.websocket: debug

After enabling debug mode:

  1. Restart Home Assistant
  2. Launch apps on your TV
  3. Check logs at /config/home-assistant.log
  4. Look for lines containing "Application launched" or "app_id"

Method 3: Network Packet Capture

For advanced users, capture WebSocket traffic:

bash
1# Install tcpdump if not available
2sudo apt-get install tcpdump
3
4# Capture traffic on port 8002 (Tizen WebSocket API)
5sudo tcpdump -i any -A 'host YOUR_TV_IP and port 8002' -w samsung_tv.pcap
6
7# Or view in real-time
8sudo tcpdump -i any -A 'host YOUR_TV_IP and port 8002'

Automation Examples

Morning Routine with TV

yaml
1automation:
2 - alias: "Morning News on TV"
3 description: "Turn on TV and launch YouTube at 7 AM on weekdays"
4 trigger:
5 - platform: time
6 at: "07:00:00"
7 condition:
8 - condition: time
9 weekday:
10 - mon
11 - tue
12 - wed
13 - thu
14 - fri
15 - condition: state
16 entity_id: person.home_owner
17 state: "home"
18 action:
19 # Turn on TV
20 - action: media_player.turn_on
21 target:
22 entity_id: media_player.living_room_tv
23
24 # Wait for TV to fully boot
25 - delay:
26 seconds: 8
27
28 # Launch YouTube
29 - action: media_player.select_source
30 target:
31 entity_id: media_player.living_room_tv
32 data:
33 source: "YouTube"
34
35 # Set volume to comfortable level
36 - action: media_player.volume_set
37 target:
38 entity_id: media_player.living_room_tv
39 data:
40 volume_level: 0.25

Play Specific YouTube Video

yaml
1script:
2 play_youtube_video:
3 alias: "Play YouTube Video on TV"
4 description: "Launch YouTube and play a specific video"
5 fields:
6 video_id:
7 description: "YouTube video ID (from URL)"
8 example: "dQw4w9WgXcQ"
9 sequence:
10 # Ensure TV is on
11 - action: media_player.turn_on
12 target:
13 entity_id: media_player.living_room_tv
14
15 - wait_template: "{{ is_state('media_player.living_room_tv', 'on') }}"
16 timeout: "00:00:15"
17 continue_on_timeout: false
18
19 # Launch YouTube app
20 - action: media_player.select_source
21 target:
22 entity_id: media_player.living_room_tv
23 data:
24 source: "YouTube"
25
26 # Wait for app to load
27 - delay:
28 seconds: 3
29
30 # Play video using URL
31 - action: media_player.play_media
32 target:
33 entity_id: media_player.living_room_tv
34 data:
35 media_content_type: "url"
36 media_content_id: "https://www.youtube.com/watch?v={{ video_id }}"

Movie Night Scene

yaml
1script:
2 movie_night:
3 alias: "Movie Night Scene"
4 description: "Set up TV, lights, and audio for movie watching"
5 sequence:
6 # Turn on TV
7 - action: media_player.turn_on
8 target:
9 entity_id: media_player.living_room_tv
10
11 - delay:
12 seconds: 5
13
14 # Launch Netflix
15 - action: media_player.select_source
16 target:
17 entity_id: media_player.living_room_tv
18 data:
19 source: "Netflix"
20
21 # Dim lights to 10%
22 - action: light.turn_on
23 target:
24 entity_id: light.living_room_lights
25 data:
26 brightness: 26 # 10% brightness (255 * 0.10)
27 transition: 2
28
29 # Turn on soundbar
30 - action: media_player.turn_on
31 target:
32 entity_id: media_player.soundbar
33
34 # Set soundbar to movie mode
35 - action: media_player.select_sound_mode
36 target:
37 entity_id: media_player.soundbar
38 data:
39 sound_mode: "Movie"

Channel Surfing Automation

yaml
1script:
2 channel_up:
3 alias: "Channel Up"
4 sequence:
5 - action: media_player.media_next_track
6 target:
7 entity_id: media_player.living_room_tv
8
9 channel_down:
10 alias: "Channel Down"
11 sequence:
12 - action: media_player.media_previous_track
13 target:
14 entity_id: media_player.living_room_tv
15
16 go_to_channel:
17 alias: "Go to Specific Channel"
18 fields:
19 channel_number:
20 description: "Channel number to tune to"
21 example: "102"
22 sequence:
23 - action: media_player.play_media
24 target:
25 entity_id: media_player.living_room_tv
26 data:
27 media_content_type: "channel"
28 media_content_id: "{{ channel_number }}"

Voice Assistant Integration

yaml
1# Example for Google Assistant / Alexa integration
2intent_script:
3 LaunchTVApp:
4 speech:
5 text: "Launching {{ app_name }} on the TV"
6 action:
7 - action: media_player.turn_on
8 target:
9 entity_id: media_player.living_room_tv
10 - delay:
11 seconds: 5
12 - action: media_player.select_source
13 target:
14 entity_id: media_player.living_room_tv
15 data:
16 source: "{{ app_name }}"
17
18# Usage example with Alexa:
19# "Alexa, ask Home Assistant to launch YouTube on TV"
20# "Alexa, ask Home Assistant to launch Netflix on TV"

Troubleshooting Guide

Common Issues and Solutions

Issue 1: TV Not Discovered

Symptoms:

  • Integration shows "Device not found"
  • Cannot connect to TV
  • Connection timeout errors

Solutions:

  1. Check Network Configuration:
bash
1# Verify TV is reachable
2ping YOUR_TV_IP
3
4# Check if port 8002 is open
5telnet YOUR_TV_IP 8002
6# or
7nc -zv YOUR_TV_IP 8002
  1. Enable TV Network Features:

    • Settings → General → Network → Expert Settings
    • Enable "Power On with Mobile"
    • Settings → General → External Device Manager
    • Enable "Device Connect Manager"
    • Enable "Access Notification"
  2. Disable Router AP Isolation:

    • Log into your router
    • Look for "AP Isolation" or "Client Isolation"
    • Ensure it's DISABLED
  3. Firewall Check:

bash
1# On Home Assistant host, check if outbound connection works
2nc -zv YOUR_TV_IP 8002

Issue 2: App Launch Fails

Symptoms:

  • select_source service doesn't launch app
  • TV shows "App not available" error
  • App launches but immediately closes

Solutions:

  1. Verify App Installation:

    • Manually launch the app on TV to confirm it's installed
    • Update the app to the latest version from Samsung App Store
  2. Try Alternative App ID Formats:

yaml
1# If modern ID doesn't work
2YouTube: "9Ur5IzDKqV.TizenYouTube"
3
4# Try legacy ID
5YouTube: "111299001912"
6
7# Or try without package prefix
8YouTube: "TizenYouTube"
  1. Check App ID in Logs:

    • Enable debug logging
    • Launch app manually on TV
    • Check logs for actual app ID being used
  2. Regional Differences:

    • App IDs may vary by region (US, EU, Asia)
    • Use the discovery method to find your region's ID

Issue 3: TV State Not Updating

Symptoms:

  • Entity shows "unavailable"
  • State doesn't change when TV is turned on/off
  • Delayed state updates

Solutions:

  1. Enable SmartThings Integration:
yaml
1samsungtv_smart:
2 - host: 192.168.1.100
3 api_key: YOUR_SMARTTHINGS_TOKEN
4 device_id: YOUR_DEVICE_ID
5 update_method: smartthings # More reliable than websocket
  1. Adjust Scan Interval:
yaml
1samsungtv_smart:
2 - host: 192.168.1.100
3 scan_interval: 15 # Update every 15 seconds (default: 30)
  1. Check Network Latency:
bash
1# Test latency to TV
2ping -c 10 YOUR_TV_IP
3
4# Should be < 10ms for good performance

Issue 4: Authentication/Pairing Issues

Symptoms:

  • "Authentication failed" error
  • TV doesn't show pairing prompt
  • Connection rejected

Solutions:

  1. Reset TV Connection:

    • TV Settings → General → External Device Manager
    • Device Connection Manager → Remove Home Assistant
    • Restart TV
    • Restart Home Assistant
    • Re-add integration
  2. Clear Integration Cache:

bash
1# Stop Home Assistant
2systemctl stop home-assistant
3
4# Remove cached tokens
5rm /config/.storage/samsungtv_smart.*
6
7# Restart Home Assistant
8systemctl start home-assistant
  1. Manual Token Reset:
yaml
1# Add to configuration.yaml temporarily
2samsungtv_smart:
3 - host: 192.168.1.100
4 token: "" # Force new pairing

Issue 5: Volume Control Not Working

Symptoms:

  • Volume commands don't respond
  • Mute doesn't work
  • Volume slider in UI doesn't update

Solutions:

  1. Check TV Audio Output Settings:

    • Settings → Sound → Sound Output
    • Ensure "TV Speaker" is selected
    • If using external audio, control volume on that device instead
  2. Use Correct Volume Service:

yaml
1# For TV speakers
2- action: media_player.volume_set
3 target:
4 entity_id: media_player.living_room_tv
5 data:
6 volume_level: 0.5 # Range: 0.0 to 1.0
7
8# For mute toggle
9- action: media_player.volume_mute
10 target:
11 entity_id: media_player.living_room_tv
12 data:
13 is_volume_muted: true

Debug Logging Configuration

Enable comprehensive logging for troubleshooting:

yaml
1logger:
2 default: warning
3 logs:
4 # Samsung TV Smart component
5 custom_components.samsungtv_smart: debug
6 custom_components.samsungtv_smart.media_player: debug
7 custom_components.samsungtv_smart.websocket: debug
8
9 # SmartThings API (if used)
10 custom_components.samsungtv_smart.smartthings: debug
11
12 # WebSocket client
13 websocket: debug

After enabling, check logs:

bash
1# View live logs
2tail -f /config/home-assistant.log | grep -i samsung
3
4# Or filter for specific issues
5tail -f /config/home-assistant.log | grep -E "samsungtv|error|warning"

Advanced Configuration

Custom HDMI Source Mapping

Create user-friendly names for HDMI inputs:

yaml
1samsungtv_smart:
2 - host: 192.168.1.100
3 source_list:
4 "PlayStation 5": "HDMI1"
5 "Nintendo Switch": "HDMI2"
6 "Blu-ray Player": "HDMI3"
7 "PC": "HDMI4"
8 "Cable Box": "TV"
9 "Chromecast": "HDMI"

Then use in automations:

yaml
1# Switch to gaming console
2- action: media_player.select_source
3 target:
4 entity_id: media_player.living_room_tv
5 data:
6 source: "PlayStation 5"

Wake-on-LAN Configuration

For older TVs that don't support network standby:

yaml
1# Enable wake_on_lan integration
2wake_on_lan:
3
4samsungtv_smart:
5 - host: 192.168.1.100
6 mac: AA:BB:CC:DD:EE:FF # Your TV's MAC address
7 broadcast_address: 192.168.1.255 # Your network broadcast address
8
9automation:
10 - alias: "Turn On TV with WOL"
11 trigger:
12 - trigger: samsungtv.turn_on
13 entity_id: media_player.living_room_tv
14 action:
15 - action: wake_on_lan.send_magic_packet
16 data:
17 mac: AA:BB:CC:DD:EE:FF
18 broadcast_address: 192.168.1.255

Multi-Room TV Synchronization

Control multiple TVs simultaneously:

yaml
1script:
2 all_tvs_off:
3 alias: "Turn Off All TVs"
4 sequence:
5 - action: media_player.turn_off
6 target:
7 entity_id:
8 - media_player.living_room_tv
9 - media_player.bedroom_tv
10 - media_player.kitchen_tv
11
12 all_tvs_netflix:
13 alias: "Launch Netflix on All TVs"
14 sequence:
15 - action: media_player.turn_on
16 target:
17 entity_id:
18 - media_player.living_room_tv
19 - media_player.bedroom_tv
20
21 - delay:
22 seconds: 5
23
24 - action: media_player.select_source
25 target:
26 entity_id:
27 - media_player.living_room_tv
28 - media_player.bedroom_tv
29 data:
30 source: "Netflix"

Security Best Practices

Network Segmentation

Place smart TVs on a separate VLAN for security:

yaml
1# Example VLAN configuration (router-dependent)
2# VLAN 10: Main network (computers, phones)
3# VLAN 20: IoT devices (TVs, smart home)
4# VLAN 30: Home Assistant (can access both)
5
6# Firewall rules:
7# Allow: VLAN 30 → VLAN 20 (HA to TVs)
8# Allow: VLAN 10 → VLAN 20 (phones to TVs)
9# Block: VLAN 20 → Internet (optional, blocks ads/telemetry)

API Token Management

Store SmartThings tokens securely:

yaml
1# Use secrets.yaml instead of configuration.yaml
2# secrets.yaml
3smartthings_token: "your-secret-token-here"
4tv_device_id: "your-device-id-here"
5
6# configuration.yaml
7samsungtv_smart:
8 - host: 192.168.1.100
9 api_key: !secret smartthings_token
10 device_id: !secret tv_device_id

Never commit secrets to version control:

bash
1# .gitignore
2secrets.yaml
3.storage/
4*.log

Privacy Settings on Samsung TV

Minimize data collection:

  1. Settings → Support → Terms & Privacy:

    • Disable "Viewing Information Services"
    • Disable "Interest-Based Advertisement"
    • Review "Privacy Choices"
  2. Settings → General → Smart Features:

    • Disable "Autorun Smart Hub"
    • Disable "Autorun Last App"
  3. Settings → Support → Device Care:

    • Disable "Auto Diagnostic"

Reference: Common Tizen App IDs

Streaming Services

ServiceLegacy IDModern ID (2020+)Notes
YouTube1112990019129Ur5IzDKqV.TizenYouTubeMost common app
Netflix111012000013201907018807May vary by region
Disney+-32019010176402020+ only
Prime Video32019100193543201910019365Multiple IDs exist
Hulu-3201601007625US only
HBO Max-3201601007230Becoming Max
Paramount+-3201908019041Formerly CBS All Access
Peacock-3201910019378US only
Apple TV+-32018070165972019+ models
Plex-hKfNDgSKZ3.tizenplexThird-party app

Music Services

ServiceLegacy IDModern IDNotes
Spotify32016060096843201606009684Same ID across versions
YouTube Music-eDYF0FXdGw.YouTubeMusicSeparate from YouTube
Pandora-3201606009684US only
Tidal-lbusDFJn4K.TidalHigh-res audio

Other Apps

ServiceLegacy IDModern IDNotes
Browser-org.tizen.browserBuilt-in
Twitch-UhHSKyDHuf.TwitchGaming streams
Steam Link-zHBvQ6qEu8.steamlinkPC gaming

Additional Resources

Official Documentation

Community Resources

Development Tools


Summary

This guide covered comprehensive integration of Samsung Tizen OS TVs with Home Assistant, including:

  • ✅ Installation and configuration of Samsung TV Smart component
  • ✅ Understanding and finding Tizen application IDs
  • ✅ SmartThings integration for enhanced reliability
  • ✅ Practical automation examples for common use cases
  • ✅ Troubleshooting common issues
  • ✅ Advanced configuration options
  • ✅ Security and privacy considerations
  • ✅ Complete reference of popular app IDs

With this setup, you can fully automate your Samsung Smart TV through Home Assistant, enabling voice control, scheduled app launches, integration with other smart home devices, and sophisticated automation scenarios.