MEDIA_PLAYER.md

July 21, 2025 ยท View on GitHub

SmartIR Media Player

For this platform to work, we need a .json file containing all the necessary IR commands. Find your device's brand code here and add the number in the device_code field. The component will download it to the correct folder. If your device is not working, you will need to learn your own codes and place the .json file in smartir/codes/media_player/ subfolders. Please note that the device_code field only accepts positive numbers. The .json extension is not required.

Configuration variables:

name (Optional): The name of the device
unique_id (Optional): An ID that uniquely identifies this device. If two devices have the same unique ID, Home Assistant will raise an exception.
device_code (Required): ...... (Accepts only positive numbers)
controller_data (Required): The data required for the controller to function. Enter the IP address of the Broadlink device (must be an already configured device), or the entity id of the Xiaomi IR controller, or the MQTT topic on which to send commands.
delay (Optional): Adjusts the delay in seconds between multiple commands. The default is 0.5
power_sensor (Optional): entity_id for a sensor that monitors whether your device is actually On or Off. This may be a power monitor sensor. (Accepts only on/off states)
source_names (Optional): Override the names of sources as displayed in HomeAssistant (see below)

Add a Broadlink RM device named "Bedroom" via config flow (read the docs).

smartir:

media_player:
  - platform: smartir
    name: Living room TV
    unique_id: living_room_tv
    device_code: 1000
    controller_data: remote.bedroom_remote
    power_sensor: binary_sensor.tv_power

Example (using xiaomi controller):

smartir:

remote:
  - platform: xiaomi_miio
    host: 192.168.10.10
    token: YOUR_TOKEN
    
media_player:
  - platform: smartir
    name: Living room TV
    unique_id: living_room_tv
    device_code: 2000
    controller_data: remote.xiaomi_miio_192_168_10_10
    power_sensor: binary_sensor.tv_power

Example (using mqtt controller):

smartir:

media_player:
  - platform: smartir
    name: Living room TV
    unique_id: living_room_tv
    device_code: 3000
    controller_data: home-assistant/living-room-tv/command
    power_sensor: binary_sensor.tv_power

Example (using LOOKin controller):

smartir:

media_player:
  - platform: smartir
    name: Living room TV
    unique_id: living_room_tv
    device_code: 4000
    controller_data: 192.168.10.10
    power_sensor: binary_sensor.tv_power

Example (using ESPHome):

ESPHome configuration example:

esphome:
  name: my_espir
  platform: ESP8266
  board: esp01_1m

api:
  services:
    - service: send_raw_command
      variables:
        command: int[]
      then:
        - remote_transmitter.transmit_raw:
            code: !lambda 'return command;'

remote_transmitter:
  pin: GPIO14
  carrier_duty_percent: 50%

HA configuration.yaml:

smartir:

media_player:
  - platform: smartir
    name: Living room TV
    unique_id: living_room_tv
    device_code: 2000
    controller_data: my_espir_send_raw_command
    power_sensor: binary_sensor.tv_power

Overriding Source Names

Source names in device files are usually set to the name that the media player uses. These often aren't very descriptive, so you can override these names in the configuration file. You can also remove a source by setting its name to null.

media_player:
  - platform: smartir
    name: Living room TV
    unique_id: living_room_tv
    device_code: 1000
    controller_data: 192.168.10.10
    source_names:
      HDMI1: DVD Player
      HDMI2: Xbox
      VGA: null

Changing channels

Most IR remotes can only send one key at a time (0 to 9) to change your TV channel, changing to other channels requires pressing 2 consecutive keys. SmartIR handles any channel for you with the standard Home Assistant service interface. Here is an example that changes your Kitchen TV to channel 51:

service: media_player.play_media
target:
  entity_id: media_player.kitchen_tv
data:
  media_content_id: 51
  media_content_type: "channel"

Available codes for TV devices:

The following are the code files created by the amazing people in the community. Before you start creating your own code file, try if one of them works for your device. Please open an issue if your device is working and not included in the supported models. Contributing to your own code files is welcome. However, we do not accept incomplete files as well as files related to MQTT controllers.

Philips

CodeSupported ModelsController
100026PFL560HBroadlink
100142PFL3007H/60
37PF9641D/10
Broadlink
100247PFG4109/77Broadlink

Sony

CodeSupported ModelsController
1020KDL-46HX800Broadlink
7020KDL-46EX620ESPHome

LG

CodeSupported ModelsController
104022MT47DCBroadlink
1041LH6235DBroadlink
104243UM7510PSB
OLED55B8SSC
OLED55B9PLA
Broadlink
104332LC2RBroadlink

Samsung

CodeSupported ModelsController
1060UE40F6500
LE40D550
UE40H6400
UE40H7000SL
Broadlink
1061UE40C6000
UE40D6500
UE32H5500
UE22D5000
Broadlink
1062UE40C6000
UE40D6500
UE32H5500
UE22D5000
UN46D6000SF
Broadlink
1063UN55JU7500Broadlink
1064QE49Q7FAMBroadlink
1065QE65Q67RAUXRUBroadlink
7060UA32EH5000MESPHome

Insignia

CodeSupported ModelsController
1080NS-42D510NA15Broadlink

Toshiba

CodeSupported ModelsController
110042C3530DBroadlink

Yamaha

CodeSupported ModelsController
1120UnknownBroadlink
1121Yamaha RX-V375 and others (RAV463/ZA113500 remote)Broadlink
1122VR50590 remoteBroadlink
1123AS201Broadlink
1124YAS-109Broadlink

RME

CodeSupported ModelsController
1140ADI-2 DAC FSBroadlink

Logitech

CodeSupported ModelsController
1160Z906Broadlink
1161Z-5500Broadlink
1162Z-5450Broadlink

TCL

CodeSupported ModelsController
118055EP640Broadlink
118143S6500FS
32A325
Broadlink

Pace

CodeSupported ModelsController
1200TDS850NNZ
TDC850NF
Broadlink

Silver

CodeSupported ModelsController
1220MEOBroadlink

TurboX

CodeSupported ModelsController
1240TXV-2420Broadlink

Thomson

CodeSupported ModelsController
126040FA3203Broadlink

Grunding

CodeSupported ModelsController
1280GSB-810Broadlink

OKI

CodeSupported ModelsController
1300V19B-LED4Broadlink

Sky

CodeSupported ModelsController
1320SkyQ Black
SkyQ Mini
Broadlink

Bauhn

CodeSupported ModelsController
1340AldiBroadlink

Optoma

CodeSupported ModelsController
1360HD27Broadlink

Xiaomi

CodeSupported ModelsController
1380MiBox
MItv
Broadlink

Pioneer

CodeSupported ModelsController
1400X-CM56Broadlink

JBL

CodeSupported ModelsController
1420Cinema SB160Broadlink
1421JBL Bar 2.0 All-in-OneBroadlink

Andersson

CodeSupported ModelsController
1440L4223FDC PVRBroadlink

Edifier

CodeSupported ModelsController
1460R1280DBBroadlink
1461R2000DBBroadlink

ZTE

CodeSupported ModelsController
7460B860HESPHome

Kanto

CodeSupported ModelsController
1480YU6Broadlink

Onkyo

CodeSupported ModelsController
1500TX-SR508, TX-SR700Broadlink

JVC

CodeSupported ModelsController
1520RX-5022RBroadlink

Epson

CodeSupported ModelsController
1540MG-850HDBroadlink

Cambridge Audio

CodeSupported ModelsController
1560AXR100Broadlink

Dialog

CodeSupported ModelsController
1580J-103BFBroadlink

Kivi

CodeSupported ModelsController
160040F600GUBroadlink

Sharp

CodeSupported ModelsController
1620LC-32LE700E
LC-32LE700S
LC-40LE700E
LC-40LE700S
LC-46LE700E
LC-46LE700S
LC-52LE700E
LC-52LE700S
LC-32LX700E
LC-40LX700E
LC-46LX700E
LC-32LU700E
LC-32LU700S
LC-40LU700E
LC-40LU700S
LC-46LU700E
LC-46LU700S
LC-32LE705E
LC-32LE705S
LC-40LE705E
LC-40LE705S
LC-46LE705E
LC-46LE705S
LC-52LE705E
LC-52LE705S
LC-32LX705E
LC-40LX705E
LC-46LX705E
LC-32LU705E
LC-32LU705S
LC-40LU705E
LC-40LU705S
LC-46LU705E
LC-46LU705S
Broadlink
CodeSupported ModelsController
164032LC818HBroadlink