Skip to content

Latest commit

 

History

History
148 lines (123 loc) · 5.4 KB

MEDIA_PLAYER.md

File metadata and controls

148 lines (123 loc) · 5.4 KB

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 compoenent 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.
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)

Example (using broadlink controller):

smartir:

switch:
  - platform: broadlink
    host: 192.168.10.10
    mac: '00:00:00:00:00:00'
    
media_player:
  - platform: smartir
    name: Living room TV
    unique_id: living_room_tv
    device_code: 1000
    controller_data: 192.168.10.10
    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

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

Available codes for TV devices:

Below are the code files created by the 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.

Philips

Code Supported Models Controller
1000 26PFL560H Broadlink

Sony

Code Supported Models Controller
1020 KDL-46HX800 Broadlink

LG

Code Supported Models Controller
1040 22MT47DC Broadlink
1041 LH6235D Broadlink

Samsung

Code Supported Models Controller
1060 UE40F6500
LE40D550
UE40H6400
Broadlink

Insignia

Code Supported Models Controller
1080 NS-42D510NA15 Broadlink

Toshiba

Code Supported Models Controller
1100 42C3530D Broadlink

Yamaha

Code Supported Models Controller
1120 Unknown Broadlink
1121 Yamaha RX-V375 and others (RAV463/ZA113500 remote) Broadlink

RME

Code Supported Models Controller
1140 ADI-2 DAC FS Broadlink

Logitech

Code Supported Models Controller
1160 Z906 Broadlink
1161 Z-5500 Broadlink

TCL

Code Supported Models Controller
1180 55EP640 Broadlink