Nov 11, 2025

Energy measurement with SONOFF POWCT

 With a SONOFF POWCT i tried to measure my energy consumption:

https://sonoff.tech/en-de/products/sonoff-pow-ring-smart-power-meter-powct 

That worked quite well (display is really good). And because this thing had Wifi integration i tried to get the values to import them into my influx db.

But: This device is only talking to the cloud and you have to use eWeLink to see the data:

There is a web portal as well: https://web.ewelink.cc/#/ which is quite nice:

Problem: if you want a real history, you have to pay... 
There is a way to sniff the token inside the portal with the developer tools. Then you end up with a command like:

curl -s  'https://eu-apia.coolkit.cc/v2/device/thing?familyid=TTTTTTTTTTTT&num=30&beginIndex=-999999'   -H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:143.0) Gecko/20100101 Firefox/173.0'   -H 'Accept: application/json, text/plain, */*'   -H 'Accept-Language: en-US,en;q=0.5'   -H 'Accept-Encoding: gzip, deflate, br, zstd'   -H 'Content-Type: application/json'   -H 'X-CK-Nonce: ZZZZZ'   -H 'X-CK-Appid: YYYYYYY'   -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXX'   -H 'Origin: https://web.ewelink.cc'   -H 'Connection: keep-alive'   -H 'Referer: https://web.ewelink.cc/'   -H 'Sec-Fetch-Dest: empty'   -H 'Sec-Fetch-Mode: cors'   -H 'Sec-Fetch-Site: cross-site'   -H 'Pragma: no-cache'   -H 'Cache-Control: no-cache'

This Bearer token XXXX..XXX will expire every 30 days - so you have to get that again.

So i decided to install tasmota on this device. But that was not so easy. 

  • Tasmotizer stopped with: Invalid head of packet (0x46)
    and with that i found some pages with
  • Esptool / EspFlasher... they stopped with:
    Unexpected error: Error while retrieving firmware file 'https://raw.githubusercontent.com/Jason2866/ESP_Flasher/factory/bootloader/esp32/bin/bootloader_dout_40m.elf': 404 Client Error: Not Found for url: https://raw.githubusercontent.com/Jason2866/ESP_Flasher/factory/bootloader/esp32/bin/bootloader_dout_40m.elf
  • So i tried the webinstaller  https://tasmota.github.io/install/ but
    • Ubuntu with Firefox: not supported
    • Ubuntu with Chromium: did not find the USB port
    • Windows 11 with Edge: found USB port but no permissions
    • Windows 10 with Edge: found USB port but installation stalled  
  • Winner was: a fresh Google Chrome on Ubuntu

With that i installed the default tasmota.bin - and after a restart the SONOFF POWCT was dark. No LED blinked, display completely dark. My first thought: now i broke it....

However: giving up is no option - so i searched with my smartphone for Wifis and there it was: a Wifi named "tasmota". :)

So: configuration of Wifi completed and now i saw many modules - so which should i choose? There was an easy solution (thanks for the guys from tasmota!!!):

With Auto-conf you can just select "SONOFF POWCT" and after that display is showing the voltage etc... 

For getting the values as json, just a curl is needed:

/usr/bin/curl 'http://192.5.7.11/cm?cmnd=status0'

(for looking up the commands you can use https://tasmota.github.io/docs/Commands/#management)

and inside the json there is one substructure:

 "StatusSNS": {
    "Time": "2025-11-11T21:46:33",
    "ENERGY": {
      "TotalStartTime": "2025-11-10T19:32:01",
      "Total": 10.854,
      "Yesterday": 0,
      "Today": 10.854,
      "TodaySumImport": 10.854,
      "TodaySumExport": 0,
      "ExportActive": 0,
      "Power": 3356,
      "ApparentPower": 3413,
      "ReactivePower": 617,
      "Factor": 0.98,
      "Frequency": 49,
      "Voltage": 231,
      "Current": 14.747
    }

From my point of view a much better way to run that really excellent device! 

No comments:

Post a Comment