DieseRC 4-Channel eWeLink Relay — Home Assistant Integration
Created using Claude Code
Control your DieseRC 4-Channel WiFi Smart Switch (DC 5V–36V passive dry-contact relay) from Home Assistant using the SonoffLAN custom integration via HACS.
No firmware flashing required. Works with the original eWeLink firmware over your local network (LAN) and/or the eWeLink cloud.
Device Details
| Property | Value |
|---|---|
| Brand | DieseRC |
| Channels | 4 independent dry-contact relays |
| Input voltage | DC 5V / 12V / 24V / 36V |
| App | eWeLink |
| Protocol | eWeLink (CoolKit) |
| Likely UIID | 7 (4ch strip) or 84 (4ch) |
| Modes | Inching (momentary) / Self-locking (toggle) |
Prerequisites
- Home Assistant 2023.6 or newer
- HACS installed
- An active eWeLink account with the DieseRC device already paired
- The device and HA on the same 2.4 GHz Wi-Fi network
Step 1 — Install SonoffLAN via HACS
- Open Home Assistant → HACS → Integrations
- Click ⋮ → Custom repositories
- Add
AlexxIT/SonoffLANwith category Integration (skip if it already appears in search) - Search for Sonoff and click Download
- Restart Home Assistant
Or click the badge below if your HA instance is reachable:
Step 2 — Add the Integration
- Go to Settings → Devices & Services → Add Integration
- Search for Sonoff
- Enter your eWeLink email and password
- Set Mode to
auto(uses LAN when available, falls back to cloud) - Click Submit
HA will pull your device list from eWeLink and save it locally. Your 4-channel relay should appear as four switch entities.
Step 3 — Configure configuration.yaml
Add the following to your configuration.yaml to label each channel correctly and ensure proper device class assignment.
sonoff: devices: # Replace YOUR_DEVICE_ID with the 10-character ID shown in the eWeLink app # (tap the device → top-right ⋮ → Device Info → Device ID) YOUR_DEVICE_ID: name: "DieseRC 4CH Relay" device_class: - switch: 1 # Channel 1 — rename as needed (e.g. "Relay 1") - switch: 2 # Channel 2 - switch: 3 # Channel 3 - switch: 4 # Channel 4
Rename channels to match your load
sonoff: devices: YOUR_DEVICE_ID: name: "DieseRC 4CH Relay" device_class: - switch: 1 # e.g. Gate - switch: 2 # e.g. Garden Lights - switch: 3 # e.g. Pump - switch: 4 # e.g. Spare
After saving, go to Settings → Devices & Services → Sonoff and rename each entity from the UI to whatever label matches your wiring.
Step 4 — If the Device Is Not Detected (UIID Override)
Some DieseRC units register as an unrecognized UIID. If your relay appears as a single switch or shows incorrect channel count, add the extra override to force the correct protocol:
sonoff: devices: YOUR_DEVICE_ID: name: "DieseRC 4CH Relay" extra: { uiid: 7 } # Try 7 first (4ch strip). If wrong, try 84. device_class: - switch: 1 - switch: 2 - switch: 3 - switch: 4
How to find your actual UIID:
- In HA go to Settings → Devices & Services → Sonoff → ⋮ → Download diagnostics
- Open the JSON file and look for
"uiid"inside your device entry - Use that value in the
extraoverride if needed
Step 5 — Inching (Momentary) Mode
If you need a channel to pulse briefly (e.g. a gate trigger), configure inching mode in the eWeLink app per channel, then automate it in HA:
Example automation: pulse Channel 1 for gate release automation: - alias: "Gate pulse" trigger: - platform: state entity_id: input_button.gate_trigger action: - service: switch.turn_on target: entity_id: switch.dieserc_4ch_relay_1 - delay: "00:00:01" - service: switch.turn_off target: entity_id: switch.dieserc_4ch_relay_1
Or use the inching duration set in the eWeLink app — HA just sends turn_on and the device handles the auto-off timing itself.
No, I cannot provide support or modifications.
Yes, you can fork my repo and make all the changes you like.