Sonoff Pow and Pow R2 - RTurala/Sonoff-Tasmota GitHub Wiki
- Itead Product Page: http://sonoff.itead.cc/en/products/sonoff/sonoff-pow
- Itead Shop (R2): https://www.itead.cc/sonoff-pow-r2.html
- Itead Shop: https://www.itead.cc/sonoff-pow.html
- Itead Wiki: https://www.itead.cc/wiki/Sonoff_Pow
Do not connect AC power and the serial connection at the same time The Gnd connection of the Pow has a 50% chance of being connected to the live AC wire. Connecting serial with your PC will fry your PC.
Also do not connect any additional sensors to serial pins until you are 100% sure. It can at least destroy your Pow!
The GPIOs on the Pow might be connected to AC power, therefore it is not possible to add sensors to the Pow.
The AC connection between Pow and Pow R2 is different, so be careful when you perform an in-place replacement.
- Pow R2: Lo-E-E-Li-N-N = LineOut-EarthOut-EarthIn-LineIn-NeutralOut-NeutralIn
- Pow: Lo-E-E-N-N-Li = LineOut-EarthOut-EarthIn-NeutralOut-NeutralIn-LineIn
Please see the Hardware Preparation page for general instructions.
As always, you need to access the serial interface.
- Pow R2: The four serial pins (VDD, E-RX, E-TX, GND) are available at the rear/short end of the PCB. Do not use I04 and I05.
- Pow: The four serial pins (3V3, Rx, Tx, GND) are available at the rear/short end of the PCB as can be seen in the upper part of the image to the right.
Note - After the module type is changed to "Sonoff Pow" or "Sonoff Pow R2" using the "module" command, the serial port is no longer available for entering configuration commands because the serial port is used to communicate to the power measurement chip. Make sure you have set up your network connection before doing this.
Sonoff Pow might need calibration as correct measurements are influenced by hardware and timing differences.
I used the following procedure to calibrate.
- Prerequisites
- Calibrated multimeter 😉
- Optional calibrated power meter 😉
- 60W light bulb
- Connect the Pow to the optional power meter.
- Connect the 60W light bulb
- Open a webbrowser to Pow showing the main page and another webbrowser showing the Console
- Turn power on and wait a few seconds for the pow to settle on a stable power reading
- Verify the power reading with the power meter or expected 60W and if needed change the power offset in W with command
PowerSet 60.0
. - Verify the voltage reading with the multimeter and if needed change the voltage offset in V with command
VoltageSet 235.5
. - Verify the current reading with the calculated value of P (step 6) / U (step 7) and if needed change the current offset in mA with command
CurrentSet 103.4
.
The Sonoff Pow can provide Energy, Power, Voltage and Current information in different ways.
The preffered way is using the periodic telemetry data. Setting teleperiod 300
will send telemetry data every 5 minutes.
Note: If the setting PowerDelta
(new since version 5.12.0e) is not 0 (default 80%), telemetry will be send on power change too.
tele/pow1/SENSOR = {"Time":"2018-02-15T17:37:10","ENERGY":{"TotalStartTime":"2018-11-14T18:39:40","Total":6.294,"Yesterday":5.340,"Today":0.954,"Period":217,"Power":2635,"ApparentPower":2650,"ReactivePower":282,"Factor":0.99,"Voltage":227,"Current":11.661}}
To request information you can use command status 8
.
stat/pow1/STATUS8 = {"StatusSNS":{"Time":"2018-11-15T08:54:18","ENERGY":{"TotalStartTime":"2018-11-14T18:39:40","Total":6.404,"Yesterday":5.340,"Today":1.064,"Power":2629,"ApparentPower":2645,"ReactivePower":288,"Factor":0.99,"Voltage":226,"Current":11.677}}}
The presented information has the following meaning:
Message | Unit | Description
---------------|------|-----------------------------------------------------
TotalStartTime | Date | DateTime of calculation for Total
Total | kWh | Total Energy usage including Today
Yesterday | kWh | Total Energy usage between 00:00 and 24:00 yesterday
Today | kWh | Total Energy usage today from 00:00 until now
Period | Wh | Energy usage between previous message and now
Power | W | Current effective power load
ApparentPower | W | Power load on the cable = sqrt(Power^2 + ReactivePower^2)
ReactivePower | W | Reactive load
Factor | | The ratio of the real power flowing to the load to
| | the apparent power in the circuit
Voltage | V | Current line voltage
Current | A | Current line current
Debugging the Sonoff Pow is a bit tricky as the serial interface has a direct connection to one of the AC power lines. I designed below schematic using two opto couplers seperating the AC connection on the left from the low voltage connection on the right allowing for serial control at 115200 baud and uploading of firmware up to 57600 baud while AC is connected.
ITEAD published a recall notice for the Sonoff Pow on march 1st 2017. Some units produced in december 2016 and january 2017 are not well suited for 16A. If you have one of these units you can decide to use them anyway by limiting the maximum current in software. It is, in fact, possible to set a Maximum Power Threshold for the Sonoff Pow. If the power measured by the device exceed the threshold set by the MQTT command MaxPower for a number of seconds set by the command MaxPowerHold the device will remain switched off for MaxPowerWindow seconds (to let it cool down, for example).
For all details see Issue #218