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
ED1 Rev 1.0 (recommended)
- 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
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
Option A: HACS (recommended)
- Install HACS
- Go to HACS > Integrations
- Search for “SmartIR” and install it
- Restart Home Assistant
Option B: Manual
cd config/custom_components
git clone https://github.com/smartHomeHub/SmartIR.git
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)
- Press the “IR Learn Mode” button in Home Assistant
- Select a slot (0-9)
- Point your remote at the ED1 and press a button
- The code is saved automatically
Method 2: Events in Home Assistant
- Open Developer Tools > Events
- Listen for the
esphome.ed1_ir_received event
- Press any button on your remote
- 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_.
| Entity | Type | Description |
|---|
text.…last_ir_protocol | Text | Last detected protocol |
text.…last_ir_code | Text | Last received code |
sensor.…ir_activity_count | Sensor | Received code counter |
button.…ir_learn_mode | Button | Activate learn mode |
button.…ir_learn_stop | Button | Stop learn mode |
button.…ir_send_slot_0 | Button | Send code from slot 0 |
Available services
All service IDs are prefixed with esphome.ed1_smartir_bridge_.
| Service | Description | Parameters |
|---|
…send_ir_nec | Send NEC code | address, command |
…send_ir_lg | Send LG code | data |
…send_ir_samsung | Send Samsung code | data |
…send_ir_sony | Send Sony code | data, nbits |
…send_ir_rc5 | Send RC5 code | address, command |
…start_learn_mode | Start learn mode | slot (0-9) |
…stop_learn_mode | Stop learn mode | - |
Finding device codes
SmartIR database
Visit smartir.readthedocs.io for the full list of supported codes.
Common codes
| Device | Brand | SmartIR code | Protocol |
|---|
| TV | LG | 1060 | NEC/LG |
| TV | Samsung | 1020, 1040 | Samsung |
| TV | Sony | 1010 | Sony |
| A/C | LG | 1060 | NEC |
| A/C | Samsung | 1200 | NEC |
Capturing custom codes
If your device is not in the database:
- Use the ED1 learn mode
- Capture each button on the remote
- Note the
address and command values
- 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