KinCony B4 4-Channel Smart Relay Controller
Frequently Bought Together
Features
- Cost-Effective Mechanical Relays — Equipped with 4× reliable mechanical relays rated at up to 250VAC (compatible with 110V/120V and 220V/240V) / 30VDC, 7A per channel, enabling direct and stable switching of global mains AC appliances.
- Comprehensive Sensing Ecosystem — Integrates 4× 16-bit analog inputs (0–5V & 4–20mA) and 4× opto-isolated dry contact inputs, allowing seamless connection to diverse industrial sensors and environmental monitoring equipment.
- Dual-Network Connectivity — Equipped with both Wi-Fi and 100Mbps Ethernet for flexible and resilient network integration, alongside isolated RS485 for reliable long-distance serial communication.
- Precise Time-Stamping & Logging — Includes a high-precision DS3231 RTC chip (with battery backup) for accurate time-based events and a microSD card slot for logging operational data and sensor metrics.
- Expandable I/O Architecture — Features dedicated 4× 1-Wire GPIOs for temperature sensors and 3× Free GPIOs directly accessible to the ESP32, with I²C bus expansion for maximum project flexibility.
- Manual Override Switches — Includes physical toggle switches for each relay channel, allowing you to force loads ON or OFF manually when the controller is disconnected or offline.
- Seamless Smart Home Integration — Supports Home Assistant auto-discovery (zero-config); compatible with KinCony Cloud, Loxone, and Apple HomeKit for advanced local and cloud automation scenarios.
- Flexible Firmware & Development — Unlock complete freedom with support for ESPHome, Tasmota, Arduino IDE, MicroPython, and ESP-IDF. No vendor lock-in.
Why Choose
B-Series Positioning: The B4 belongs to KinCony’s B-Series economy line — the 2nd-generation successor to the original A-Series. It keeps the proven ESP32-S3 platform, Ethernet, RS485, and rich I/O, while optimizing cost for budget-conscious automation projects.
- Economy Line, 2nd-Gen A-Series — B4 delivers the core KinCony automation experience at an entry-level price. Ideal for DIY smart homes, light commercial panels, and projects where cost matters but reliability cannot be compromised.
- 4 AC Relay Channels at a Value Price — Unlike the B4M (DC-only MOSFET) and the higher-end F4 (pluggable OMRON®), the B4 gives you 4× mechanical relays rated 250VAC / 30VDC, 7A per channel. It can directly switch AC mains loads — lights, pumps, garage doors — without extra contactors.
- Balanced I/O for Mixed Projects — 4× analog inputs, 4× opto-isolated digital inputs, dedicated 1-Wire and free GPIO terminals, RS485, Ethernet, Wi-Fi, and Bluetooth. Compared with the B4M’s DC-only focus, B4 handles both AC switching and sensor monitoring in one DIN-rail device.
- Right Choice vs B4M and F4 — Choose B4 for affordable AC relay control and mixed I/O. Choose B4M only for all-DC loads or silent switching. Choose F4 for industrial-grade pluggable OMRON® relays, 16A, and 433MHz RF. The B4 sits at the best-value sweet spot for most AC automation tasks.
- No Compromise on Software Freedom — KCS firmware, ESPHome, Home Assistant auto-discovery, Tuya, Tasmota, Arduino, MicroPython, and ESP-IDF. The economy line still gives you full firmware freedom and local control.
Technical Specifications:
| Category | Specification |
|---|---|
| Core Processor | ESP32-S3-WROOM-1U (N16R8, dual‑core 32‑bit Xtensa LX7) |
| Analog Inputs |
4× ADS1115 16‑bit ADC ▪ 2× 0–5 VDC ▪ 2× 4–20 mA (loop‑powered) |
| Digital Inputs |
4× dry contact, opto‑isolated ▪ Cable length: up to 500 m (dependent on installation) |
| Digital Outputs |
4× relays ▪ Contact: COM, NO (1 × SPST-NO / Form A per channel) ▪ Max load: 250 VAC / 30 VDC, 7 A per channel |
| Free GPIOs |
▪ 3× without PCB pull-up resistors (GPIO13, GPIO14, GPIO21) ▪ 4× with PCB pull-up resistors (GPIO40, GPIO47, GPIO48, GPIO17) |
| Wireless Connectivity | ▪ Wi‑Fi 2.4 GHz (802.11 b/g/n) ▪ Bluetooth 5.0 (BLE) |
| IoT Platform | Tuya‑compatible (via Wi‑Fi/Bluetooth) |
| Wired Connectivity | ▪ Ethernet: 100M RJ45 (IPv4/IPv6) ▪ RS485 ▪ USB‑C (programming) |
| Onboard Peripherals | ▪ RTC: DS3231 (battery socket) ▪ Display: SSD1306 128×64 OLED (I²C) ▪ Storage: microSD card socket ▪ Buttons: 3× (ESP32 Reset / ESP32 Download / Tuya Config) ▪ Toggle Switches: 4× (Manual relay ON/OFF control) |
| Power Supply | 12-24 VDC |
| Dimensions | 115 × 83 × 56 mm |
| Mounting | 35 mm DIN rail |
Onboard Components


-
1.
ESP32-S3-WROOM-1U N16R8 Chip
Adopts ESP32-S3 series chip with Xtensa 32-bit LX7 dual-core processor, built in 16MB Flash and 8MB PSRAM -
2.
Tuya Chip
Tuya wireless communication module for cloud connectivity and smart control -
3.
Relay
SPST-NO Form A relays for switching AC/DC loads -
4.
RTC Battery Holder
Battery holder, maintains RTC timekeeping when main power is off -
5.
Digital Input Terminals
Screw terminals for dry contact digital input, opto-isolated -
6.
RS485 Terminals
Screw terminals for RS485 communication (A / B) -
7.
Analog Input Terminals
Screw terminals for analog input (0–5 V / 4–20 mA) -
8.
Free GPIO Terminals
Screw terminals for free GPIO access for custom IO projects -
9.
Power Supply Screw Terminal
Supports DC 12V power input -
10.
Relay Terminals
Screw terminals for relay output connection (COM / NO) -
11.
1-Wire GPIO Terminals
Screw terminals for 1-Wire devices such as temperature sensors -
12.
Tuya Antenna Connector
SMA female connector, for Tuya wireless communication -
13.
ESP32 Download Button
Download button for ESP32 firmware flashing
-
14.
ESP32 Reset Button
Reset button for ESP32 module -
15.
USB-C Port
For firmware flashing only (cannot be used for power supply or data communication) -
16.
ESP32 Antenna Connector
SMA female connector, for Wi-Fi and Bluetooth wireless communication -
17.
Ethernet Port
100M RJ45 Ethernet port for stable wired network connection -
18.
RS485 Transceiver
RS485 transceiver chip for reliable long-distance serial communication -
19.
Low-Dropout Linear Regulator (LDO)
Provides stable 3.3V output for onboard circuits -
20.
PCF8574T I2C 8-bit IO Expander
I²C bus IO expander, expands available digital input/output channels -
21.
SSD1306 OLED Display
I²C OLED display for showing IP address and device connection status -
22.
Toggle Switch
Manual toggle switch for relay ON/OFF backup control -
23.
Tuya Config Button
Config button for Tuya network pairing -
24.
Relay Status LED
Indicates relay ON/OFF working status -
25.
Power Status LED
PWR indicator, shows power supply status -
26.
Tuya Status LED
Indicates Tuya cloud connection status

-
27.
ADS1115 Chip
16-bit ADC for high-precision analog input -
28.
TVS Protection
Transient Voltage Suppressor, suppresses surge voltages and transient spikes -
29.
Optocoupler Isolation
Prevents interference from external signals
-
30.
Reverse Polarity Protection
Protects the circuit from reverse power connection -
31.
W5500 Chip
Ethernet controller, extends 10/100 Mbps Ethernet via SPI interface
Onboard Isolation & Protection
Voltage Regulator
Provides a stable 3.3V output, protecting the core chip from voltage fluctuations.
Reverse Polarity Protection
Prevents circuit damage caused by accidental reverse power connection.
Thicken Track
Reinforced copper traces for high-current paths, ensuring stable power delivery under heavy loads.
TVS Protection
Transient Voltage Suppressors absorb surge voltages and spikes, safeguarding sensitive components.
Optocoupler Isolation
Isolates external signals from the MCU, preventing interference and voltage spikes.
System Block Diagram
Outline Dimensions

Front View — Overall 115 × 83 mm / Aluminum cover 102 × 46 mm

Side View — Overall height 56 mm / Aluminum cover height 40 mm
Overall Length
115 mm
Overall Width
83 mm
Overall Height
56 mm
Mounting
35 mm DIN
Supports Arduino, Micropython, ESP-IDF development
Arduino IDE
Arduino IDE is an open-source electronic prototyping platform. It is convenient, flexible, and easy to start. With a simple learning curve, you can rapidly develop your projects.
MicroPython
MicroPython is a full implementation of Python 3 that runs directly on embedded hardware. It enables agile IoT development like Raspberry Pi Pico.
ESP-IDF
ESP-IDF is Espressif's official development framework. It provides low-level hardware access, maximum performance, and professional control for production-grade firmware.
For full firmware packages, demo codes and programming tutorials, please switch to the "Software Solution" tab above.
AC & DC Connection Diagrams
Onboard high-quality 4-channel relays, supporting RS485, Bluetooth, Wi-Fi, and Ethernet control.
AC Load Connection
Supported AC: Up to 250VAC @ 7A per channel. SPST-NO relay contacts (COM / NO).
DC Load Connection
Supported DC: Up to 30VDC @ 7A per channel. Recommended ≤28VDC for resistive loads.
Enclosure Design

Top View — Aluminum Top Cover

Aluminum Cover Detail

Back View — Plastic Base with 35 mm DIN Rail Mount

DIN Rail Base Detail — 35 mm Standard DIN Rail
Aluminum Top Cover Advantages
1. Premium Feel: Compared with ordinary ABS plastic cases, the aluminum top cover offers a more solid, high-end texture and better heat dissipation.
2. EMI Shielding: As a non-magnetic conductor, the aluminum top cover acts as a Faraday cage, protecting internal circuits from external electromagnetic radiation and preventing internal emissions.
Packing List
Please Note: The RTC coin cell battery is not included in the standard package due to shipping regulations.
Batch Customization Service
Support software and hardware customization including interface logo label case etc.
Label Customization
Logo, sticker, nameplate
Hardware Customization
PCB, interface, casing
Software Customization
Firmware, function, UI
Contact Customer Service
Send your customization requirements
One-to-One Technical Service
Professional evaluation and solution
Sign Contract & Start Project
Custom development and sample making
Sample Approval & Mass Production
Batch delivery after sample passes
B4 vs B4M vs F4
Shared Features: ESP32-S3 N16R8 · 100M Ethernet + Wi-Fi + Bluetooth · DS3231 RTC · ADS1115 4× 16-bit ADC (0–5V & 4–20mA) · OLED display · microSD · RS485 · DIN-rail mounting · ESPHome / Home Assistant / Tuya support.
Key Differences
| Item |
B4(4CH Relay) |
B4M(4CH MOSFET) |
F4(4CH Relay) |
|---|---|---|---|
| Output Type | Mechanical relay, COM / NO only (no NC) | MOSFET DC switch (DC loads only) | Pluggable OMRON® relay, COM / NO / NC (SPDT) |
| Output Quality | Standard relay, 250V / 7A, COM / NO only | High-current MOSFETs, 10A per channel | OMRON® high-grade relay, 250V / 16A, socketed for tool-free replacement |
| Output Channels | 4× relay | 4× MOSFET | 4× relay |
| Load Capability | AC up to 250V, 7A per channel. Can switch AC mains. | DC only (recommended 12–24V), 10A per channel. All channels share the same voltage. | AC up to 250V / DC up to 30V, 16A per channel. Can switch AC mains. |
| Switching | Mechanical contact; limited lifespan, audible click, slow | No contact, silent, high-speed; External PWM via free GPIO | Mechanical contact; pluggable for easy replacement |
| Digital Inputs | 4× opto-isolated DI (up to 500m) | 4× opto-isolated DI (up to 500m) | 4× opto-isolated DI (up to 500m) |
| GPIO | 3× 1-Wire + 4× free GPIO | 3× 1-Wire + 4× free GPIO | 4× 1-Wire + 2× free GPIO |
| 4G Module | Not supported | Not supported | Not supported |
| RF Receiver | — | — | 433 MHz RF receiver built-in |
| Dimensions | 115 × 83 × 56 mm | 122 × 83 × 59 mm | 138 × 127 × 65 mm |
Which One Should You Choose?
Choose B4 if you need:
- 4 channels of AC mains relay control
- Relay outputs with COM / NO only (no NC)
- More opto-isolated DI (4×) and 1-Wire GPIO (3×)
- Standard 250V / 7A relay capacity for typical AC loads
Choose B4M if you need:
- All loads are DC 12V / 24V (LED strips, solenoid valves, DC motors)
- 4 output channels + more DI + free GPIO
- High-frequency switching or External PWM dimming via free GPIO, no relay clicking
- Lower cost, all-DC project
Choose F4 if you need:
- Pluggable OMRON® relays for tool-free replacement
- Higher relay rating (16A per channel)
- 433 MHz RF receiver for wireless sensors
- Industrial-grade “set and forget” reliability with SPDT contacts
I. Firmware Options & Features
| Solution | Ideal For | Key Advantages |
|---|---|---|
| 1. KCS Firmware (Recommended) | Beginners / Zero-Code Users |
✔ Auto-detects Home Assistant via MQTT (zero config) ✔ Works with Tuya App + Alexa/Google Voice Control ✔ Local IFTTT automation (no internet needed) ✔ 2-year free KinCony Cloud (official store only) ✔ Apple HomeKit support for Siri ✔ Supports Loxone Miniserver integration ✔ Multi-protocol: HTTP, MQTT, Modbus (RS485/TCP), BACnet, DMX512 |
| 2. ESPHome Firmware | Home Assistant Enthusiasts |
✔ Full open-source customization ✔ Official ESPHome device support for B4 ✔ Web UI + deep HA integration ✔ Full YAML examples available |
| 3. Tasmota Firmware | Open-Source Community |
✔ Massive plugin ecosystem ✔ MQTT / Web control + rule engine |
| 4. Arduino / ESP-IDF Custom Code | Developers |
✔ Full Arduino demos provided ✔ Supports MicroPython / ESP-IDF |
| 5. Hybrid Setup (Best Practice) | Advanced Users | Tuya App (remote via internet) + Home Assistant (local via LAN) — Security + convenience |
II. Technical Resources
Direct links to pin definitions, ESPHome configurations, Arduino demo source codes, and KCS firmware. All open-source and maintained on GitHub.
| Resource | Link |
|---|---|
| KCS Firmware | kcs_firmware/B4/ |
| Pin Definitions | B4_pin_definition.md |
| Arduino Demos | B4/ (11 examples) |
| ESPHome Configuration | Official ESPHome B4 device page |
III. Getting Started Guide
Step 1: Flash Firmware
We recommend using the Online Flasher — no driver installation required, works entirely in your browser. Alternatively, follow the Quick Start Guide for manual flashing with the ESP32 desktop tool.
Step 2: Connect & Configure
Power on the board, connect via Ethernet or Wi-Fi, and access the web configuration interface. For detailed configuration, see the KCS Firmware User Guide.
Step 3: Integrate
Enable MQTT auto-discovery in Home Assistant, or pair with Tuya App for voice control.
IV. Video Tutorial: How to Flash KCS Online
No Drivers Needed, No Complex Setup—Flash Directly within Your Browser in 1 Minute!
Looking for software solutions for other products?
View All Product Software Solutions →








