Itead Sonoff POW Wi-Fi Mains Switching & Power Monitoring Module with MQTT (ESP8266)

Sonoff POW

At the same time I bought the Sonoff S20 sockets I picked up a couple of these Sonoff POW units which are a similar inline mains switching module to the original Sonoff (now called the Sonoff Basic) but with the added benefit of power monitoring.

It has a max current rating of 16A, max power 3500W and is CE Marked for what it’s worth.

Unlike the original Sonoff these do have connections for passing an earth through and the terminals are of the push fit type rather than screw terminals.

Rather fortuitously these sat around on my desk unused for a couple of months and I was only reminded of them when news of a safety recall surfaced at the beginning of March. It turned out that some of these units had suffered from a manufacturing error where the additional solder applied to the PCB tracks for the AC side of the relay was insufficient which resulted in overheating, burning of the tracks and even melting of the plastic case – not good. I opened mine up and it was obvious they were from the faulty batch, the good news was that Itead did the right thing and arranged for replacement units to be sent. Below you can see the comparison between the original ones I received and the replacements, the replacements have a slightly different layout due to a different relay being used but you can clearly see the difference in the heavy application of solder along the AC tracks, a common method of increasing the current handling of a track.

Recalled version on left, replacement on right
Different relay on replacement unit on right

As with the other Sonoff units reprogramming these with open source MQTT capable firmware is easy, just solder a header on to the provided pads, connect your 3.3v USB to serial adapter and flash with a firmware of your choice. The two middle pins are unlabelled on this one but the pins are in the same orders as the other Sonoff devices, RX is the one next to VCC and TX is next to GND. The on board button is connected to GPIO so press then when powering up when programming.

As mentioned in the last post my choice of firmware is now TASMOTA but ESPurna also supports the power monitoring functions of the POW.  Flashing TASMOTA with PlatformIO is very easy and is the method I would recommend, I always preset my Wi-Fi settings in user_config.h and once flashed it is just a case of going to the web interface and setting the module type etc.

As always – make sure the mains is NOT connected when flashing the initial firmware in this way. OTA updates are supported so this direct connection should only nee to be done the first time.

Programming header fitted, pins are VCC, RX, TX, GND

When reassembling the case one thing to watch is that the button on the top can be a bit of a tight fit in the hole, on two out of the four units I have here it got stuck in once pressed, on one just by closing the case. Easily fixed but something to keep an eye out for if things don’t seem to working correctly.

Controlling the relay via MQTT is straightforward and just like with the other Sonoff devices, assuming the topic for the device is set in the web interface to “sonoff-pow” then just send a message with a payload of “on” or “1” to the topic “cmnd/sonoff-pow/power” to turn the socket on, or a payload of “off” or “0” to turn it off. Likewise, a payload of “toggle” will toggle the output. See the Wiki here for more MQTT features.

The power monitoring data is sent every 5 minutes by default to the topic “tele/sonoff-pow/ENERGY” or on demand by sending message of “8” to cmnd/sonoff-pow/status and subscribing to “stat/sonoff-pow/STATUS8”.

The message gives you the current voltage, current, power and power factor as well as the total power used today and yesterday and since the last message like this:

{“Time”:”2017-02-15T11:16:20″, “Yesterday”:0.012, “Today”:0.000, “Period”:0, “Power”:4, “Factor”:0.35, “Voltage”:230, “Current”:0.050}

You can also set voltage, current and power thresholds to turn the output off if it goes above or below the values you set, see the full list of commands here.

You can calibrate the power, voltage and current readings as described here. I “calibrated” mine against an uncalibrated plug in power meter which will be good enough for my needs.


One thought on “Itead Sonoff POW Wi-Fi Mains Switching & Power Monitoring Module with MQTT (ESP8266)

  1. Hello,

    I Flashing TASMOTA with PlatformIO on my sonoff POW but when disconnect the ftdi adapter and connect the mains the sonoff POW dosen’t work . Can you help me ?

    with the ftdi adapter work fine
    please let me know


Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.