logo elektroda
logo elektroda
X
logo elektroda
Dostępna jest polska wersja

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

[ESP32] Sonoff POWR316D energy meter with display - firmware change

p.kaczmarek2 3912 4

TL;DR

  • The Sonoff POWR316D Elite16A WiFi smart power meter combines an LCD display with app-based energy monitoring and a built-in consumption counter.
  • Inside, the board uses an ESP32, CSE7759B metering chip, TM1621 display driver, and LP3667 supply stage, with RX/TX programming pads beside SPI flash.
  • Flashing Tasmota required soldering 3.3V, GND, RX and TX wires, then holding the button to pull IO0 into bootloader mode.
  • Tasmota loaded successfully, the display still works, and the meter needs calibration afterward; the LCD is useful but not very readable.
Summary generated by AI based on the discussion content.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • Sonoff energy meter with connected lamp and multimeter.
    Today I am presenting a rather unusual Sonoff energy meter, which is distinguished by the fact that in addition to sharing measurements via a mobile application, it also displays them on an LCD display. This allows you to quickly check how much electricity and energy the connected device consumes without reaching for your phone. Here, of course, I will also focus on changing its firmware, I will upload Tasmota so that it can be connected to Home Assistant, and at the same time I will analyze its structure.

    Purchase Sonoff POWR316D
    A friend of mine gave me the Sonoff set so I could upload the firmware. My friend simply doesn't know anything about electronics and doesn't even have soldering equipment, but for me the equipment was included in the review. However, I know that it was bought in a Polish mail order store, you can search for it by name Sonoff POWR316D Elite16A WiFi smart POWER MEASUREMENT R3 : :
    Sonoff Pow Elite switch and product packaging on an online store page.
    Let's quote the product description:
    Advertisement for the Sonoff POW Elite smart power meter with feature descriptions and an LCD display.
    By default, the device uses the eWeLink application:
    Sonoff POWR316D with LCD display and eWeLink packaging.
    Specifications and dimensions:
    Technical specifications of Sonoff POWR316D
    Let's see what we get in practice:
    Sonoff POWR316D box on a wooden table Sonoff POWR316D energy meter packaging on a wooden surface. Side of Sonoff box with QR code and eWeLink app information. Blue packaging of Sonoff POWR316D energy meter on a wooden surface. Sonoff POWR316D Elite16A boxes on a wooden surface.
    The set does not include screws, but includes the module itself and a plastic hook/mounting mat:
    Back of Sonoff POWR316D module with technical details on a wooden background. Sonoff POWR316D with LCD display in packaging
    Instruction:
    Sonoff POWR316D user manual in various languages. User manual for Sonoff POWR316D energy meter with multilingual text.
    Sonoff POWR316D user manual in various languages. Sonoff device manual with illustrations and information on Bluetooth pairing. User manual for Sonoff device with multiple languages. Sonoff POWR316D user manual spread out on a desk. User manual for the Sonoff POWR316D device with text in multiple languages. Sonoff energy meter user manual unfolded on a table.

    A short test without changing the firmware
    To test, I connected an old lamp:
    Sonoff POWR316D energy meter connected to a lamp Sonoff POWR316D energy meter with LCD display. Sonoff POWR316D with an LCD display showing energy consumption.
    The display is not very readable, but it does its job. It alternately shows voltage, power, current and also the sum of consumed electricity, the counter of which can be reset in the application. Quite comfortable!

    We look inside
    Let's unscrew the screws. You can already see the transformer inside, there is probably a small impulse converter there, as well as some poor filters at the power input, this time there is probably even a varistor and a capacitor:
    View of the interior of the Sonoff POWR316D module with electronic components on the PCB. Interior of the Sonoff POWR316D module showing electronic components. Interior of Sonoff energy meter with visible PCB and electronic components.
    After unscrewing the screws, you can remove the board:
    Interior of Sonoff POWR316D enclosure and PCB. Sonoff POWR316D circuit board with visible electronic components.
    The display is controlled by TM1621:
    Close-up of a circuit board with integrated circuits and TM1621 marking.
    The heart of the device is ESP32, on the PCB right next to it you can also see SPI Flash memory with the program and a programming connector with RX and TX, I will mention IO0 later.
    Close-up of the Sonoff POWR316D PCB with visible electronic components.
    The integrated circuit at L4 looks like a step down converter to me, it probably provides 3.3V for ESP:
    Close-up of the Sonoff POWR316D circuit board with visible components.
    The CSE7759B is responsible for energy measurement:
    Close-up of a circuit board with electronic components.
    The main power supply is based on LP3667:
    Circuit board inside Sonoff meter with visible electronic components
    The high-current paths are additionally tinned, the photo also shows a resistor with a tolerance of 1% - shunt:
    Sonoff POWR316D circuit board with visible electronic components.

    POWR316D firmware change
    The device is based on ESP32, you can upload Tasmota, either via esptool.py or via the online installer:
    How to easily install Tasmota - online installer tasmota.github.io/install via a web browser
    This time we solder four wires, power supply (3.3V), ground, RX and TX:
    Sonoff PCB board with connected wiring and a breadboard.
    IO0 is output to the button, so to enter the bootloader mode we must first press this button and then connect the power supply (3.3V power supply)
    Of course, we perform all flashing operations away from the 230V network, everything must be completely disconnected, but this is rather obvious, as always.
    I decided to use esptool.py because I always backup the firmware:
    Screenshot of CMD program during the flashing of Sonoff POWR316D.
    Then I loaded Tasmota:
    Tasmota interface on ESP32-DevKit with configuration buttons
    I found the template ready on the Blakadder website:
    
    {"NAME":"Sonoff POWR316D","GPIO":[32,0,0,0,0,576,0,0,0,224,9280,0,3104,0,320,0,0,0,0,0,0,9184,9248,9216,0,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":1}
    

    Uploading:
    Tasmota configuration interface on ESP32-DevKit.
    After activation:
    Sonoff POWR316D user interface with Tasmota User interface of Sonoff POWR316D with Tasmota firmware showing energy consumption data.
    The display also works:
    White Sonoff energy meter with an LCD display showing measurements. White Sonoff energy meter on a wooden background Sonoff POWR316D connected to a lamp and a multimeter Sonoff POWR316D with a connected lamp and LCD display showing energy consumption.
    After changing the firmware, the device requires calibration:
    https://tasmota.github.io/docs/Power-Monitoring-Calibration/

    Summary
    A very cool gadget. The price is slightly higher than in the case of regular smart sockets with energy measurement, but in exchange we get a display, which in my opinion is more convenient than constantly reaching for the phone or web browser to check the measurements in Home Assistant. In general, it's hard for me to get used to the phone and I much prefer gadgets that also work without WiFi, such as this energy meter from the topic or, for example, an LED strip controller with a button (as opposed to LED strip controllers without buttons - yes, such are on sale, and then the WiFi runs out and you can't turn on the lights...). To sum up, for me this gadget is worth attention.
    Does anyone use these types of Sonoff products? I invite you to share your impressions.

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 14701 posts with rating 12748, helped 656 times. Been with us since 2014 year.
  • ADVERTISEMENT
  • #2 20828342
    krzbor
    Level 29  
    Posts: 1774
    Help: 41
    Rate: 1067
    A very interesting device due to its display. The price is also quite decent. I found something similar: Link . I wonder if it's not even the same display.
  • ADVERTISEMENT
  • #3 20829062
    mfac
    Level 17  
    Posts: 246
    Help: 18
    Rate: 65
    It is tempting to check the measurement accuracy, especially for non-linear loads and PF
  • ADVERTISEMENT
  • #4 21052523
    szczukot
    Level 14  
    Posts: 826
    Help: 6
    Rate: 83
    Does anyone know how to control it themselves - without Tasmota ?
    Any API etc ?
    Because I'm struggling for the second day and it's lame.
  • #5 21089691
    szczukot
    Level 14  
    Posts: 826
    Help: 6
    Rate: 83
    What exactly is the ESP32 chip in this device?
📢 Listen (AI):

FAQ

TL;DR: For users who want Home Assistant integration, the Sonoff POWR316D can be flashed over 3.3V serial with four wires, and the key trick is: "press the button first" to enter ESP32 bootloader mode. The thread confirms Tasmota works, the LCD still works, and calibration is needed after flashing. [#20827853]

Why it matters: This FAQ shows how to convert a display-equipped Sonoff energy meter from eWeLink to a local Tasmota setup while keeping relay control, power metering, and on-device readout.

Option Local display Home Assistant path mentioned Firmware path in thread Main trade-off
Sonoff POWR316D Yes, built-in LCD Tasmota ESP32 serial flashing Higher price, but instant local readout
Regular smart plug with energy monitoring Not stated in thread Home Assistant via web/phone checking Not discussed Cheaper class, but no front-panel display

Key insight: The most important practical detail is boot mode entry: hold the IO0-linked button, then apply 3.3V power. Without that sequence, flashing over RX/TX will fail. [#20827853]

Quick Facts

  • The flashing setup in the thread uses 4 wires: 3.3V, GND, RX, and TX connected directly to the board’s programming pads. [#20827853]
  • The LCD cycles through voltage, power, current, and the accumulated energy total, which can be reset in the mobile app before reflashing. [#20827853]
  • The teardown identifies three key chips: ESP32 as the main MCU, TM1621 for the LCD, and CSE7759B for energy measurement. [#20827853]
  • The author explicitly warns to do all flashing work away from the 230V mains side and with the device completely disconnected from line power. [#20827853]

How do I flash Tasmota onto the Sonoff POWR316D with esptool.py step by step?

You flash it over the ESP32 serial interface with a 3-step process.
  1. Solder 3.3V, GND, RX, and TX to the programming connector.
  2. Enter bootloader mode by holding the button tied to IO0, then applying 3.3V power.
  3. Use esptool.py to back up the original firmware first, then write Tasmota and apply the Sonoff POWR316D template in Tasmota.
The thread shows this exact flow and confirms the relay, metering, and LCD work after template import. [#20827853]

What is the correct way to put the Sonoff POWR316D into ESP32 bootloader mode using the IO0 button?

Press and hold the button connected to IO0, then connect the 3.3V supply. That power-on sequence forces the ESP32 into bootloader mode for serial flashing. If you power the board first and press later, the bootloader may not start, so flashing can fail. The thread states this sequence explicitly and ties IO0 to the front button. [#20827853]

Which GPIO template should I use in Tasmota for the Sonoff POWR316D so the relay, power metering, and LCD display work properly?

Use the Sonoff POWR316D template shown in the thread. The author says it was taken from Blakadder and confirms that, after loading it, both the energy features and the LCD worked. {"NAME":"Sonoff POWR316D","GPIO":[32,0,0,0,0,576,0,0,0,224,9280,0,3104,0,320,0,0,0,0,0,0,9184,9248,9216,0,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":1} [#20827853]

Why does the Sonoff POWR316D need power monitoring calibration after flashing Tasmota, and how do I do it?

It needs calibration because Tasmota replaces the factory firmware, so the power-monitoring values must be aligned again for that hardware. The thread states clearly that calibration is required after flashing and links to Tasmota’s power-monitoring calibration documentation. In practical terms, flash first, verify readings appear, then calibrate voltage, current, and power in Tasmota so measured values match known references. [#20827853]

How readable is the built-in LCD on the Sonoff POWR316D in everyday use, and what values does it cycle through?

The LCD is usable but not very readable. The author says it “does its job” and cycles through voltage, power, current, and the total consumed electricity value. That local display is the main advantage over plugs that require a phone or browser check for every reading. The energy counter shown on the display can also be reset in the app. [#20827853]

What is the TM1621 chip in the Sonoff POWR316D, and what does it do in the display circuit?

The "TM1621" is a display-driver IC that controls segmented LCD glass, handling the timing and segment driving needed for a low-power numeric display. In this device, the teardown identifies TM1621 as the chip responsible for the built-in screen, which is why the LCD can continue showing measurements after Tasmota is configured correctly. A commenter also noted ESPHome has a TM1621 display component, suggesting a similar control path. [#20828342]

What is the CSE7759B used for in the Sonoff POWR316D, and how does it measure voltage, current, and power?

The "CSE7759B" is an energy-measurement IC that samples line signals and computes electrical values such as voltage, current, and active power for smart meters. The teardown says this chip is responsible for measurement in the POWR316D. The board also includes a 1% shunt resistor, which is the current-sensing element paired with that metering path. [#20827853]

Sonoff POWR316D with display vs a regular smart plug with energy monitoring — which is better for Home Assistant and quick local readout?

The POWR316D is better if you want both Home Assistant integration and instant local readout. The author says its price is slightly higher than regular smart plugs with energy monitoring, but the built-in LCD is more convenient than reaching for a phone or browser. For a Tasmota-based setup, that means you keep local visibility while still exporting data to Home Assistant. [#20827853]

How safe is it to open and flash the Sonoff POWR316D, and what precautions should I take around the 230V mains side?

It is only safe if you flash it completely disconnected from 230V mains. The author states that all flashing operations must be done away from the mains side, using only the 3.3V serial setup. An obvious failure case is powering or handling the board while still connected to line voltage. Open the case, remove power fully, then connect your USB-to-UART wiring only to the low-voltage programming points. [#20827853]

What API or local control options are available for the Sonoff POWR316D if I want to use it without Tasmota?

The thread does not provide a confirmed local API for the stock firmware. It only states that the device uses the eWeLink app by default, and one later comment asks for “API etc?” without receiving an answer in the supplied posts. So, within this thread, the only documented local-control path is reflashing the ESP32 with Tasmota over serial. [#21052523]

What exactly is the ESP32 chip used in the Sonoff POWR316D?

The thread confirms the main controller is an ESP32, but it does not identify the exact ESP32 variant or module marking. The teardown photo description says the “heart of the device is ESP32,” and it also notes nearby SPI flash and a programming connector with RX and TX. A later comment asks for the exact chip model, but the provided thread segment does not answer that question. [#21089691]

How can I back up the original Sonoff POWR316D firmware before installing Tasmota?

Back it up with esptool.py before writing Tasmota. The author says that is why he chose esptool.py instead of only using the online installer: he always saves the factory firmware first. The thread shows a backup step, then a separate flashing step for Tasmota. If you may want to restore stock behavior later, dumping the original image first is the safest workflow. [#20827853]

What power supply and serial wiring do I need to connect to the Sonoff POWR316D for flashing over RX and TX?

Use a 3.3V supply and four serial connections: 3.3V, GND, RX, and TX. The author explicitly says he soldered those four wires for flashing. Do not use the mains input for this process. Keep the 230V side disconnected and talk only to the board’s low-voltage programming header or pads during backup and flashing. [#20827853]

How accurate are the Sonoff POWR316D measurements, especially with non-linear loads and poor power factor?

The thread does not provide measured accuracy data for non-linear loads or poor power factor. One commenter says it would be tempting to check accuracy specifically for non-linear loads and PF, but no test results or error percentages appear in the supplied posts. So the thread confirms the concern exists, yet it does not validate performance under those harder load conditions. [#20829062]

Could the Sonoff POWR316D LCD be driven from ESPHome using the TM1621 component, and what would the setup look like?

Yes, it looks plausible, but the thread stops short of a working ESPHome configuration. A commenter points to the ESPHome TM1621 component and wonders whether it may even support the same display type used here. The practical setup would therefore start by identifying the LCD as TM1621-based, then mapping the correct control lines from the POWR316D board. The supplied thread, however, does not include those pin assignments or a tested YAML example. [#20828342]
Summary generated by AI based on the discussion content.
ADVERTISEMENT