Important Notice: This documentation, hardware designs, and firmware are for the pre-release version of the HomeMaster system. All information is preliminary and may contain errors or be subject to change.
- Hardware: Modules are currently in the prototyping and testing phase. Final production versions may differ.
- Firmware: Firmware is under active development and is considered beta. Features, configurations, and stability are being refined.
Please use this information for evaluation and development purposes only Firmware Version: 2025-10 snapshot
HOMEMASTER – Modular control. Custom logic.

The WLD-521-R1 is a configurable smart I/O module designed for leak detection, water flow metering, heat energy monitoring, and local irrigation control.
It includes 5 opto-isolated digital inputs, 2 SPDT relays, and optional 4 buttons and 4 LEDs for manual control and local status indication. Configuration is performed via the WebConfig interface over USB-C (Web Serial).
The module connects over RS-485 (Modbus RTU) to a MicroPLC or MiniPLC, enabling deployment in water management, hydronic heating, garden irrigation, and safety automation systems.
The WLD-521-R1 is a DIN‑rail smart I/O module for leak detection, pulse water metering, ΔT heat monitoring, and local irrigation control. It exposes 5 opto‑isolated digital inputs, 2 SPDT relays, 4 user buttons, and 4 status LEDs and is serviced over USB‑C.
It integrates with a MiniPLC/MicroPLC (or other PLC/SCADA/HA controllers) via Modbus RTU over RS‑485. Configuration is done in a browser using the WebConfig tool (Web Serial over USB‑C): set Modbus params, choose per‑input modes (sensor/counter), link 1‑Wire temperature sensors, and enable autonomous irrigation/flow‑safety logic.
In one line: a resilient water‑safety/flow module with local logic that still plays perfectly with your PLC and Home Assistant stack.
| Subsystem | Qty | Description |
|---|---|---|
| Digital Inputs | 5 | Opto‑isolated inputs with MOSFET front‑ends, debouncing, and isolated return (GND_ISO); suitable for dry contacts or pulse flowmeters. |
| Analog Outputs | 0 | — |
| Relays | 2 | SPDT dry contacts (~3 A @ 250 VAC); driven via opto‑isolated stages and RC/snubber-protected. Terminals NO/COM/NC exposed. |
| 1‑Wire Bus | 1 | Protected 3‑pin header (+5 V / DATA / GND) with level shifting and ESD protection; supports DS18B20 sensors. |
| LEDs | 4 user + status | 4 user LEDs controlled via transistor drivers; additional LEDs for power and RS‑485 TX/RX activity. |
| Buttons | 4 | Front-panel tactile buttons connected to MCU GPIOs for relay override, irrigation control, and test functions. |
| Modbus RTU | Yes | RS‑485 transceiver with surge/bias/ESD protection and DE/RE control. Typical config: 19200 baud, 8N1. |
| USB‑C | Yes | Type-C port with ESD protection and Web Serial interface; used for configuration via WebConfig. |
| Power | 24 VDC | Fused, reverse-protected input. Internal buck regulator provides +5 V and +3.3 V. Isolated +5 V and +12 V rails available for sensor power. |
| MCU | RP2350A | Dual-core MCU with QSPI flash and 12 MHz crystal; SWD debug header available. |
| Protection | TVS, PTC, ESD | Multi-stage protection on RS‑485 and USB lines; isolated sensor rails; opto-isolated inputs; snubbers on relays. |
Optional: 1‑Wire bus for DS18B20 sensors (e.g. supply/return temperatures for heat energy monitoring).
The WLD-521-R1 is a smart Modbus RTU slave. It can operate autonomously for leak/flow/irrigation safety logic, while exposing its I/O and sensors to a PLC, ESPHome controller, or SCADA system.
| Role | Description |
|---|---|
| System Position | Expansion module on RS-485 trunk |
| Master Controller | MiniPLC / MicroPLC or any third-party Modbus RTU master |
| Address / Baud | Configurable via WebConfig (1–255, 9600–115200 baud) |
| Bus Type | RS‑485 multi-drop (A/B/COM terminals) |
| USB‑C Port | For configuration/diagnostics using Web Serial (Chrome/Edge) |
| Default Modbus ID | 3 (user-changeable per module) |
| Daisy-Chaining | Multiple modules supported; assign unique IDs to each device |
⚠️ Note: If multiple WLD modules are connected to the same RS‑485 segment, make sure to assign unique Modbus addresses using WebConfig.
The WLD-521-R1 supports a range of real-world applications in leak detection, flow metering, hydronic energy monitoring, and irrigation control. Below are practical scenarios with step-by-step configuration.
Goal: Detect water leaks and immediately shut off the water supply using a relay-controlled valve.
Steps:
Goal: Automate watering safely with flow monitoring and environmental interlocks.
Steps:
Goal: Track water usage in liters using pulse flow meters.
Steps:
Goal: Measure heat power and energy from flow and temperature sensors.
Steps:
These safety instructions apply to the WLD‑521‑R1 module. Improper handling or wiring can cause equipment damage, system failure, or personal injury.
⚠️ SELV only — This device operates on Safety Extra Low Voltage (24 VDC only). Never apply AC mains or high-voltage sources.
| Requirement | Detail |
|---|---|
| Qualified Personnel | Only trained installers or technicians may handle wiring and system integration. |
| Power Isolation | Disconnect 24 VDC power before modifying terminals or servicing the device. |
| Environmental Limits | Install inside a dry, clean DIN enclosure. Avoid condensation, dust, or vibration. |
| Grounding | Connect 0 V, RS-485 COM, and GND_ISO appropriately. Maintain logic and sensor isolation. |
| Voltage Compliance | Observe electrical ratings: 24 VDC supply, 5/12 V sensor outputs, max 3 A relay load. |
| Task | Guidance |
|---|---|
| DIN Mounting | Secure module on 35 mm DIN rail. Apply strain relief to all wiring. |
| ESD Precaution | Use anti-static strap and handle boards by casing only. |
| Power Wiring | Connect regulated 24 VDC to V+ / 0V terminals. Fuse upstream. |
| Relay Wiring | Use NO / COM / NC terminals for each relay. Relays are dry contact SPDT only. External loads must have their own power. |
| Digital Inputs | Connect dry-contact sensors or open-collector devices to I1–I5, with return to GND_ISO (not 0V). |
| Sensor Power | Use +5 V or +12 V outputs (right-side terminals) for low-power field sensors only. |
| GND Domains | Keep GND_ISO (inputs) and 0 V / GND (logic) isolated unless explicitly bridged. |
| RS-485 Wiring | Wire A/B/COM to RS‑485 master. Maintain A↔A, B↔B polarity. COM = signal reference. Terminate both ends with ~120 Ω. |
| Commissioning | Before applying power: verify polarity, relay contact wiring, RS‑485 line, and ensure sensor loads are within spec. |
| Interface | Warning |
|---|---|
| V+ / 0V (Top-left) | Connect only regulated 24 VDC. Reverse protected. Never exceed 30 V. |
| +5 V / +12 V (Bottom-right) | Isolated sensor supply. Use for dry-contact sensors only. Protected by DC-DC and fuses. Not for powering relays or actuators. |
| Interface | Warning |
|---|---|
| Inputs I1–I5 (Top row) | Opto-isolated channels. Connect only dry-contact or open-collector sources. Return via GND (top right) (this is GND_ISO, not logic ground). |
| Relays (Bottom row) | NC / COM / NO per relay. Dry contact only. Max: 3 A @ 250 VAC / 30 VDC. Use snubbers for inductive loads (e.g. pumps, valves). |
| Relay Power | Relay contacts are not powered. External load must have its own power source. |
| Interface | Warning |
|---|---|
| RS‑485 A/B/COM (Bottom left) | Use twisted pair for A/B. COM is signal ground. Protect against surges. Not suitable for long unshielded runs or outdoor wiring. |
| USB‑C (Front panel) | For setup only using Web Serial in Chrome/Edge. ESD protected. Not for field use or runtime connection. Disconnect after configuration. |
| Element | Notes |
|---|---|
| Buttons (U1–U4) | Configurable: relay override, irrigation start/stop. Button press may override Modbus or automation logic. |
| LEDs (U1–U4) | Configurable for DI, Relay, or Irrigation indication. Driven from MCU via transistors. |
| Area | Recommendation |
|---|---|
| Cable Shielding | Use shielded cable for RS‑485 and sensor lines. Terminate shield at controller end only. Avoid routing near motors/VFDs. |
| Inductive Loads | Use RC snubbers or TVS across relay contacts for solenoids, pumps, or coils. |
| Category | Item | Details |
|---|---|---|
| Hardware | WLD‑521‑R1 | DIN‑rail module with 5 opto DIs, 2 SPDT relays, 4 buttons, 4 LEDs, RS‑485, USB‑C, 1‑Wire, and isolated +5 V / +12 V sensor rails. |
| Controller (master) | HomeMaster MiniPLC/MicroPLC or any Modbus RTU master device. | |
| 24 VDC PSU (SELV) | Regulated 24 VDC supply to V+ / 0V; size to include module + sensors. | |
| RS‑485 cable | Shielded twisted pair for A/B + COM (GND); use 120 Ω termination at both bus ends. | |
| USB‑C cable | Used for setup/config via WebConfig in Chromium browser. | |
| DIN enclosure | Dry, clean cabinet with DIN rail; provide strain relief and shield grounding. | |
| Software | WebConfig (browser) | Configure Address / Baud, assign Inputs / Relays / Buttons / LEDs, irrigation zones, sensors, etc. |
| ESPHome (optional) | On controller: polls Modbus, exposes WLD sensors and relays to Home Assistant. | |
| Field I/O | Dry contacts | Inputs DI1…DI5 return to GND_ISO; supports leak probes, flow meters, or buttons. |
| Relay loads | RLY1/RLY2: COM/NO/NC dry contacts; up to 3 A @ 250 VAC. Use RC/TVS snubbers for inductive loads. | |
| Sensor power (isolated) | Bottom-right +12 V / +5 V ISO terminals for low-power sensors only. Not for actuators. | |
| Tools | Screwdrivers, ferrules, meter | Verify terminal torque, polarity, and RS‑485 A/B wiring. Use 120 Ω resistors and surge protectors if needed. |
Status LEDs:
• PWR – steady ON when powered
• TX/RX – blink on RS‑485 activity
• USB – active when connected for WebConfig
The WLD‑521‑R1 operates from a regulated 24 VDC supply connected to the top terminals labeled V+ and 0V. The power supply should be SELV-rated and appropriately sized.
| Load | Typical Current |
|---|---|
| Base logic + LEDs | ~50 mA |
| Each relay (coil) | ~40–60 mA |
| Sensor rails (total) | ≤150 mA (shared between +5 V ISO / +12 V ISO) |
Recommended PSU: ≥300 mA per module (with 30% headroom).
⚠️ Only use the sensor rails for low-power sensors like leak probes and flow meters.
Never power relays, valves, or actuators from the module’s +5 V / +12 V outputs.
The WLD‑521‑R1 uses Modbus RTU over RS‑485 for all runtime communication, and USB‑C for setup via browser.
| Terminal | Function |
|---|---|
| A | RS‑485 A (Data +) |
| B | RS‑485 B (Data –) |
| COM | RS‑485 reference ground (connect to controller GND) |
| Parameter | Default | Range |
|---|---|---|
| Address | 3 | 1–255 (set via WebConfig) |
| Baudrate | 19200 | 9600–115200 (WebConfig) |
| Format | 8N1 | 8 data bits, no parity, 1 stop bit |
WebConfig allows you to set the Modbus address and baudrate via USB‑C before connecting to a PLC or ESPHome controller.
WLD-521-R1 Modbus Register Table
| Address | Name | Type | Description |
|---|---|---|---|
| 1-5 | DI1-DI5 | Boolean | Digital Input states (0=OFF, 1=ON) |
| 60-61 | RLY1-RLY2 | Boolean | Relay output states (0=OFF, 1=ON) |
| 90-93 | LED1-LED4 | Boolean | User LED states (0=OFF, 1=ON) |
| 100-103 | BTN1-BTN4 | Boolean | Button pressed states (0=Released, 1=Pressed) |
| Address | Name | Type | Description |
|---|---|---|---|
| 200 | Relay 1 State | Boolean | Relay 1 ON/OFF state (maintained) |
| 201 | Relay 2 State | Boolean | Relay 2 ON/OFF state (maintained) |
| 220-224 | DI1-DI5 Enable | Boolean | Digital Input enable state (maintained) |
| Address | Name | Type | Description |
|---|---|---|---|
| 340-344 | DI1-DI5 Counter Reset | Boolean | Reset counter for DI (pulse, auto-cleared) |
All data accessible via FC03 Read Holding Registers.
| Address | Name | Type | Description |
|---|---|---|---|
| 1-5 | DI1-DI5 State | UINT16 | Digital Input states (mirror of ISTS) |
| 60-61 | RLY1-RLY2 State | UINT16 | Relay output states (mirror of ISTS) |
| 90-93 | LED1-LED4 State | UINT16 | User LED states (mirror of ISTS) |
| 100-103 | BTN1-BTN4 State | UINT16 | Button pressed states (mirror of ISTS) |
| Address | Name | Type | Unit | Description |
|---|---|---|---|---|
| 104-105 | DI1 Flow Rate | UINT32 | L/min × 1000 | Flow rate for DI1 |
| 106-107 | DI2 Flow Rate | UINT32 | L/min × 1000 | Flow rate for DI2 |
| 108-109 | DI3 Flow Rate | UINT32 | L/min × 1000 | Flow rate for DI3 |
| 110-111 | DI4 Flow Rate | UINT32 | L/min × 1000 | Flow rate for DI4 |
| 112-113 | DI5 Flow Rate | UINT32 | L/min × 1000 | Flow rate for DI5 |
| 114-115 | DI1 Flow Accumulated | UINT32 | L × 1000 | Total flow for DI1 |
| 116-117 | DI2 Flow Accumulated | UINT32 | L × 1000 | Total flow for DI2 |
| 118-119 | DI3 Flow Accumulated | UINT32 | L × 1000 | Total flow for DI3 |
| 120-121 | DI4 Flow Accumulated | UINT32 | L × 1000 | Total flow for DI4 |
| 122-123 | DI5 Flow Accumulated | UINT32 | L × 1000 | Total flow for DI5 |
| Address | Name | Type | Unit | Description |
|---|---|---|---|---|
| 124-125 | DI1 Heat Power | SINT32 | W | Heat power for DI1 |
| 126-127 | DI2 Heat Power | SINT32 | W | Heat power for DI2 |
| 128-129 | DI3 Heat Power | SINT32 | W | Heat power for DI3 |
| 130-131 | DI4 Heat Power | SINT32 | W | Heat power for DI4 |
| 132-133 | DI5 Heat Power | SINT32 | W | Heat power for DI5 |
| 134-135 | DI1 Heat Energy | UINT32 | Wh × 1000 | Total heat energy for DI1 |
| 136-137 | DI2 Heat Energy | UINT32 | Wh × 1000 | Total heat energy for DI2 |
| 138-139 | DI3 Heat Energy | UINT32 | Wh × 1000 | Total heat energy for DI3 |
| 140-141 | DI4 Heat Energy | UINT32 | Wh × 1000 | Total heat energy for DI4 |
| 142-143 | DI5 Heat Energy | UINT32 | Wh × 1000 | Total heat energy for DI5 |
| 144-145 | DI1 Heat ΔT | SINT32 | °C × 1000 | Temperature difference for DI1 |
| 146-147 | DI2 Heat ΔT | SINT32 | °C × 1000 | Temperature difference for DI2 |
| 148-149 | DI3 Heat ΔT | SINT32 | °C × 1000 | Temperature difference for DI3 |
| 150-151 | DI4 Heat ΔT | SINT32 | °C × 1000 | Temperature difference for DI4 |
| 152-153 | DI5 Heat ΔT | SINT32 | °C × 1000 | Temperature difference for DI5 |
| Address | Name | Type | Unit | Description |
|---|---|---|---|---|
| 154-155 | OW Sensor 1 Temp | SINT32 | °C × 1000 | 1-Wire sensor #1 temperature |
| 156-157 | OW Sensor 2 Temp | SINT32 | °C × 1000 | 1-Wire sensor #2 temperature |
| 158-159 | OW Sensor 3 Temp | SINT32 | °C × 1000 | 1-Wire sensor #3 temperature |
| 160-161 | OW Sensor 4 Temp | SINT32 | °C × 1000 | 1-Wire sensor #4 temperature |
| 162-163 | OW Sensor 5 Temp | SINT32 | °C × 1000 | 1-Wire sensor #5 temperature |
| 164-165 | OW Sensor 6 Temp | SINT32 | °C × 1000 | 1-Wire sensor #6 temperature |
| 166-167 | OW Sensor 7 Temp | SINT32 | °C × 1000 | 1-Wire sensor #7 temperature |
| 168-169 | OW Sensor 8 Temp | SINT32 | °C × 1000 | 1-Wire sensor #8 temperature |
| 170-171 | OW Sensor 9 Temp | SINT32 | °C × 1000 | 1-Wire sensor #9 temperature |
| 172-173 | OW Sensor 10 Temp | SINT32 | °C × 1000 | 1-Wire sensor #10 temperature |
1 to reset the corresponding counter.0 (OFF) or 1 (ON)1 (ON) or 0 (OFF)1 (will be auto-cleared by firmware)Use diagrams and explain:
The WLD‑521‑R1 is configured using WebConfig — a driverless USB‑C interface that runs in Chrome/Edge via Web Serial. All settings apply immediately and are saved to the module’s flash.
You can safely reset or update Modbus settings at any time.
In the Modbus panel:
📸 
Each DI has:
Water sensorSoil moistureWater counter (flow meter input)Water sensor / Soil moisture:None, Toggle, or PulseAll, Relay 1, Relay 2, NoneWater counter:📸 
Enable Heat on a DI to calculate:
Sensor A – Sensor B→ Formula:
Power = cp × ρ × ΔT × FlowRate
Energy = ∑ Power × Δt
You can:
📸 
Modbus, Local Logic, or NoneRelays are dry contact. Wire loads to
NO / NC / COM.
📸 
Each LED can be:
Solid or BlinkDI1–DI5, Relay 1/2, Irrig 1/2, Override R1/R2The State Dot shows live ON/OFF.
📸 
Each button triggers an Action:
Toggle R1/R2, Pulse R1/R2Start/Stop Zone 1/2R1/R2 Override Toggle📸 
Use:
If using irrigation windows or daily counters:
CMD_TIME_MIDNIGHT to sync at 00:00HREG 1100)HREG 1101)This ensures irrigation windows behave predictably and counters roll over cleanly.
✅ WebConfig saves all changes immediately to flash. You can disconnect USB-C after setup — the device runs autonomously and responds to Modbus polling.
Summarize steps in 3 phases:
This section consolidates diagrams, I/O, electrical limits, firmware behavior, connector map, mechanics, and compliance for quick reference.
System Block Diagram
|
Terminal Map
|
Field Board Layout
|
MCU Board Layout
|
| Interface | Qty | Description |
|---|---|---|
| Digital Inputs | 5 | Opto‑isolated DI (dry contact / open‑collector / pulse for flow meters); isolated return (GND_ISO). |
| Relay Outputs | 2 | SPDT dry contact (NO/C/NC); snubbered; local/Modbus/logic control. |
| User LEDs | 4 | Configurable (Solid/Blink) for DI/Relay/Irrigation/Override feedback. |
| User Buttons | 4 | Assignable actions (Relay toggle/pulse, Override, Irrigation start/stop). |
| RS‑485 (Modbus) | 1 | Half‑duplex multi‑drop; A/B/COM terminals; fail‑safe & surge‑protected. |
| USB‑C | 1 | Service/setup via WebConfig (Web Serial). |
| 1‑Wire Bus | 1 | +5 V / DATA / GND (logic domain) for DS18B20 sensors. |
| Sensor Power | 2 | Isolated +12 V / +5 V rails for low‑power sensors only (fused, filtered). |
| Parameter | Min | Typ | Max | Notes | |—————————–|—–|—–|—–|——| | Supply voltage (V+) | 20 V | 24 V | 30 V | SELV; reverse/surge protected input. | | Power consumption | — | 1.85 W | 3.0 W | Module only (no external loads). | | Logic rails | — | 5 V / 3.3 V | — | Buck + LDO derived. | | Isolated sensor rails | — | +12 V ISO / +5 V ISO | — | Fused, LC‑filtered; for sensors only (≤ ~150 mA shared). | | 1‑Wire bus power | — | +5 V (logic) | — | Non‑isolated, for 1‑Wire devices only. |
| Parameter | Value / Behavior | |———————-|——————| | Type | Opto‑isolated; dry contact / open‑collector / pulse. | | Threshold | Low‑voltage, sensor‑level (use GND_ISO return). | | Debounce | Firmware‑controlled. | | Pulse rate (counter) | ~ up to 9–10 Hz practical for flow meters. | | Isolation | Field domain to logic via opto barrier. |
| Parameter | Value / Behavior | |———————-|——————| | Type | SPDT, dry contact (NO/C/NC). | | Ratings (contacts) | 250 VAC 16 A (cosφ=1), 250 VAC 9 A (cosφ=0.4), 30 VDC 10 A. | | Protection | RC / varistor snubbers for inductive loads. | | Recommendation | Use coupling relays for inductive or >5 A continuous loads. |
| Interface | Details | |———-|———| | RS‑485 | Modbus RTU, half‑duplex; 9600–115200 bps (default 19200, 8N1); fail‑safe, short‑circuit limited, surge‑protected. | | USB‑C | USB 2.0 device for WebConfig (setup only); ESD‑protected; CP2102N bridge. |
| Parameter | Value | |—————————-|——-| | Operating temperature | 0…40 °C | | Humidity | ≤95 % RH, non‑condensing | | Ingress / Safety class | IP20; Operation Type 1 | | Rated impulse (outputs) | 2.5 kV | | Max altitude / pollution | 2000 m / Degree 2 |
None, Toggle, Pulse with Control Target (Relay 1, Relay 2, All, None).Power (W) = cp × ρ × ΔT × FlowRateEnergy = ∑ Power × ΔtModbus (default), Local Logic (e.g., irrigation), or None.Toggle/Pulse R1/R2, Override Toggle R1/R2, Irrigation Zone 1/2 Start/Stop.
3, Baud 19200, 8N1.| Parameter | Min | Typ | Max | Notes |
|---|---|---|---|---|
| Supply voltage (V+) | 20 V | 24 V | 30 V | SELV; reverse/surge protected input. |
| Power consumption | — | 1.85 W | 3.0 W | Module only (no external loads). |
| Logic rails | — | 5 V / 3.3 V | — | Buck + LDO derived. |
| Isolated sensor rails | — | +12 V ISO / +5 V ISO | — | Fused & LC‑filtered; specify budget per install. |
| Digital inputs | — | — | — | Opto‑isolated; per‑channel surge protection. |
| Relay contacts (R1–R2) | — | — | 250 VAC 16 A / 30 VDC 10 A | Use external snubbers; derate for inductive loads. |
| RS‑485 interface | — | 115200 bps | — | Half‑duplex; fail‑safe; short‑circuit limited; surge‑protected. |
| USB‑C | 5 V | — | — | USB 2.0 device; ESD‑protected; setup only. |
| Operating temperature | 0 °C | — | 40 °C | ≤95 % RH, non‑condensing. |
Installer note: Fuse the 24 VDC feed upstream and add RC/TVS snubbers for inductive loads (pumps, valves).
External terminals are 5.08 mm pitch pluggable blocks (300 V / 20 A, 26–12 AWG, torque 0.5–0.6 Nm).
| Block / Label | Pin(s) (left → right) | Function / Signal | Limits / Notes |
|---|---|---|---|
| POWER | V+, 0V |
24 VDC SELV input | Reverse & surge protected; fuse upstream. |
| DIGITAL INPUTS – TOP | I1…I5, GND (ISO) |
DI1…DI5 with isolated return | Keep returns on GND_ISO; dry‑contact/open‑collector only. |
| RELAY1 | NO, C, NC |
SPDT dry contact | Follow front label order. |
| RELAY2 | NO, C, NC |
SPDT dry contact | Follow front label order. |
| RS‑485 (bottom left) | B, A, COM |
Modbus RTU bus | Match A/B polarity; COM = reference GND; terminate bus ends. |
| 1‑WIRE (top right) | +5V, D, GND |
1‑Wire bus (logic domain) | For DS18B20; not isolated from logic. |
| SENSOR POWER (bottom right) | +5 V ISO, +12 V ISO, GND_ISO |
Isolated sensor rails | For sensors only; fused; no actuators. |
| USB‑C (front) | — | Web‑Serial config | ESD‑protected; not a field power source. |
The WLD‑521‑R1 communicates as a Modbus RTU slave over RS‑485, exposing its digital inputs, counters, flow data, heat metrics, relays, LEDs, irrigation state, and 1‑Wire temperatures.
| Parameter | Value |
|---|---|
| Interface | RS‑485 (half-duplex) |
| Baudrate | 9600–115200 (default: 19200) |
| Address | 1–255 (default: 3) |
| Parity | 8N1 |
| Role | Slave (responds to master requests) |
| Supported FCs | 0x01 Read Coils, 0x02 Read Discrete Inputs, 0x03 Read Holding, 0x04 Read Input, 0x05/0x0F Write Coils, 0x06/0x10 Write Holding |
🧩 Address and baudrate are configured via USB-C using WebConfig.
| Function | Range | Description |
|---|---|---|
| Coils (FC01/05) | 200–399 |
Control commands: relay ON/OFF, irrigation, reset |
| Discrete Inputs (FC02) | 1–103 |
Real-time state of DI, relays, LEDs, buttons |
| Holding Registers (FC03/16) | 1100+ |
Flow, temperature, energy, configuration |
| Input Registers (FC04) | same as holding | Optional mirror of Holding (read-only) |
| Coil Address | Description |
|---|---|
| 200–201 | Relay ON (Relay 1/2) |
| 210–211 | Relay OFF (Relay 1/2) |
| 300–304 | Enable DI1…DI5 |
| 320–324 | Disable DI1…DI5 |
| 340–344 | Reset DI counter |
| 360 | CMD_TIME_MIDNIGHT (pulse at 00:00 to sync time) |
| 370–371 | Irrigation START Z1/Z2 |
| 380–381 | Irrigation STOP Z1/Z2 |
| 390–391 | Irrigation RESET Z1/Z2 |
Coils are pulse-operated (write
TRUE, thenFALSE).
Manual overrides may block Modbus control until cleared.
| Address | Bit | Function |
|---|---|---|
| 1–5 | 1–5 | DI1…DI5 (debounced) |
| 60–61 | — | Relay 1/2 state |
| 90–93 | — | LED1…LED4 (mapped source ON) |
| 100–103 | — | BTN1…BTN4 (pressed = 1) |
These registers expose flow, heat, irrigation state, 1‑Wire temperatures, and runtime status.
| Address | Description | Format | Unit | Notes |
|---|---|---|---|---|
| 1100 | Minute of day | U16 |
min (0–1439) | Local module clock |
| 1101 | Day index | U16 |
days | Increments daily |
| Address | Description | Format | Notes |
|———|————-|——–|——-|
| 1120–1129 | Flow rate (L/min ×1000) | U32 ×5 | 2 registers each |
| 1140–1149 | Flow total (L ×1000) | U32 ×5 | 2 registers each |
| Address | Description | Format | Notes |
|———|————-|——–|——-|
| 1200–1209 | Power (W) | S32 ×5 | ΔT × cp × ρ × flow |
| 1220–1229 | Energy (Wh ×1000) | U32 ×5 | Accumulator |
| 1240–1249 | ΔT (°C ×1000) | S32 ×5 | TA–TB |
| Address | Description | Format |
|---|---|---|
| 1300–1301 | Zone state (0=idle, 1=run, 2=alarm) | U16 |
| 1310–1313 | Accumulated liters | U32 |
| 1320–1323 | Elapsed time (s) | U32 |
| 1330–1333 | Flow rate (L/min ×1000) | U32 |
| 1340–1341 | Window Open flag | U16 |
| 1342–1343 | Sensors OK flag | U16 |
| Address | Description | Format | Notes |
|---|---|---|---|
| 1500–1519 | Temp #1…#10 (°C ×1000) | S32 |
2 regs per sensor |
HREG 1140/1141 (2x U16 = U32)TRUE → Coil 343FALSE to returnTRUE → FALSE to coil 3700 to HREG 1100 at midnightcoil 360 to trigger time sync| Data Type | Suggested Rate | Notes |
|---|---|---|
| DI / Relay / LED / Button | 1 s | Coils, discrete inputs |
| Flow / Counters | 2–5 s | Holding or input regs |
| 1‑Wire Temps | 10–20 s | Poll less frequently to avoid bus errors |
| Irrigation state | 1–2 s | Needed if controller drives automation |
| Heat power/energy | 5–10 s | Internal logic updates per cycle |
00001–00005: DI1–DI5 state00060–00061: Relay 1/2 mirror00090–00093: LED state mirror00100–00103: Button press flags00200–00201: Relay ON00210–00211: Relay OFF00300–00304: Enable DI00320–00324: Disable DI00340–00344: Reset DI Counter00360: CMD_TIME_MIDNIGHT00370–00371: Irrigation START00380–00381: Irrigation STOP00390–00391: Irrigation RESET01100–01101: Clock01120–01129: Flow rates01140–01149: Flow totals01200–01209: Heat power01220–01229: Heat energy01240–01249: ΔT01300–01301: Irrigation state01310–01313: Irrigation liters01320–01323: Irrigation elapsed01330–01333: Irrigation flow rate01340–01343: Window & sensor status01500–01519: 1-Wire temperatures💡 All scaling is based on ×1000 (flow, temp, energy). Use ESPHome or controller math to convert to engineering units.
The WLD‑521‑R1 works seamlessly with ESPHome through the HomeMaster MiniPLC/MicroPLC, acting as a Modbus master. The module exposes all I/O and telemetry via Modbus RTU, which ESPHome maps into entities for Home Assistant.
Here is a typical ESPHome configuration that connects the controller to the WLD‑521‑R1 via RS‑485:
uart:
id: uart_modbus
tx_pin: 17
rx_pin: 16
baud_rate: 19200
parity: NONE
stop_bits: 1
modbus:
id: modbus_bus
uart_id: uart_modbus
packages:
wld1:
url: https://github.com/isystemsautomation/homemaster-dev
ref: main
files:
- path: WLD-521-R1/Firmware/default_wld_521_r1_plc/default_wld_521_r1_plc.yaml
vars:
wld_prefix: "WLD#1"
wld_id: wld_1
wld_address: 4 # Match this with WebConfig address
refresh: 1d
Replace
wld_addresswith your module’s actual Modbus ID (default is3).
You can add more modules by duplicating the package block with uniquewld_id,wld_address, andwld_prefix.
DI1 to DI5 — leak detection, float switch, or pulse edgesBTN1–BTN4) — short press detectionesphome.device_name_switch.turn_on for internal switches (like Midnight pulse).00:00, pulse coil 360 to reset daily irrigation state.DI1=ON), turn on relay/siren and notify.FlowX Rate drops to 0 during irrigation, stop zone and alert.| Problem | Fix |
|---|---|
| No entities show | Check RS‑485 wiring, A/B polarity, and COM ground |
| Coil writes fail | Make sure relay isn’t in override or owned by irrigation logic |
| Midnight reset missing | Add automation to pulse coil 360 nightly |
| Wrong DI naming | Use wld_prefix in packages: to namespace entities uniquely |
| Flow stuck at 0 | Confirm flow DI is in Water counter mode and receiving pulses |
| Platform | Status |
|---|---|
| ESPHome 2025.8+ | ✅ Supported |
| Home Assistant | ✅ via ESPHome integration |
| Multiple WLDs | ✅ supported via multiple packages: |
Always ensure the controller’s YAML uses the correct
uart,modbus, andwld_address. One misalignment can break polling.
Arduino.hModbusSerial.hSimpleWebSerial.hArduino_JSON.hLittleFS.hOneWire.hhardware/watchdog.hThis section matches the style shown in your screenshot and includes the missing items (MicroPython note, USB‑C flashing steps, button reference image, and Arduino include list).
Boot/Reset combinations (handled in hardware):
Use these combinations during firmware flashing or to restart the device manually.
Button numbering reference:

Generic RP2350 (RP2 family, dual‑core)platform = raspberrypi)Required libraries (typical project):
Arduino.hModbusSerial.hSimpleWebSerial.hArduino_JSON.hLittleFS.hOneWire.hhardware/watchdog.hTo update the firmware, use the Arduino IDE or PlatformIO via USB‑C:
Firmware/default_wld_521_r1/.| LED | Meaning |
|---|---|
| PWR | Steady ON = power OK |
| TX/RX | Blink on RS‑485 activity |
| USB | Lit when WebConfig is connected |
| LED1–4 | Mapped per UI config (DI/Relay/Irrigation/Override) |
| Symptom | Likely Cause → Fix |
|---|---|
| No Modbus comms | A/B swapped, missing COM reference, wrong baud/address |
| Relay won’t trigger | Relay in override, or Owner set to None/Logic |
| Flow stays 0 | DI not set to Water counter, wrong PPL, no pulses |
| 1‑Wire not found | Wiring to +5V/D/GND, long bus, or pull‑up issue |
| WebConfig not connecting | Use Chrome/Edge; close other serial apps; try new cable/port |
Licensing
This project uses a hybrid licensing model.
Hardware
Hardware designs (schematics, PCB layouts, BOMs) are licensed under: CERN-OHL-W v2
Firmware & ESPHome Integration
All firmware, ESPHome configurations, and software components are licensed under: MIT License
This ensures full compatibility with ESPHome and Home Assistant while protecting hardware designs.
See LICENSE files in each directory for full terms.
Firmware/default_wld_521_r1/Firmware/default_wld_521_r1_plc/Firmware/ConfigToolPage.htmlSchematics/WLD-521-R1-FieldBoard.pdf, Schematics/WLD-521-R1-MCUBoard.pdfImages/Manuals/WLD-521-R1 Datasheet.pdf