中文 | English
A plugin to simplify SmartIR configuration file generation, automating IR code learning through Broadlink devices.
- 🎯 Device Support: Climate, TV, Fan and other device types
- 📁 Template System: Pre-built templates & custom template support
- 🌡️ Climate Control: Customizable temperature range (16-32℃)
- 📶 IR Learning: Direct IR code acquisition via Broadlink devices
- 🧪 Command Validation: Post-learning command verification
- 🚀 Auto-generation: SmartIR-compatible JSON configuration output
-
Install HACS
Follow official guide if not installed -
Add Custom Repository
- Open HACS ➡️ Integrations
- Click
⋮➡️ Custom repositories - Add repository URL:
https://github.com/Seifon/smartir_learn - Category: Integration
-
Install Plugin
- Search "SmartIR Learn" in HACS Integrations
- Click Download
- Restart HomeAssistant after installation
- Copy
smartir_learnfolder tocustom_componentsdirectory - Restart HomeAssistant
- Navigate to Configuration ➡️ Devices & Services ➡️ Integrations
- Click + Add Integration
- Search and select "SmartIR Learn"
- Connection methods:
Auto Scan: Discover Broadlink devices in local networkManual Input: Direct IP entry
Sample Configuration:
device_type: climate
manufacturer: Midea
supported_models: MS-05A1
temperature_range: 16-30℃
- Select commands from template
- Follow on-screen instructions to send IR signals
- Automatically save learned codes
Example output path:
/config/custom_components/smartir/codes/climate/202503091445.json- Place generated JSON in SmartIR codes directory:
cp 202503091445.json /config/custom_components/smartir/codes/climate/
- Configure SmartIR entity:
climate: - platform: smartir name: Living Room AC unique_id: living_ac device_code: 202503091445 controller_data: broadlink_remote_entity_id
- Broadlink device must be in same network as HA
- Disable 'Device Lock' in Broadlink APP
- SmartIR plugin must be pre-installed
🔧 Troubleshooting:
Common solutions:
1. Connection timeout → Verify device IP and network
2. Learning failure → Ensure remote is <5cm from device
3. File save error → Check directory permissions🔄 Template Development: Sample template structure:
{
"manufacturer": "Manufacturer Name",
"supportedModels": ["Model A", "Model B"],
"commands": {
"power": "JgASKE5MTk..."
}
}When reporting issues, please include:
- HomeAssistant version
- Broadlink device model
- Error logs snippet
- Relevant config files (sanitized)
✅ Tested Version: HomeAssistant 2025.2.0
📜 License: MIT License