Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.glifo.cat/llms.txt

Use this file to discover all available pages before exploring further.

This guide explains how to integrate the ED1 board with SmartIR to control IR devices from Home Assistant.

What is SmartIR?

SmartIR is a Home Assistant integration that lets you control climate devices, fans, and media players via infrared. It uses a database with thousands of predefined IR codes.

Architecture

Required hardware

  • IR Receiver: GPIO33
  • IR Transmitter: GPIO32 (built-in IR LED)
  • Capability: Full RX + TX

ED1 Rev 2.3

  • IR Receiver: GPIO35
  • IR Transmitter: Not available (requires external module)
  • Capability: Receive only

Configuration

1. Install the firmware

Copy ed1-smartir-bridge.yaml to your ESPHome directory and compile:
esphome run ed1-smartir-bridge.yaml

2. Configure pins for your board revision

For Rev 1.0 (edit the YAML file):
substitutions:
  ir_receiver_pin: "GPIO33"
  # Uncomment the following line:
  ir_transmitter_pin: "GPIO32"

packages:
  # ... other packages ...
  ir_tx: !include packages/ir-transmitter.yaml # Uncomment this line
For Rev 2.3:
substitutions:
  ir_receiver_pin: "GPIO35"
  # No transmitter available

3. Install SmartIR in Home Assistant

  1. Install HACS
  2. Go to HACS > Integrations
  3. Search for “SmartIR” and install it
  4. Restart Home Assistant

Option B: Manual

cd config/custom_components
git clone https://github.com/smartHomeHub/SmartIR.git

4. Configure SmartIR

Add the following to your configuration.yaml:
smartir:

climate:
  - platform: smartir
    name: Aire Acondicionado Sala
    unique_id: ac_sala
    device_code: 1060 # Your model's code
    controller_data:
      service: esphome.ed1_smartir_bridge_send_ir_nec
      address: 0x4004
    temperature_sensor: sensor.temperatura_sala
    humidity_sensor: sensor.humedad_sala

fan:
  - platform: smartir
    name: Ventilador Dormitorio
    unique_id: fan_dorm
    device_code: 1020
    controller_data:
      service: esphome.ed1_smartir_bridge_send_ir_nec
      address: 0x0707

media_player:
  - platform: smartir
    name: TV Salón
    unique_id: tv_salon
    device_code: 1060
    controller_data:
      service: esphome.ed1_smartir_bridge_send_ir_nec
      address: 0x0400

Using the bridge

Capturing IR codes

Method 1: Learn mode (on the device)

  1. Press the “IR Learn Mode” button in Home Assistant
  2. Select a slot (0-9)
  3. Point your remote at the ED1 and press a button
  4. The code is saved automatically

Method 2: Events in Home Assistant

  1. Open Developer Tools > Events
  2. Listen for the esphome.ed1_ir_received event
  3. Press any button on your remote
  4. You will see the received code data

Sending IR codes

From HA services

service: esphome.ed1_smartir_bridge_send_ir_nec
data:
  address: 16388 # 0x4004 in decimal
  command: 2295 # 0x08F7 in decimal
service: esphome.ed1_smartir_bridge_send_ir_lg
data:
  data: 551489775 # LG code in decimal

From learned slots

Use the “IR Send Slot X” buttons to send previously saved codes.

Available entities

All entity IDs are prefixed with ed1_smartir_bridge_.
EntityTypeDescription
text.…last_ir_protocolTextLast detected protocol
text.…last_ir_codeTextLast received code
sensor.…ir_activity_countSensorReceived code counter
button.…ir_learn_modeButtonActivate learn mode
button.…ir_learn_stopButtonStop learn mode
button.…ir_send_slot_0ButtonSend code from slot 0

Available services

All service IDs are prefixed with esphome.ed1_smartir_bridge_.
ServiceDescriptionParameters
…send_ir_necSend NEC codeaddress, command
…send_ir_lgSend LG codedata
…send_ir_samsungSend Samsung codedata
…send_ir_sonySend Sony codedata, nbits
…send_ir_rc5Send RC5 codeaddress, command
…start_learn_modeStart learn modeslot (0-9)
…stop_learn_modeStop learn mode-

Finding device codes

SmartIR database

Visit smartir.readthedocs.io for the full list of supported codes.

Common codes

DeviceBrandSmartIR codeProtocol
TVLG1060NEC/LG
TVSamsung1020, 1040Samsung
TVSony1010Sony
A/CLG1060NEC
A/CSamsung1200NEC

Capturing custom codes

If your device is not in the database:
  1. Use the ED1 learn mode
  2. Capture each button on the remote
  3. Note the address and command values
  4. Create a JSON configuration file for SmartIR

Troubleshooting

Not receiving IR codes

  • Verify that the RX pin is correctly configured
  • Make sure the IR receiver is not obstructed
  • Check that the remote has battery

Not sending IR codes (Rev 1.0)

  • Verify that the IR transmitter is uncommented in the YAML
  • Use your phone camera to check if the IR LED blinks
  • Make sure the ED1 is within range of the target device