Would be nice to have three webform fiels and a calibrate button, so it's no longer needed to send the calibrate command manually.papperone wrote: ↑12 Jul 2017, 09:54surely you can, I do have a clamp and it's easierbut you can do it with 2 multimeter of course.
I tested with both 100W filament and 12W LED, I then used the calibration done with LED bulb as the W readings are more stable.
the library also calculate VA power but as it's a simple V*A I decided to report apparent power (W) and if someone needs VA power it can always be calculated externally.
I don't know if I can report more than 4 readings and let user to choose what to see, will check if this is possible.
Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
Moderators: grovkillen, Stuntteam, TD-er
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
60W lamp attached, switch on:
Device: Still not good...
No such debug statement in my syslog:
Added (float) but still no data (and yes, controller with idx 1172 was added to hlw8012):
Are the new multipliers saved automatically?Device: Still not good...
No such debug statement in my syslog:
Shouldn't this be the case?HLW8012: Calibration to values
Added (float) but still no data (and yes, controller with idx 1172 was added to hlw8012):
Code: Select all
Error: MQTT: Invalid data received!
MQTT: Topic: domoticz/in, Message: {"idx":1172}
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
you are sending the URL not correctly, it shoudl be:
as well can you try to send the commands via the WEB interface:
in both cases calibration parameters are saved automatically, and this you can verify looking at the device configuration as they are supposed to changed if all goes well.
I will explore your suggestion about the possibility to RESET/CALIBRATE via web interface, not a bad idea at all!
About Domoticz interface I can't help as I don't use it at all and have no experience, but I'm sure other forum member can help here
Code: Select all
xxx.xxx.xxx.xxx/control?cmd=hlwcalibrate,VVV,AAA,WWW
I will explore your suggestion about the possibility to RESET/CALIBRATE via web interface, not a bad idea at all!

About Domoticz interface I can't help as I don't use it at all and have no experience, but I'm sure other forum member can help here

My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
Done, however there is no feedback like 'OK'. It made me unsure wheather the calibration worked or not.papperone wrote: ↑12 Jul 2017, 16:57 you are sending the URL not correctly, it shoudl be:Code: Select all
xxx.xxx.xxx.xxx/control?cmd=hlwcalibrate,VVV,AAA,WWW
Checking the device, it seems like the calibration worked since the multipliers where updated:
The other data seems to be correct also:
Time to add Sonoff POW to the supported hardware list?

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
good to hear it works for you!!
now maybe we can wait at least some more users to confirm as well in order to make sure it's at least not a coincidence
anyhow I'll be out 3 weeks for my summer vacation, bringing the family to Japan, so I will not be able to work on further development / bugfix until my return!
now maybe we can wait at least some more users to confirm as well in order to make sure it's at least not a coincidence

anyhow I'll be out 3 weeks for my summer vacation, bringing the family to Japan, so I will not be able to work on further development / bugfix until my return!
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
I'll be gone to. Captain of a 30ft yacht, sailing the high seas...papperone wrote: ↑12 Jul 2017, 23:08 good to hear it works for you!!
now maybe we can wait at least some more users to confirm as well in order to make sure it's at least not a coincidence![]()
anyhow I'll be out 3 weeks for my summer vacation, bringing the family to Japan, so I will not be able to work on further development / bugfix until my return!

Domoticz does get the values through http, not through mqtt...
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
ok this needs to be explored, as my Raspberry+NodeRed is getting MQTT info from the test module as it should!LisaM wrote: ↑13 Jul 2017, 00:49I'll be gone to. Captain of a 30ft yacht, sailing the high seas...papperone wrote: ↑12 Jul 2017, 23:08 good to hear it works for you!!
now maybe we can wait at least some more users to confirm as well in order to make sure it's at least not a coincidence![]()
anyhow I'll be out 3 weeks for my summer vacation, bringing the family to Japan, so I will not be able to work on further development / bugfix until my return!![]()
Domoticz does get the values through http, not through mqtt...

if a Domoticz expert can help to understand how to fix this would be great!
Have fun with your "little toy"

My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
Is it possible to download the bin.file? I will try it on my Sonof Pow but i have on this moment not the skills to make my own bin file.
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
Bin file: https://drive.google.com/open?id=0B8G4U ... HJLU3dTYjQ
Char's:
- 1M/128k
- espeasy 2.0.10
4M/1M will work to, but for testing it's probably better to have it as small as possible...
Annoying: domoticz can only receive all values by using a text virtual sensor...

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
@LisaM,
Thanks for the bin file, work for me at the weekend
Thanks for the bin file, work for me at the weekend

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
J'ai testé chez moi sur Jeedom.
sorry I do not speak English !

Après Calibration (ampoule 60W)

ça fonction très bien pour mes premiers tests ! bravo et merci pour ce plugin !
https://www.jeedom.com/forum/viewtopic. ... 12#p495412
sorry I do not speak English !

Après Calibration (ampoule 60W)

ça fonction très bien pour mes premiers tests ! bravo et merci pour ce plugin !
https://www.jeedom.com/forum/viewtopic. ... 12#p495412
sorry for my English ! i use google translat.
Little Bug: forgets the calibration
Hi,
when the device lost the power and it came back then we found the "old" settings and the measure values are wrong.
Go to Devices --> Click Edit (the HLW8012) --> Click Submit --> Click Close
and he uses the calibration values.
Could the developer correct?
best wishes
BerndJ
when the device lost the power and it came back then we found the "old" settings and the measure values are wrong.
Go to Devices --> Click Edit (the HLW8012) --> Click Submit --> Click Close
and he uses the calibration values.
Could the developer correct?
best wishes
BerndJ
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
I have a calibration problem.
1 - I calibrated with a 50W bulb ---- reading ok.
2 - I connected a 500W electric radiator ---- fake reading.
3 - I calibrated with the measured values (multimeter) of the radiator ---- reading ok
4 - I connected the bulb.----fake reading
P and V = ok.
I = nok (1.94A read for 0.25A measured)??
The value of the calibrations (radiator) remained in memory.
1 - I calibrated with a 50W bulb ---- reading ok.
2 - I connected a 500W electric radiator ---- fake reading.
3 - I calibrated with the measured values (multimeter) of the radiator ---- reading ok
4 - I connected the bulb.----fake reading
P and V = ok.
I = nok (1.94A read for 0.25A measured)??
The value of the calibrations (radiator) remained in memory.
sorry for my English ! i use google translat.
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
Hi,
is the 50W bulb a resistor load, or an electronic? with rectifier and capacitor.
What is the power factor?
is the 50W bulb a resistor load, or an electronic? with rectifier and capacitor.
What is the power factor?
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
is a Incandescent light bulb (resistor)

Calibration done with the radiator data.
The bulb can not consume 1.96A ! but 0.25A With my multimeter.
I continue my tests, thank.

Calibration done with the radiator data.
The bulb can not consume 1.96A ! but 0.25A With my multimeter.
I continue my tests, thank.
sorry for my English ! i use google translat.
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
Hello,
I think there is a problem with the value I (Current).
My calibration was:
Xxx.xxx.x.xx / control? Cmd = hlwcalibrate, 234,0.25,58.5
For the bulb the values are good.
I tested with a toaster (750W)
Everything looks good except I (Current) = 0.43A this is not possible!

I think there is a problem on I (Current), or that I have done something wrong!
I will wait for the return of Papperon and LisaM.
I think there is a problem with the value I (Current).
My calibration was:
Xxx.xxx.x.xx / control? Cmd = hlwcalibrate, 234,0.25,58.5
For the bulb the values are good.
I tested with a toaster (750W)
Everything looks good except I (Current) = 0.43A this is not possible!

I think there is a problem on I (Current), or that I have done something wrong!
I will wait for the return of Papperon and LisaM.
sorry for my English ! i use google translat.
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
Hi,
make a calibraton with the toaster, he had a power factor of 100%, and this is ideal for calibration.
Take a look to yr light, power factor ??
when u use this part for calibration there is no way for 100% results.
best wishes
BerndJ
make a calibraton with the toaster, he had a power factor of 100%, and this is ideal for calibration.
Take a look to yr light, power factor ??
when u use this part for calibration there is no way for 100% results.
best wishes
BerndJ
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
A toaster might have a thermostat, or other regulator settings that decrease the power/current, did you also have a multimeter in line to measure the current?rol-rider wrote: ↑28 Jul 2017, 09:55 Hello,
I think there is a problem with the value I (Current).
My calibration was:
Xxx.xxx.x.xx / control? Cmd = hlwcalibrate, 234,0.25,58.5
For the bulb the values are good.
I tested with a toaster (750W)
Everything looks good except I (Current) = 0.43A this is not possible!
I think there is a problem on I (Current), or that I have done something wrong!
I will wait for the return of Papperon and LisaM.
I don't trust radiators, toasters or other electrical equipment since they might regulate the power flow independantly of you (surprise!). To calibrate you need something simple that cannot change the power/current...
Re: Little Bug: forgets the calibration
Your browser might automatically fill in the 'old' values, so:BerndJ wrote: ↑27 Jul 2017, 12:28 Hi,
when the device lost the power and it came back then we found the "old" settings and the measure values are wrong.
Go to Devices --> Click Edit (the HLW8012) --> Click Submit --> Click Close
and he uses the calibration values.
Could the developer correct?
best wishes
BerndJ
- calibrate
- Save settings in a file
- Save settings
- Lose power
- Check calibration values with values in file...
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
Hello,
I calibrated by noting and checking the "calibration values"
When the calibration is done on the toaster (no thermostat).
The values correspond to my readings (multimeter).
If I connect the radiator:
Read value with espeasy 489W 2.56A 225V 85PF --- OK
But when I use a bulb (60W incandescent)
Read value with espeasy 51W 1.94A 209V 25PF
Current I = 1.94A ????? Not possible 0.25A to the multimeter which is logical for a 60W bulb P = UI (cos pi = 1) 230X0.25 = 57.5W
If I calibrate with the values of the bulb,
OK for the bulb.
With the radiator
Read value with espeasy 471W 0.43A 225V 100PF
I = 0.43 ???? Not possible
Sorry for english is google translate
I calibrated by noting and checking the "calibration values"
When the calibration is done on the toaster (no thermostat).
The values correspond to my readings (multimeter).
If I connect the radiator:
Read value with espeasy 489W 2.56A 225V 85PF --- OK
But when I use a bulb (60W incandescent)
Read value with espeasy 51W 1.94A 209V 25PF
Current I = 1.94A ????? Not possible 0.25A to the multimeter which is logical for a 60W bulb P = UI (cos pi = 1) 230X0.25 = 57.5W
If I calibrate with the values of the bulb,
OK for the bulb.
With the radiator
Read value with espeasy 471W 0.43A 225V 100PF
I = 0.43 ???? Not possible
Sorry for english is google translate
sorry for my English ! i use google translat.
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
Hi,
I think I have found my problem!
I calibrated with the "bulb" values:
xxx.xxx.x.xx / control? cmd = hlwcalibrate, 234,0.25,60
Calibration values in the plugin
Current Multiplier = 1849.00
Voltage Multiplier = 442689.56
Power Multiplier = 12168954.98
Reading with the espeasy bulb P = 59W U = 226V I = 0.25A PF = 100
More read (relay on/off/on/off) always ok.
Now if I disconnect the Sonoff
After recovery on my network:
Calibration values in the plugin (not changed)
Current Multiplier = 1849.00
Voltage Multiplier = 442689.56
Power Multiplier = 12168954.98
Reading with the espeasy bulb P = 50W U = 209V I = 1.92A PF = 12
Conclusion: the calibration does not remain in memory. Is this normal?
I think I have found my problem!
I calibrated with the "bulb" values:
xxx.xxx.x.xx / control? cmd = hlwcalibrate, 234,0.25,60
Calibration values in the plugin
Current Multiplier = 1849.00
Voltage Multiplier = 442689.56
Power Multiplier = 12168954.98
Reading with the espeasy bulb P = 59W U = 226V I = 0.25A PF = 100
More read (relay on/off/on/off) always ok.
Now if I disconnect the Sonoff
After recovery on my network:
Calibration values in the plugin (not changed)
Current Multiplier = 1849.00
Voltage Multiplier = 442689.56
Power Multiplier = 12168954.98
Reading with the espeasy bulb P = 50W U = 209V I = 1.92A PF = 12
Conclusion: the calibration does not remain in memory. Is this normal?
sorry for my English ! i use google translat.
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
Ok for this bug!
That I had not understood. (Google translate... or me!)
Rest The I current!
With these two measures

Bulb, correct value.

toaster ? Only the Current (A) is NOK!
How active power can be good and not Current ?
That I had not understood. (Google translate... or me!)
Rest The I current!
With these two measures

Bulb, correct value.

toaster ? Only the Current (A) is NOK!
How active power can be good and not Current ?
sorry for my English ! i use google translat.
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
HI, I will be back home tomorrow and I'll look into the plugin based on your comments to fix bugs (like the one that calibration is nor surviving a reset/power down).
About the "Active Power" of course if you calibrate with a resistive load then you try to measure a reactive load the values are wrong!
The units is not meant to be used like this, and the chipset is an economic one so I doubt this can be managed differently.
This is not a multi-purpouse power measure unit nor a home monitor, Sonoff POW (better, chipset HLW8012) is designed to monitor one single device thus you must calibrate it vs, that specific defice.
About the "Active Power" of course if you calibrate with a resistive load then you try to measure a reactive load the values are wrong!
The units is not meant to be used like this, and the chipset is an economic one so I doubt this can be managed differently.
This is not a multi-purpouse power measure unit nor a home monitor, Sonoff POW (better, chipset HLW8012) is designed to monitor one single device thus you must calibrate it vs, that specific defice.
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
Re: Little Bug: forgets the calibration
Thanks for spotting it, just submitted pull-up request with this bug fixed!! (just waiting to be merged with master branch)BerndJ wrote: ↑27 Jul 2017, 12:28 Hi,
when the device lost the power and it came back then we found the "old" settings and the measure values are wrong.
Go to Devices --> Click Edit (the HLW8012) --> Click Submit --> Click Close
and he uses the calibration values.
Could the developer correct?
best wishes
BerndJ
About the ActivePower calculation this is done by the chip and as I wrote it's based on how you calibrate it, so if you change load type you need to calibrate it again to take this into consideration...
I am expecting this is standard behaviour of this chip, but wouldbe interesting to know how other firmware behaves on the POW (like the original ones or the Espurna) as they are supposed to work exactly the same way!
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
papperone en LisaM, Thanks for the work your both did for community so that we can work with the Itead, Sonoff Pow. It works fine.
I have only one question, papperone in a earlier message you mentioned this:
I have only one question, papperone in a earlier message you mentioned this:
Is this command allready in the software? and yes, how do i used it.I will explore your suggestion about the possibility to RESET/CALIBRATE via web interface, not a bad idea at all!![]()
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
Thx, but it was papperone who did the build work. i just tested it.ManS-H wrote: ↑24 Aug 2017, 20:27 papperone en LisaM, Thanks for the work your both did for community so that we can work with the Itead, Sonoff Pow. It works fine.
I have only one question, papperone in a earlier message you mentioned this:
Is this command allready in the software? and yes, how do i used it.I will explore your suggestion about the possibility to RESET/CALIBRATE via web interface, not a bad idea at all!![]()
As far as i know, the calibrate option isn't there yet but shouldn't be to difficult to make.
The current calibrate function uses http:
Code: Select all
xxx.xxx.xxx.xxx/control?cmd=hlwcalibrate,VVV,AAA,WWW
AAA = ampere (current)
WWW = Watts (like 60 for a light bulb).
@Papperone:
PLUGIN_WRITE, PLUGIN_WEBFORM_SAVE and PLUGIN_WEBFORM_LOAD (add function selector) need some rewriting, so that write and save can call the calibrate function.
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
indeed, that's the idea in order to implement the calibration via WEB interface and not only issueing command...
honestly I had put this in lower priority as I do have the calibration in my home automation gui via MQTT but it's definitely an improvement that shoudl be done in the GUI of this plugin

My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
All current bugfixes have been merged in the Playground repository...
About the calibration via WEB I'm not sure is a good place as we cannot have buttons and the previous calibration values are not stored anywhere.
I don't think it makes sense to add this complexity in storage as this will anyhow run the calibration process any time the device page is submitted.
I still believe the right way if to use the already available command and to create (if you wish like I did) a possibility of remote calibration in your GUI.
About the calibration via WEB I'm not sure is a good place as we cannot have buttons and the previous calibration values are not stored anywhere.
I don't think it makes sense to add this complexity in storage as this will anyhow run the calibration process any time the device page is submitted.
I still believe the right way if to use the already available command and to create (if you wish like I did) a possibility of remote calibration in your GUI.
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
-
- New user
- Posts: 4
- Joined: 17 Sep 2017, 12:10
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
Dear Papperone,
Would you mind to provide a link to the .bin file with the firmware you merged your updates into?
This would it make it easier to test and to provide further feedback.
Thank you for your great contribution to this topic.
Best
Homeautomator24
Would you mind to provide a link to the .bin file with the firmware you merged your updates into?
This would it make it easier to test and to provide further feedback.
Thank you for your great contribution to this topic.
Best
Homeautomator24
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
Dear Papperone,
I second that request from Homeautomator24.
Spend the last couple of hours trying to compile the bin file.
But on two different systems using both the latest Arduino software and the older version 1.6.12 it kept throwing errors.
If you could make the bin available for a 4mb esp I would greatly appreciate it.
With kind regards,
E
I second that request from Homeautomator24.
Spend the last couple of hours trying to compile the bin file.
But on two different systems using both the latest Arduino software and the older version 1.6.12 it kept throwing errors.
If you could make the bin available for a 4mb esp I would greatly appreciate it.
With kind regards,
E
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
I compiled the new file.
available on the forum jeedom
https://www.jeedom.com/forum/viewtopic. ... 12#p517212
available on the forum jeedom
https://www.jeedom.com/forum/viewtopic. ... 12#p517212
sorry for my English ! i use google translat.
-
- New user
- Posts: 4
- Joined: 17 Sep 2017, 12:10
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
Thank you, Rol-rider.
After flashing, I get errors with looping reset during boot: see below.
Any idea why this happens? Anybody can reconfirm? Using a 4M Sonoff Pow.
UART Messages:
ets Jan 8 2013,rst cause:1, boot mode:(3,6)
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v09826c6d
~ld
⸮U
INIT : Booting version: (custom)
INIT : Warm boot #29
FS : Mounting...
FS : Mount successful, used 72288 bytes of 113201
INIT : Free RAM:26568
INIT : I2C
INIT : SPI not enabled
Exception (29):
epc1=0x4000e1c3 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000018 depc=0x00000000
ctx: cont
sp: 3fff3900 end: 3fff3da0 offset: 01a0
After flashing, I get errors with looping reset during boot: see below.
Any idea why this happens? Anybody can reconfirm? Using a 4M Sonoff Pow.
UART Messages:
ets Jan 8 2013,rst cause:1, boot mode:(3,6)
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v09826c6d
~ld
⸮U
INIT : Booting version: (custom)
INIT : Warm boot #29
FS : Mounting...
FS : Mount successful, used 72288 bytes of 113201
INIT : Free RAM:26568
INIT : I2C
INIT : SPI not enabled
Exception (29):
epc1=0x4000e1c3 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000018 depc=0x00000000
ctx: cont
sp: 3fff3900 end: 3fff3da0 offset: 01a0
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
Hi Rol-Rider,
I also tried it on a Sonoff POW 4M.
For me it works fine.
It took a couple of tries before the flashing completed succesfully.
But that was the same case with the standard ESPEasy bin files.
Might be the cheap USB serial adapter.
You really helped me out.
Merci Beaucoup
I also tried it on a Sonoff POW 4M.
For me it works fine.
It took a couple of tries before the flashing completed succesfully.
But that was the same case with the standard ESPEasy bin files.
Might be the cheap USB serial adapter.
You really helped me out.

Merci Beaucoup
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
@ homeautomator24,
sonoff pow is 1M not 4M.
I had the same thing through OTA.
I have (with USB serial adapter)
--flash R120 V1(file ESPEasy_R120_1024.bin)
(wait erase sector)
--and flash the file in V2.0.0
after it's good.
sorry for my English (google translate)
sonoff pow is 1M not 4M.
I had the same thing through OTA.
I have (with USB serial adapter)
--flash R120 V1(file ESPEasy_R120_1024.bin)
(wait erase sector)
--and flash the file in V2.0.0
after it's good.
sorry for my English (google translate)
sorry for my English ! i use google translat.
-
- New user
- Posts: 4
- Joined: 17 Sep 2017, 12:10
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
Merci Beaucoup, Will try again
A bientot

-
- New user
- Posts: 4
- Joined: 17 Sep 2017, 12:10
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
Dear, rol-rider, All,
I took the recent .bin file provided by rol-rider, configured HLW8012 with GPIO-5/-13-14 as described many times above. Needed to free up I2C GPIOs now to GPIO-1/-3.
Power Factor and Power works fine after calibration.
However, Voltage and Current remain in 0.
Anybody any idea why this happens?
Would anybody like to post the assignment of GPIO pins in a working Sonoff Pow environment?
Thank you.
Homeautomator24
I took the recent .bin file provided by rol-rider, configured HLW8012 with GPIO-5/-13-14 as described many times above. Needed to free up I2C GPIOs now to GPIO-1/-3.
Power Factor and Power works fine after calibration.
However, Voltage and Current remain in 0.
Anybody any idea why this happens?
Would anybody like to post the assignment of GPIO pins in a working Sonoff Pow environment?
Thank you.
Homeautomator24
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
Hi around there.
maybe somebody could help me with compiling P170_HLW8012.
I have installed Atom (1.22.1 / 64) and PlatformIO at version Home 0.3.2·Core 3.5.0b3. following the entire HowTo`s and use the latest Mega-branch on an Win10 x64.
I have installed all required deps and libraries.
Compiling for normal/test/dev at 4096 is working fine with the current GIT sources but as soon as i try to compile with _P170_HLW8012.ino i run into an error :

Any ideas to get that sorted would be much appreciated.
regards
sm0k0
maybe somebody could help me with compiling P170_HLW8012.
I have installed Atom (1.22.1 / 64) and PlatformIO at version Home 0.3.2·Core 3.5.0b3. following the entire HowTo`s and use the latest Mega-branch on an Win10 x64.
I have installed all required deps and libraries.
Compiling for normal/test/dev at 4096 is working fine with the current GIT sources but as soon as i try to compile with _P170_HLW8012.ino i run into an error :
I have already searched around Google and checked for the given hints on this issue (like heap.c and umm_malloc.c changes) deleted a lot of other plugins but no way...........Linking .pioenvs\test_4096\firmware.elf
c:/users/sm0k0/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: .pioenvs\test_4096\firmware.el
f section `.text' will not fit in region `iram1_0_seg'
collect2.exe: error: ld returned 1 exit status
*** [.pioenvs\test_4096\firmware.elf] Error 1

Any ideas to get that sorted would be much appreciated.
regards
sm0k0
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
Hi again,
looks like the issue is the poor memory on the ESP .....
i have used workaround in the meantime :
and as a last line in desired plugin to exclude
Btw: plugins like those for Oled, Wifigateway and RGBW and this Candle thing are eating a lot of the memory so you should get rid of them first.
best regards
sm0k0
looks like the issue is the poor memory on the ESP .....
i have used workaround in the meantime :
- remove all unwanted plugins by excluding them from compiling, add at the very beginning of each plugin
#ifdef PLUGIN_BUILD_DISABLED
and as a last line in desired plugin to exclude
#endif
- remove all unwanted libraries from the lib folder
Btw: plugins like those for Oled, Wifigateway and RGBW and this Candle thing are eating a lot of the memory so you should get rid of them first.
best regards
sm0k0
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
Hi...i am a new user here. As per my knowledge many ESPEasy users would like to see support for the SonoffPOW in their favorite software, until 2 weeks ago I was one of them, until I received my SonoffPOW from china by the mail.I was willing to give Espurna a chance, installed PlatformIO, learned to work with the basic commands and flashed my SonoffPOW.The webinterface looks indeed much different than the webinterface of ESPEasy but it works very intuitive. You have to use MQTT as protocol with a server. No other protocol is supported in Espurna. Domoticz can work with MQTT and communicates perfectly together with Espurna/SonoffPOW.
blind vias pcb
blind vias pcb
-
- New user
- Posts: 1
- Joined: 05 Mar 2018, 21:01
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
Hello you all,
A newbie to Sonoff here and new to this forum too
First of all let me thank all of you who are looking into this Sonoff POW to get it to work with ESPEasy, it's much appreciated !
If been reading this thread a few times, looking on the Internet/YouTube and visited some other sites in order to get the POW to work with ESPEasy. However no luck so far
I've seen that a few of you people managed to get it to work, but unfortunately I don't understand how to get there.
So far I have tried different versions of ESPEasy but I don't get the "Voltage & Current" Selection in the Devices tab.
Reading this thread I noticed that some people build a .bin file to be used, but how do I transfer it to the POW and add it properly so the device will understand what to do with it ?
All I want to do with this POW I have is to switch on/off my small kitchensink boiler (which should work just fine as it is now, I just have to add it to Domoticz), but if I am able to read out the time it takes to heat up I can tweak the time to switch it on (&off). And hey, as I bought a POW I might aswell use the features it supports, right ?
Thanks in advance if you take time to help me out on this one. I really want to learn more about these devices and how they can help me to automate my house.
Irtimid
A newbie to Sonoff here and new to this forum too

First of all let me thank all of you who are looking into this Sonoff POW to get it to work with ESPEasy, it's much appreciated !
If been reading this thread a few times, looking on the Internet/YouTube and visited some other sites in order to get the POW to work with ESPEasy. However no luck so far

I've seen that a few of you people managed to get it to work, but unfortunately I don't understand how to get there.
So far I have tried different versions of ESPEasy but I don't get the "Voltage & Current" Selection in the Devices tab.
Reading this thread I noticed that some people build a .bin file to be used, but how do I transfer it to the POW and add it properly so the device will understand what to do with it ?
All I want to do with this POW I have is to switch on/off my small kitchensink boiler (which should work just fine as it is now, I just have to add it to Domoticz), but if I am able to read out the time it takes to heat up I can tweak the time to switch it on (&off). And hey, as I bought a POW I might aswell use the features it supports, right ?
Thanks in advance if you take time to help me out on this one. I really want to learn more about these devices and how they can help me to automate my house.
Irtimid
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
Please help me.
How to set PLUGIN_SET_SONOFF_POW to compile in Arduino?
How to set PLUGIN_SET_SONOFF_POW to compile in Arduino?
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
By far the easiest is to write on the first line of ESPEasy.ino:
Code: Select all
#define PLUGIN_SET_SONOFF_POW
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
Thank You TD-er. I think at least I understood the define system.
Only one question:
I would like not touch too much in main files as I far away from code developing. So I read some info And prepare Custom.h file.
So can I put my custom definitions on custom.h ?
For eq
Only one question:
I would like not touch too much in main files as I far away from code developing. So I read some info And prepare Custom.h file.
So can I put my custom definitions on custom.h ?
For eq
Code: Select all
#undef PLUGIN_BUILD_NORMAL
#define PLUGIN_BUILD_CUSTOM
#define PLUGIN_SET_SONOFF_POW // I don't know is the rigt place here (bottom) or on top?
#define <PLUGIN_WHAT_I_NEED> //
etc
Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?
How to calibrate HLW8012 device in ESPEasy mega web interface?
Why does I receive only Voltage and no other values?
Added:
Check that you're not using GPIO-14 elsewhere in settings explicit HLW8012 device.
Why does I receive only Voltage and no other values?
Added:
Check that you're not using GPIO-14 elsewhere in settings explicit HLW8012 device.
Who is online
Users browsing this forum: No registered users and 20 guests