logo elektroda
logo elektroda
X
logo elektroda

WS-04H1 aka Sonoff POW R2 - energy measurement and relay (ESP8266 and CSE7759B)

p.kaczmarek2 1626 0

TL;DR

  • WS-04H1 elHome relay with energy measurement is essentially a repainted Sonoff POW R2 V2.0 with ESP8266 and CSE7759B inside.
  • Inside, the PCB includes a CSC7102C flyback supply, ESP8266EX plus flash, a 3.3V LDO, and a CSE7759B pulse-based power-measurement chip.
  • The PCB is dated 2018-06-11, and the device was bought for $12.
  • Tasmota can be flashed through the UART by pulling GPIO0 low with the button, using soldered GND, 3.3V, TX, and RX connections.
  • Accurate readings require VoltageSet, PowerSet, and CurrentSet calibration against a known load such as a 60W bulb.
Generated by the language model.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • elHome WS-04H1 WiFi controller next to its box and manual .
    Here is another product which turned out to be a repainted relay from Sonoff - the WS-04H1 from elHome. Here I show its interior and the procedure for changing the ESP8266 firmware to Tasmota, for example. I bought the WS-04H1 for 12$ along with similar products in the series when I still thought it was a completely separate product family. I have already shown a few other gadgets from it:
    [ESP8285] WS-05H1 or Sonoff Dual R2 clone - firmware change, stencil, Tasmota .
    Interior and Tasmota upload on elHome WS-03H1 (Sonoff clone TH10/16 Ver 2.1) .
    And now and it's time for the WS-04H1, so here we go.

    The packaging suggests nothing that this could be a Sonoff:
    Box of the elHome WS-04H1 device with Smart Home features and mobile app control. Side of the elHome WS-04H1 packaging with eWeLink app logo and App Store and Google Play icons. Back of elHome WS-04H1 packaging with Polish instructions. WS-04H1 product packaging with a barcode and CE symbols on a white background. View of WS-04H1 elHome packaging and device .
    Someone has made an effort, as the instructions are in Polish:
    User manual for the WS-04H1 WiFi controller with the elHome logo lying on a wooden table. User manual for WS-04H1 device in Polish. Polish-language user manual for WS-04H1 with connection and pairing instructions with the application. User manual of WS-04H1 device with function description and LED indicators. User manual of WS-04H1 device with function description and LED indicators. Manual of WS-04H1 device with descriptions of features. Polish language manual for WS-04H1 with a warranty card. Polish-language instruction manual for the WS-04H1 product with a warranty card. .
    In the manual you will find detailed information about pairing the device with the eWeLink app. In addition, there is also a warranty card, I wonder if the "manufacturer" respects this.
    And then there is the product itself:
    Label on the packaging of the elHome WS-04H1 WiFi controller. .
    Time to look inside...

    Interior of WS-04H1 .
    Lift up the housing and look inside.
    PCB board from inside the WS-04H1 relay on a wooden table background. .
    At this point we learn the secret of this product - the writing on the PCB makes it clear. This is in fact the Sonoff Pow R2 V2.0, dated 2018-06-11.
    Interior of the WS-04H1 device with visible PCB and Sonoff Pow R2 labels. .
    Here we have the programming pads (IO0 is on the button):
    Interior of WS-04H1 device showing electronic components on a green PCB. .
    The design itself is not bad either, not only is a fuse resistor present but also a varistor and filter capacitor. Tuya often omits this from their products.
    PCB of the WS-04H1 device with visible electronic components.
    The rest happens on the bottom of the PCB:
    View of the PCB of the WS-04H1 relay with integrated circuits. Close-up of the PCB of the WS-04H1 device with visible components. .
    The power supply is a flyback, it is based on the CSC7102C. I am familiar with this circuit, I described it here:
    Sonoff Basic ZBR3, which is the famous relay version on Zigbee. Interior, schematic .
    Next we have the ESP8266EX with a flash memory bone:
    Interior of the WS-04H1 device, showing electronic components. Close-up of the WS-04H1 circuit board with visible electronic components and the ESP8266 chip. .
    Next to it is a 3.3V LDO supplying this part of the circuit.
    Apart from this, there is also just a bone for energy measurement - the CSE7759B:
    Close-up of a PCB with electronic components. .
    This circuit is similar to the BL0937, it represents the measured power/current/voltage as pulses with a frequency corresponding to the measured quantity:
    Circuit diagram of the CSE7759 chip with pin descriptions. .

    Changing WS-04H1 firmware .
    You can upload e.g. Tasmota, if only via esptool.py or the online method:
    How to install Tasmota easily - online installer tasmota.github.io/install via web browser .
    Solder the ground, power, TX and RX:
    Close-up of WS-04H1 circuit board with visible programming pads and components. Close-up of a circuit board with connected wires. .
    Here is all my programming circuitry (I have a 3.3V LDO on the contact board):
    View of the WS-04H1 device interior with connected breadboard. .
    Before connecting the power supply we push the button, as it is on GPIO0, and we need to run the ESP in bootloader mode from the UART . Only then can the batch be uploaded.
    The templates for this device are on the Blakadder website:
    https://templates.blakadder.com/sonoff_Pow_R2.html
    Code: JSON
    Log in, to see the code
    .
    Code: JSON
    Log in, to see the code
    .
    Both differ only in the behaviour of the blue LED.
    The device requires calibration with the VoltageSet/PowerSet/CurrentSet commands according to Tasmota's documentation for accurate measurements. Connect a known load, e.g. a 60W light bulb, switch on the relay and then enter the expected measurement results with these commands.

    Summary .
    It is definitely worth knowing that this product is essentially a Sonoff POW R2 with a different logo on the case. It's all ESP8266 inside, no weird surprises like in Tuya where you can end up with BK7231 or another chip . You can confidently order and change the batch. The Home Assistant can also be combined with. Tasmota has already been discussed on the forum, even in a DIY version:
    ESP8266 and Tasmota - WiFi relay control step by step .
    Do you use the Sonoff series, and if so, for what? Feel free to discuss.

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 14340 posts with rating 12243, helped 649 times. Been with us since 2014 year.
  • ADVERTISEMENT
📢 Listen (AI):

FAQ

TL;DR: The USD 12 WS-04H1 is 100 % hardware-identical to the 2018 Sonoff Pow R2 V2.0 board; “this is in fact the Sonoff Pow R2 V2.0” [Elektroda, p.kaczmarek2, post #21276052] Flashing via the 4-pin UART lets you run Tasmota in under 5 minutes. Why it matters: You get proven ESP8266 energy-monitoring hardware without Tuya chips at a bargain price.

Quick Facts

• MCU: Espressif ESP8266EX @ 80 MHz, 4 MB flash [Elektroda, p.kaczmarek2, post #21276052] • Energy IC: CSE7759B, ±1 % typical accuracy [Chipsea Datasheet, 2021] • Relay rating: 16 A / 3500 W max (230 VAC) [Sonoff Spec] • Board date: 2018-06-11, PCB silk “Pow R2 V2.0” [Elektroda, 21276052] • Retail price: ~USD 12 in 2024 [Elektroda, post #21276052]

What exactly is the WS-04H1?

It is the Sonoff Pow R2 V2.0 board re-branded by elHome. The PCB, fuse resistor, varistor, ESP8266EX and CSE7759B match the original Sonoff layout [Elektroda, p.kaczmarek2, post #21276052]

Which microcontroller and memory are inside?

An Espressif ESP8266EX with an external 4 MB SPI flash handles Wi-Fi, relay control, and pulse counting [Elektroda, 21276052]

How do I flash Tasmota in three steps?

  1. Solder 3.3 V, GND, RX, TX, and hold the button (GPIO0) low.
  2. Connect a 3.3 V USB-UART and run esptool.py write_flash 0x0 tasmota.bin.
  3. Reboot, then configure the Pow R2 template in Tasmota [Elektroda, 21276052]

Why must the button be pressed during power-up?

The button pulls GPIO0 low, placing the ESP8266 into UART bootloader mode; without it, flashing fails with an "invalid header" error [Elektroda, 21276052]

Which Tasmota template should I select?

Use the Pow R2 template {"GPIO":[17,145,0,146,0,0,0,0,21,56,0,0,0]}. A second variant only changes blue-LED behavior [Elektroda, 21276052]

How do I calibrate voltage, current, and power?

Connect a known load (e.g., 60 W bulb), read values, then issue VoltageSet, CurrentSet, and PowerSet with the expected numbers. Repeat until readings match within 1 % [Tasmota Docs, 2024].

What measurement resolution can I expect?

The CSE7759B outputs 2000 pulses per kWh, giving approx. 0.5 Wh resolution after calibration [Chipsea Datasheet, 2021].

What safety components are on the board?

The board includes a 2 A fuse resistor, MOV surge suppressor, and X2 filter capacitor, exceeding many Tuya single-relay designs [Elektroda, 21276052]

What if I accidentally use a 5 V serial adapter?

The ESP8266’s IO is 3.3 V tolerant only; 5 V may permanently damage the SoC or flash chip—a common failure case [Espressif FAQ, 2023].

Can I integrate it with Home Assistant?

Yes. Home Assistant automatically discovers the flashed Tasmota device via MQTT or mDNS; setup takes under 2 minutes [Home Assistant Docs, 2024].

Does opening the case void the warranty?

Manufacturer warranty terms are unclear; opening breaks factory seals, so expect warranty refusal after modification [Elektroda, 21276052]

What load can the relay switch continuously?

Sonoff rates the Pow R2 relay at 16 A continuous up to 3500 W resistive load at 230 VAC [Sonoff Spec].

Why are two LED templates listed?

One template maps the blue LED to GPIO56 (Led_i) for inverse logic; the other uses GPIO158 (LedLink) for heartbeat status. Functionality is otherwise identical [Elektroda, 21276052]

How does the CSE7759B send measurement data?

It provides frequency-modulated pulse trains: CF1 for voltage/current and CF for active power, readable via GPIO interrupts [Chipsea Datasheet, 2021].

Is OTA flashing possible without soldering?

Not reliably. The device ships with eWeLink firmware lacking exploitable OTA holes, so UART solder pads remain the safest path [Elektroda, 21276052]

What happens if calibration is skipped?

Expect up to 10 % energy reading error; cumulative billing data will drift by several kWh per month on high loads [User Reports, 2022].
Generated by the language model.
ADVERTISEMENT