Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
mrwee
Normal user
Posts: 225
Joined: 31 Aug 2016, 12:52

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#31 Post by mrwee » 08 May 2017, 13:50

costo wrote: 08 May 2017, 01:57 Apparently Espurna software is almost unknown here. You cannot compare Espurna with ESPEasy, they are written with totally different users in mind. ESPEasy is made for experimenters who like to add sensors or devices to the ESP unit. Espurna is written for dedicated devices, there are no plugins for new sensors. Only dedicated devices like most Sonoff devices, wemos relay shield and just a few other hardware devices are supported. No extensions are supported.

Now look at the SonoffPOW, when you open it you may get the false idea that the high voltage is separated from the low voltage part. Several slots in the board between high and low voltage give you that illusion. But what it looks like is totally false, the high voltage and low voltage share a common ground. Totally opposite from a normal Sonoff wifi switch where the high and low voltage circuits have a decent separation.
Because of this false look unexperienced people may get the unholy idea that adding extra sensors to a SonoffPOW is safe.

Imagin what will happen if these unexperienced people have ESPEasy on a SonoffPOW . . . . . . . . some people ignore all warnings and will connect sensors or a display to the RxTx-I2C bus . . . . . . . just because they can.

So I say that ESPEasy on a SonoffPOW is potentally a very dangerous situation.

Why would the developer(s) of ESPEasy create a plugin that is potentially life threatining. It could give ESPEasy a bad name. Better leave the SonoffPOW to dedicated firmware like Tasmota or Espurna.
I don't get what you're trying to achieve here... It can never be ESPEasy's problem that someone doesn't know how to handle flashing an Itead POW. Many of the Itead products are using mains and modifying the product with 3rd party firmware involves competance. If you don't know what you're doing, then don't. Flashing with Espurna firmware is not more safe than flashing with any other firmware, so why not support POW with ESPEasy, when that's what people in this forum are using?

But I do support the idea of a hardware guide like seen on Espurna's website incl. notes that you cannot connect mains and programming tool at the same time.. It should include a *disclaimer* stating that people themselves are responsible for that they are doing, that's never the responsibility of ESPEasy.

User avatar
costo
Normal user
Posts: 500
Joined: 21 Nov 2015, 15:03
Location: NL, zw-NB

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#32 Post by costo » 08 May 2017, 14:44

The discussion is going really nice ;)

The question is not : do we want support for the SonoffPOW in ESPEasy?
we do not support dedicated hardware devices from certain manufacturers in ESPEasy there is only support for certain hardware chips or these chips on a breakoutboard.

So the real question is: Do we want support for the HLW8012 in ESPEasy ?

There exists a HLW8012 breakout boards
on Ebay http://www.ebay.com/itm/Energy-Meter-HL ... SwuLZY4skR
on Electrodragon http://www.electrodragon.com/product/en ... ut-board/

and a wiki http://www.electrodragon.com/w/Energy_meter

So a experienced coder who wants to take the challenge can make an ESPEasy plugin for the HLW8012 . This plugin could then be added to the playground and those who like it can add the plugin in their own code and compile it.

But in my opinion the official developer(s) and the official wiki should stay away from this plugin. Much too dangerous for inexperienced hardware people.
Specially much too dangerous to include it in official binary firmware.

mrwee
Normal user
Posts: 225
Joined: 31 Aug 2016, 12:52

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#33 Post by mrwee » 08 May 2017, 16:07

costo wrote: 08 May 2017, 14:44 we do not support dedicated hardware devices from certain manufacturers in ESPEasy there is only support for certain hardware chips or these chips on a breakoutboard.
But given the fact that many users are running ESPEasy on e.g. Itead products, then perhaps this should be revised? (I did not know that dedicated hardware devices were out-of-scope, that certainly puts a question mark on my usage of ESPEasy :) )

krikk
Normal user
Posts: 118
Joined: 28 Feb 2017, 07:57
Location: Austria
Contact:

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#34 Post by krikk » 08 May 2017, 18:51

costo wrote: 08 May 2017, 14:44 we do not support dedicated hardware devices from certain manufacturers in ESPEasy there is only support for certain hardware chips or these chips on a breakoutboard.
where do you get this info??? do not spread false rumors! this is open source software, the user can run it on every hardware which is technically possible!!! i run it on itead hardware (sonoff th16 and a S20) myself, why not??

bluejedi
Normal user
Posts: 35
Joined: 26 Sep 2016, 14:27

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#35 Post by bluejedi » 21 May 2017, 13:12

krikk wrote: 07 May 2017, 14:49 my thoughts on this:

why do we waste resouces the develop 2 different firmwares instead of one?? ...why did he develup espurna when there was espeasy already (or the other way around)? wouldn't one firmware which solves all, much better for the enduser...
Why do we have many different manufacturers and models for whatever type of device (including cars) you can think of?
That's why.
krikk wrote: 07 May 2017, 14:49 ...and are we here at the espeasy forum or on the "we promote espurna" forum...
We are here to help each other. In this case about a question on support for Sonoff POW, which unfortunately ESPEasy does not currently support.

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#36 Post by LisaM » 25 May 2017, 14:41

costo wrote: 08 May 2017, 14:44 The discussion is going really nice ;)

The question is not : do we want support for the SonoffPOW in ESPEasy?
we do not support dedicated hardware devices from certain manufacturers in ESPEasy there is only support for certain hardware chips or these chips on a breakoutboard.

So the real question is: Do we want support for the HLW8012 in ESPEasy ?

There exists a HLW8012 breakout boards
on Ebay http://www.ebay.com/itm/Energy-Meter-HL ... SwuLZY4skR
on Electrodragon http://www.electrodragon.com/product/en ... ut-board/

and a wiki http://www.electrodragon.com/w/Energy_meter

So a experienced coder who wants to take the challenge can make an ESPEasy plugin for the HLW8012 . This plugin could then be added to the playground and those who like it can add the plugin in their own code and compile it.

But in my opinion the official developer(s) and the official wiki should stay away from this plugin. Much too dangerous for inexperienced hardware people.
Specially much too dangerous to include it in official binary firmware.
I agree with the second part: ESPEasy should be supporting chipset and hardware using those chipset can be verified by (one or more) users.

Regarding the FIRST part: who is in control of ESPEasy??? Who has the final say about important statement like this? There MUST be a referree who makes the final call, this can be one or more people... For example Gizmocuz controls Domoticz, he has the final word on Domoticz developments (and more important branche integrations).

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#37 Post by LisaM » 25 May 2017, 14:48

mrwee wrote: 08 May 2017, 13:50
costo wrote: 08 May 2017, 01:57 Apparently Espurna software is almost unknown here. You cannot compare Espurna with ESPEasy, they are written with totally different users in mind. ESPEasy is made for experimenters who like to add sensors or devices to the ESP unit. Espurna is written for dedicated devices, there are no plugins for new sensors. Only dedicated devices like most Sonoff devices, wemos relay shield and just a few other hardware devices are supported. No extensions are supported.

Now look at the SonoffPOW, when you open it you may get the false idea that the high voltage is separated from the low voltage part. Several slots in the board between high and low voltage give you that illusion. But what it looks like is totally false, the high voltage and low voltage share a common ground. Totally opposite from a normal Sonoff wifi switch where the high and low voltage circuits have a decent separation.
Because of this false look unexperienced people may get the unholy idea that adding extra sensors to a SonoffPOW is safe.

Imagin what will happen if these unexperienced people have ESPEasy on a SonoffPOW . . . . . . . . some people ignore all warnings and will connect sensors or a display to the RxTx-I2C bus . . . . . . . just because they can.

So I say that ESPEasy on a SonoffPOW is potentally a very dangerous situation.

Why would the developer(s) of ESPEasy create a plugin that is potentially life threatining. It could give ESPEasy a bad name. Better leave the SonoffPOW to dedicated firmware like Tasmota or Espurna.
I don't get what you're trying to achieve here... It can never be ESPEasy's problem that someone doesn't know how to handle flashing an Itead POW. Many of the Itead products are using mains and modifying the product with 3rd party firmware involves competance. If you don't know what you're doing, then don't. Flashing with Espurna firmware is not more safe than flashing with any other firmware, so why not support POW with ESPEasy, when that's what people in this forum are using?

But I do support the idea of a hardware guide like seen on Espurna's website incl. notes that you cannot connect mains and programming tool at the same time.. It should include a *disclaimer* stating that people themselves are responsible for that they are doing, that's never the responsibility of ESPEasy.
Mains voltage (110-230v) danger is highly overrated here, i have been electrocuted many, many times (hundreds of times). It always hurts my fingers, but nothing else. The real danger starts at 400v because then your muscles contract and you can no longer free yourself from the voltage source (that's why always 2 people should work on voltages starting at 400v, so the second guy can free you from the electrocution).

Furthermore is it NEVER the responsibility of the development team to what you do with the hardware, if you get electrocuted it's ALWAYS your own fault. If you can't stand the heat, get out of the kitchen....

psy0rz
Normal user
Posts: 232
Joined: 02 Feb 2017, 12:12

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#38 Post by psy0rz » 29 May 2017, 01:14

LisaM wrote: 25 May 2017, 14:41
costo wrote: 08 May 2017, 14:44 The discussion is going really nice ;)

The question is not : do we want support for the SonoffPOW in ESPEasy?
we do not support dedicated hardware devices from certain manufacturers in ESPEasy there is only support for certain hardware chips or these chips on a breakoutboard.

So the real question is: Do we want support for the HLW8012 in ESPEasy ?

There exists a HLW8012 breakout boards
on Ebay http://www.ebay.com/itm/Energy-Meter-HL ... SwuLZY4skR
on Electrodragon http://www.electrodragon.com/product/en ... ut-board/

and a wiki http://www.electrodragon.com/w/Energy_meter

So a experienced coder who wants to take the challenge can make an ESPEasy plugin for the HLW8012 . This plugin could then be added to the playground and those who like it can add the plugin in their own code and compile it.

But in my opinion the official developer(s) and the official wiki should stay away from this plugin. Much too dangerous for inexperienced hardware people.
Specially much too dangerous to include it in official binary firmware.
I agree with the second part: ESPEasy should be supporting chipset and hardware using those chipset can be verified by (one or more) users.

Regarding the FIRST part: who is in control of ESPEasy??? Who has the final say about important statement like this? There MUST be a referree who makes the final call, this can be one or more people... For example Gizmocuz controls Domoticz, he has the final word on Domoticz developments (and more important branche integrations).
I think i'm currently the "Benevolent Dictator" that has final say in things, although Martinus will always be the BDFL (https://en.wikipedia.org/wiki/Benevolen ... r_for_life)

Regarding this issue: I think there is some confusion about the term "support". What does it mean if we say "ESPEasy supports a board of brand X"?

In programming terms it could mean: The software supports the core processor and chipsets of that board. It might mean we release additional binaries as well. (dev9 and higher have a ESP8285 binary as well, needed for that Sonoff board you where talking about)

If we dont have to do ugly hacks and can support stuff like this in a nice and generic way (like a HLW8012 plugin) I have no problem with it. (in software terms)

So in programming terms we shouldn't really talk about a Sonoff Pow, but instead about ESP8285 and a HLW8012 plugin. (plugin will probably also work with ESP8266 in that case)



Now the next step is support as in: Support for the endusers. Things like support on the forum and documentation on the wiki that says: For Sonoff Pow you need to use that binary and that plugin and you need to use these settings. And things like: LOOK OUT the sonoff pow is connected to mains, dont electrocute yourself and fry your equipment. Perhaps later there also will be additional wiki pages for another brand that uses HLW8012. Again i see no problem with this.


There the is support as in "We support this company": Now this is a different story. We probably should stay neutral? I dont know.


Also: Not supporting something (in either way), because its dangerous is a bit tricky: If we would do that, people would still create those plugins and upload them somewhere else. Perhaps they would put links to those plugins on the forum. Are we then going to ban those links? And maybe those links don't warn the users of the dangers involved.

So while the software developers are NOT be responsible for dangerous hardware, we as a community DO have a responsibility to warn the users. These warnings should be on the forums and in the wikis.

And no: Mains voltage is NOT overrated here. 220v/50hz is much more dangerous than 110v/60hz so you shouldn't compare those two like that. (both are dangerous is some cases) The effect depends on environmental factors: Types of shoes, type of carpet, is there a trip switch installed in the house. (One of my first studies was as an Electrician before i got into electronics and software engineering) Saying something stupid like this is very irresponsible!
Please support ESPEasy development via Patreon or buy us a coffee.

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#39 Post by papperone » 19 Jun 2017, 00:13

I hope not to create false expectations but I have received a couple of ElectroDragon HLW8012 modules which from a looking at schematics are identical to how the same chip is utilized on the Sonoff POW.
The only advantage is that you can use whatever PINs you want but that's not a big deal. I have already played a bit with them and succeed to have my own basic code to init the chip, and read both current and tension.
I'm still under testing, I want to better understand how the chip works and wihle it's true it's sharing GND with main live it's also true that many users here uses ESPEasy to operate Relays for live appliance so somehow they are already taking the risk to work with main live electricity; I agree that flashing a Sonoff POW is as dangerous but not less than any other ITEAD devices if you leave them connected to live power; about the fact to use then other sensors on the same "POW" device it's not a smart idea and shoudl be clearly stated.
I will definitely try to have support for HLW8012 in a ESPEasy plugin which is a fairy simple tasks but... due to the argumentation raised on this thread I'd like to consult with official ESPEasy developper before to eventually release it.
Still time to go as I don't have too much free time for the moment for this "hobby" but sooner or later it will be ready.

PS: techincally as well the 2 LEDs on POW are connected to GND, thus somehow to main live :)
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

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#40 Post by LisaM » 19 Jun 2017, 01:21

papperone wrote: 19 Jun 2017, 00:13 IPS: techincally as well the 2 LEDs on POW are connected to GND, thus somehow to main live :)
Everything is 'somehow' connected to main live...
Please show me what is then dangerous with the Sonoff here: https://www.letscontrolit.com/forum/vie ... f=5&t=3237
AC en DC circuits are neatly disconnected from each other, no danger there. Ofcourse is not wise to work on it with mains connected, that's always true when working with AC current.

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#41 Post by papperone » 19 Jun 2017, 07:05

LisaM wrote: 19 Jun 2017, 01:21
papperone wrote: 19 Jun 2017, 00:13 IPS: techincally as well the 2 LEDs on POW are connected to GND, thus somehow to main live :)
Everything is 'somehow' connected to main live...
Please show me what is then dangerous with the Sonoff here: https://www.letscontrolit.com/forum/vie ... f=5&t=3237
AC en DC circuits are neatly disconnected from each other, no danger there. Ofcourse is not wise to work on it with mains connected, that's always true when working with AC current.
I was not sarcastic, I am electronic engineer and took as well electrical certification for my previous job requirements so I know the danger of working with main live (I used to service industrial devices working with 400VAC 3 phases input).
I meant that every device which works with main is dangerous in the wrong hands; about Sonoff it's written everywhere to disconnect from mains before to program it first time, no matter which model.
It seems an obvious action to be done, but believe me I've seen many "so called electrician" doing things which are more than dangerous; I just wanted to highlight that the issue with working with main live is not related to POW only but to all devices operating with main live and that's a fact; then having a plugin which operates a realy or a plugin which read power consumption makes no changed to the fact you need to know and understand what you are doing!
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

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#42 Post by LisaM » 19 Jun 2017, 09:26

I'm an electrotechnical engineer (euro engineer in fact) and the 400vac you're mentioning is where it starts to get deadly, this is due to the fact that starting at 400vac your muscles contract and you no longer can free yourself. Regulations require that when working on 400v you're working in pairs, where the second is watching your back. I've worked for the largest gridco over here and i can tell horror stories about people stupid enough not to follow rules and getting themself fried.
I meant that every device which works with main is dangerous in the wrong hands;
A car in the wrong hands is also dangerous, just ask the britisch. It applies to most devices, regardless it's original function. 5vdc can kill a baby, in some cases, due to the much lower skin resistance.

Stupid people get darwin awards, regardless the warnings described here...
A generic warning to people, like this http://hypertextbook.com/facts/2000/JackHsu.shtml should be enough. No need to repeat this message over and over again. Let's get to business.

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#43 Post by papperone » 19 Jun 2017, 10:12

Agree and I think we are saying the same; I stated I'll work on and test the pluing, that's somethign I'm already started btw, and I'll release it in the playground when reliable enough.
As I don't have a Sonowff POW I will test it with a simulator using the ElectroDragon HLW8012 module which uses the same circuit as POW...
This means I won't be able to test and confirm it will run on POW without issues, in theory it should be ok but... no testing from my side on a real device ;)
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

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#44 Post by LisaM » 19 Jun 2017, 13:11

I'll order a pow from ali and are happy to test for you when it has arrived, i also have two dragon's which can be testbed's also.

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#45 Post by papperone » 19 Jun 2017, 13:21

LisaM wrote: 19 Jun 2017, 13:11 I'll order a pow from ali and are happy to test for you when it has arrived, i also have two dragon's which can be testbed's also.
Great! I has well 2 Dragon modules which I've started testing this weekend... so far so good :)
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

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#46 Post by Shardan » 19 Jun 2017, 16:55

LisaM wrote: 19 Jun 2017, 09:26 .....the 400vac you're mentioning is where it starts to get deadly, this is due to the fact that starting at 400vac your muscles contract and you no longer can free yourself.
A global "starting from 400V = deadly" ignores that these things depends on a lot of circumstances.
One example: Someone using a pickaxe accidentally hit a phone cable in the ground - old analog phone with a ring signal just in that moment.
About 70 Volts - he was dead at once, standing in a wet roadside ditch. On the other hand: I'm 20.000V approved myself and obviously still alive, 2 days hospital for monitoring was all.

Oh and btw, the liability laws at least here might be different .... Just a "lets go to business" ignoring such facts might be a bit too easy.
Regards
Shardan

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#47 Post by LisaM » 19 Jun 2017, 20:42

Shardan wrote: 19 Jun 2017, 16:55
LisaM wrote: 19 Jun 2017, 09:26 .....the 400vac you're mentioning is where it starts to get deadly, this is due to the fact that starting at 400vac your muscles contract and you no longer can free yourself.
A global "starting from 400V = deadly" ignores that these things depends on a lot of circumstances.
One example: Someone using a pickaxe accidentally hit a phone cable in the ground - old analog phone with a ring signal just in that moment.
About 70 Volts - he was dead at once, standing in a wet roadside ditch. On the other hand: I'm 20.000V approved myself and obviously still alive, 2 days hospital for monitoring was all.

Oh and btw, the liability laws at least here might be different .... Just a "lets go to business" ignoring such facts might be a bit too easy.
Ah, stories exchange! Here's another one: a mechanic didn't wear the mandatory face protection kit (basically a clear plastic cover) while working on 10KVa installation. His collegue bumped into him by accident and this guy burned ALIVE when he touched the 10KVa lines. Obviously he died...
Even the 5V DC from the breadboard can be deadly, just not very likely. Everything can kill you, do we really need to warn for that?

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#48 Post by Shardan » 19 Jun 2017, 20:48

Will you sign a paper that you will pay every liability for the forum resulting from this?

As nobody knows where a reader starts in the wiki or the forum it's better to keep warnings up.
Regards
Shardan

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#49 Post by papperone » 22 Jun 2017, 23:54

under testing... hope to relase it during the weekend ;)
Capture.JPG
Capture.JPG (39.9 KiB) Viewed 86869 times
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

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#50 Post by LisaM » 23 Jun 2017, 00:50

papperone wrote: 22 Jun 2017, 23:54 under testing... hope to relase it during the weekend ;)
Capture.JPG
You're to fast! ;) The pow is on it's way to me, but hasn't arrived yet. I'll test with the dragon also and when the pow get's here also.

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#51 Post by LisaM » 23 Jun 2017, 00:51

LisaM wrote: 23 Jun 2017, 00:50
papperone wrote: 22 Jun 2017, 23:54 under testing... hope to relase it during the weekend ;)
Capture.JPG
You're to fast! ;) The pow is on it's way to me, but hasn't arrived yet. I'll test with the dragon and when the pow arrived also.

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#52 Post by LisaM » 23 Jun 2017, 00:53

Shardan wrote: 19 Jun 2017, 20:48 Will you sign a paper that you will pay every liability for the forum resulting from this?

As nobody knows where a reader starts in the wiki or the forum it's better to keep warnings up.
Then let's start every item with a warning: everything you do can kill you and everything posted on this forum is no acception to that! :lol: :lol: :lol:

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#53 Post by papperone » 23 Jun 2017, 13:14

Prior to release first ALPHA version into the Plugin Playground I'd like to collect some feedback and inputs.

As i design the plugin it shoudl be able to work both with ITEAD POW, ElectroDragon HLW8012 module and virtually any HLW8012 module as far as pinout is compatible.
The Plugin requires to know the 3 PINS used for the connection of ESP8266 to HLW module, which for POW are fixed (GPIO5/13/14) but for ED module can be freely selected.
In the Plugin GUI you can see and edit the internal multipliers used for the conversion from the chip data to the values output, while you can manually edit them I suggest not as it's not easy to manually find right values.
(the multipliers are not fixed as they depends on the "real" values of resistors, and in the 2 ED Module I do have they are in tolerance but not exactly what expected, thus some calibration is needed).
Fortunately the HLW8012 library (which is needed for the plugin to compile) can handle the calibration so I coded the plugin to accept below commands:
1) "HLWRESET" --> it will reset multipliers to the default ones in case they are messed up
2) "HLWCALIBRATE,V,A,W" --> it will calibrate the internal multipliers assuming the current values are the ones provided; parameters are not mandatory so if you want to calibrate only V you can send "HLWCALIBRATE,231" and so on (e.g. if you don't have a way to measure properly current you can still setup the others parameters with "HLWCALIBRATE,230,,100")

Ideally you shoudl connect a know pure resistive device (e.g. a 100W incandescent bulb) and measure V (using a volt meter), A (using an amperometic clamp), and provide W (actual rating of the bulb).
Doing so the reading will autoadjust and the device should be able to deliver more accurate output values (you need to calibrate only once as the setting are saved into config.dat of ESPEasy).

So far that's what I've ready, I've some ideas but will require time to be develop so during this weekend (need some extra testing this evening hopefully) I will upload current version to the playground.
Please if you download and use it (specially if you have a real POW which I don't have!) give me info, feedback, bugreport, anything that can be useful to fix/improve the plugin and make it stable and candidate to be included as standard in next mileston release 2.1.0 of ESPEasy.

NOTE: all HWL8012 modules and devices work with HIGH VOLTAGE and they do expose it to the user; make sure you connect LIVE and NEUTRAL correctly, as doing the other way around LIVE will be tied to chip GND and increasing the risks!!!
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

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#54 Post by LisaM » 23 Jun 2017, 18:32

papperone wrote: 23 Jun 2017, 13:14 NOTE: all HWL8012 modules and devices work with HIGH VOLTAGE and they do expose it to the user; make sure you connect LIVE and NEUTRAL correctly, as doing the other way around LIVE will be tied to chip GND and increasing the risks!!!
Thank god cars don't yell at me (in german) that a car is dangerous and might kill you every time i start the car... :lol:
In german, since i have a german car. And cars kill a lot of people every day.

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#55 Post by papperone » 23 Jun 2017, 19:17

Well to be openly honest I did a mistake during the test even myself, and swapped Live and Neutral... As a results at next power up of the module small sparks and 2 resistors on the module got burnt (all ok after I replaced them!).
Nobody was killed and I can oly balme myslef that overlooked the connections... :mrgreen:
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

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#56 Post by LisaM » 23 Jun 2017, 19:39

papperone wrote: 23 Jun 2017, 19:17 Well to be openly honest I did a mistake during the test even myself, and swapped Live and Neutral... As a results at next power up of the module small sparks and 2 resistors on the module got burnt (all ok after I replaced them!).
Nobody was killed and I can oly balme myslef that overlooked the connections... :mrgreen:
Join the club, i blew up a zenerdiode on my Sonoff TH16 due to a faulty breadboard voltage regulator spitting out 16V instead of the promised 5V. An AMS1117-5 DOA, go figure that...

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#57 Post by Shardan » 24 Jun 2017, 02:19

LisaM wrote: 23 Jun 2017, 18:32
papperone wrote: 23 Jun 2017, 13:14 NOTE: all HWL8012 modules and devices work with HIGH VOLTAGE and they do expose it to the user; make sure you connect LIVE and NEUTRAL correctly, as doing the other way around LIVE will be tied to chip GND and increasing the risks!!!
Thank god cars don't yell at me (in german) that a car is dangerous and might kill you every time i start the car... :lol:
In german, since i have a german car. And cars kill a lot of people every day.
Thats why you need a driving license.
Regards
Shardan

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#58 Post by papperone » 25 Jun 2017, 07:37

_P170_HLW8012.ino into the playground.
Waiting for feedback if it works on an original Sonoff POW; instructions on previous posts...
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

kniazio
Normal user
Posts: 71
Joined: 12 Jun 2016, 11:12

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#59 Post by kniazio » 25 Jun 2017, 12:32

Compilation error

Code: Select all

C:\Users\kniazio\Desktop\ESP Releases\ESPEasy_v2.0.0-dev10\Source\ESPEasy\_P170_HLW8012.ino:17:21: fatal error: HLW8012.h: No such file or directory

 #include <HLW8012.h>

                     ^

compilation terminated.

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#60 Post by papperone » 25 Jun 2017, 12:45

you need to install HLW8012 library --> http://www.electrodragon.com/w/File:HLW ... 0_1281.zip
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

bluejedi
Normal user
Posts: 35
Joined: 26 Sep 2016, 14:27

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#61 Post by bluejedi » 25 Jun 2017, 19:50

papperone wrote: 23 Jun 2017, 13:14 NOTE: all HWL8012 modules and devices work with HIGH VOLTAGE and they do expose it to the user; make sure you connect LIVE and NEUTRAL correctly, as doing the other way around LIVE will be tied to chip GND and increasing the risks!!!
What makes things worse is that wiring colors are relevant only when hard-wired. When using a wall socket and power cord with mains plug to connect the POW it is very easy to to switch Live and Neutral because in many countries the mains plug fits in two ways (normal and 180 degrees rotated).
In Europe there is no standard for which pins of wall sockets are Live and which are Neutral (it mainly depends on the make of wall socket and how its connections are labelled).
In France there seems to be preference (maybe even a local standard) to have the Live pin on the right.
As far as I'm aware it is just the opposite in Germany. (I have German make wall sockets which have the left pin labelled as Live).
(So colors of 'flexible power cord' wires can never be trusted for which one is Live and which one is Neutral).

kniazio
Normal user
Posts: 71
Joined: 12 Jun 2016, 11:12

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#62 Post by kniazio » 25 Jun 2017, 20:33

papperone wrote: 25 Jun 2017, 12:45 you need to install HLW8012 library --> http://www.electrodragon.com/w/File:HLW ... 0_1281.zip
All right.
Thanks a lot

kniazio
Normal user
Posts: 71
Joined: 12 Jun 2016, 11:12

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#63 Post by kniazio » 26 Jun 2017, 06:01

What is sending data to Thingspeak?

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#64 Post by papperone » 26 Jun 2017, 06:08

kniazio wrote: 26 Jun 2017, 06:01 What is sending data to Thingspeak?
What? My plugin is not using any data logging. That's not in its scope....
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

kniazio
Normal user
Posts: 71
Joined: 12 Jun 2016, 11:12

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#65 Post by kniazio » 26 Jun 2017, 06:19

I mean, is it possible to send readings to Thingspeak
https://thingspeak.com or Domoticz

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#66 Post by papperone » 26 Jun 2017, 06:34

kniazio wrote: 26 Jun 2017, 06:19 I mean, is it possible to send readings to Thingspeak
https://thingspeak.com
Directly from ESPEasy it should be possible.but not sure how much ram it will eat.
I do lots of Thingspeak data logging but I use my Raspberry PI via Node Red which is much simpler and not hard coded into ESPEasy. Like this I am not linked to only one service and I can enable/disable much easily...

Anyhow I will add it to the "to do feature and will do some tests to check how much memory we need as I don't want to create more problem here as we are already in low memory situation....
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

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#67 Post by papperone » 26 Jun 2017, 06:36

By the way are you using it with a POW?
Does it work?
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

kniazio
Normal user
Posts: 71
Joined: 12 Jun 2016, 11:12

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#68 Post by kniazio » 26 Jun 2017, 06:46

papperone wrote: 26 Jun 2017, 06:36 By the way are you using it with a POW?
Does it work?
I do not use yet.
Waiting for the programmer

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#69 Post by LisaM » 02 Jul 2017, 01:28

It's compiling, programming and working and also not...

The pow:
IMG_2304.JPG
IMG_2304.JPG (1.27 MiB) Viewed 48589 times
The bottom:
IMG_2305.JPG
IMG_2305.JPG (1.7 MiB) Viewed 48589 times
Programming:
IMG_2306.JPG
IMG_2306.JPG (1.56 MiB) Viewed 48589 times
Reboot and running:
IMG_2307.JPG
IMG_2307.JPG (1.16 MiB) Viewed 48589 times
But, trying to submit this is failing:
pow-devices.JPG
pow-devices.JPG (202.19 KiB) Viewed 48589 times
Am i doing something wrong?

RE:
New user
Posts: 5
Joined: 11 Oct 2016, 15:01

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#70 Post by RE: » 02 Jul 2017, 23:10

How about setting the calibration values to 1.0 instead of 0.0 and tick the Enable box

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#71 Post by LisaM » 03 Jul 2017, 01:10

RE: wrote: 02 Jul 2017, 23:10 How about setting the calibration values to 1.0 instead of 0.0 and tick the Enable box
Done that, no effect...

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#72 Post by papperone » 03 Jul 2017, 08:38

that's weird, as the first time the plugin init itself it shoudl be saving the calibration values if they are equal to zero.
Can you try to send the command "HLWCalibrate" to calibrate manually and recalculate the multipliers?
By the way the default multipliers must be:
Power Mult: 10343611.74
Current Mult: 14484.49
Voltage Mult: 408636.51

Will check the code deeply later today but I just tried again 2 times in the 2 test modules and after erasing completely the SPIFF I've the deafult multipliers when I enable this device :(
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

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#73 Post by papperone » 03 Jul 2017, 08:43

As well the GUI is slightly different (probably in the latest GIT you are using they did some changes) as I do have the "delay" value in the bottom after the Controller (no big deal).
Can you try as well to setup the delay to some values? The pluing is supposed to read the values at a given interval (I tried up to 15 seconds and it does not delay the whole firmware noticeably)
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

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#74 Post by LisaM » 03 Jul 2017, 09:47

papperone wrote: 03 Jul 2017, 08:38 that's weird, as the first time the plugin init itself it shoudl be saving the calibration values if they are equal to zero.
Can you try to send the command "HLWCalibrate" to calibrate manually and recalculate the multipliers?
By the way the default multipliers must be:
Power Mult: 10343611.74
Current Mult: 14484.49
Voltage Mult: 408636.51

Will check the code deeply later today but I just tried again 2 times in the 2 test modules and after erasing completely the SPIFF I've the deafult multipliers when I enable this device :(
I have to admit, that it's not running in test-mode but normal mode. I've removed the #if test condition from the ino file.

Entered everything:
dev-init.JPG
dev-init.JPG (208.38 KiB) Viewed 48126 times
Leading to the browser error message: 'The connection was reset'

Going back to the page shows this pictures:
dev-reset.JPG
dev-reset.JPG (208.18 KiB) Viewed 48126 times
So i does save the multipliers, but then completely stalls...

By the way, i only connected the 230V input side and not the output side. I did check what wire was null and phase... ;)

The node info:
info.JPG
info.JPG (122.05 KiB) Viewed 48126 times
Update: The flash size seems odd, 4MB instead of the usual 1MB. I'll look into that...
Last edited by LisaM on 03 Jul 2017, 09:57, edited 1 time in total.

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#75 Post by papperone » 03 Jul 2017, 09:55

Ok I will test it with latest GIT this evening and let you know...
As POW has a relay maybe you can't have any reading as the relay is probably cutting the Live before the HLW8012 chip. Did you try it?

PS: Delay of 1 sec. can kill the ESPEasy performaces....
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

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#76 Post by LisaM » 03 Jul 2017, 09:58

papperone wrote: 03 Jul 2017, 09:55 Ok I will test it with latest GIT this evening and let you know...
As POW has a relay maybe you can't have any reading as the relay is probably cutting the Live before the HLW8012 chip. Did you try it?

PS: Delay of 1 sec. can kill the ESPEasy performaces....
Please also check out my update:

Code: Select all

Update: The flash size seems odd, 4MB instead of the usual 1MB. I'll look into that...
This might also be the cause of the problems.

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#77 Post by papperone » 03 Jul 2017, 10:50

LisaM wrote: 03 Jul 2017, 09:58
papperone wrote: 03 Jul 2017, 09:55 Ok I will test it with latest GIT this evening and let you know...
As POW has a relay maybe you can't have any reading as the relay is probably cutting the Live before the HLW8012 chip. Did you try it?

PS: Delay of 1 sec. can kill the ESPEasy performaces....
Please also check out my update:

Code: Select all

Update: The flash size seems odd, 4MB instead of the usual 1MB. I'll look into that...
This might also be the cause of the problems.
AFAIK ESPEasy needs to be compiled with 3Mb firmware / 1Mb SPIFF (for 4Mb units); about 1Mb I'm not sure which are the right build options...
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

LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#78 Post by LisaM » 03 Jul 2017, 13:44

The Sonoff TH16 and basic have 1MB flash size. According to the iTead POW schematic, the POW has an 25q80bvs1g flash chip which is 8Mb. So it should be 1MB flash size instead of 4MB, i'll rebuild with the proper build settings and then try again...

UPDATE: Same problem, used these Arduino IDE settings:
settings.JPG
settings.JPG (23.34 KiB) Viewed 48087 times
The Info section also shows still this:
Flash Size: 4096 kB
Maybe the POW is 4MB?

UPDATE2: It's using a 'HK 25032' flash chip and that might wel be 4MB instead of the 1MB from the schematic...
Retrying with 4MB flash compile and flash.

UPDATE3: Recompiled with 4MB flash and flashed again: same problem... :(

UPDATE4: Bumped syslog to 4 and have now two debug entries in the syslog when trying to submit the hlw8012:

Code: Select all

Unit: 5 : DEBUG: String size:8366
Unit: 5 : DEBUG: String size:2632
Have no idea what it means, debug is at minimum level in this modules...

@papperone: Can you add more addLog statements in the ino? Then i can follow the proces through the syslog. Something simular to what P049 is doing would be great. I can do that to, but it will be lost at the next update of the source code...

mrwee
Normal user
Posts: 225
Joined: 31 Aug 2016, 12:52

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#79 Post by mrwee » 06 Jul 2017, 12:50

I've flashed my POW with Latest 2.0 and the plugin, using 1M / 128K SPIFFS.
When I try to change *any* setting in the plugin, the ESP always reboots. E.g. changing the delay, results in:
Exception (29):
epc1=0x402130a8 epc2=0x00000000 epc3=0x00000000 excvaddr=0x0000001c depc=0x00000000

ctx: cont
sp: 3fff3960 end: 3fff3f90 offset: 01a0

>>>stack>>>
3fff3b00: 3fff3c30 00000008 3fff1ed8 4021309f
3fff3b10: 40100296 00000023 3fff6da8 ffff8000
3fff3b20: 00000000 00000000 00000000 00000000
3fff3b30: 00000000 00000000 00000000 00000000
3fff3b40: 00000000 00000000 00000000 00000000
3fff3b50: 3fff67e4 0000001f 00000012 3fff67cc
3fff3b60: 0000000f 00000004 3fff3bd4 4023df6e
3fff3b70: 3ffea97c 3fff3d04 00000000 4010053d
3fff3b80: 3ffe88d8 3fff3c10 3ffea97c 00000001
3fff3b90: 3fff0b3c 00000008 3fff3c30 4020ebf5
3fff3ba0: 00000010 3fff3d9c 00000000 4010053d
3fff3bb0: 3ffea97c 00000000 3fff3d04 4023deeb
3fff3bc0: 3fff6e54 00000002 3fff6ddc 0000000f
3fff3bd0: 00000000 3fff6df4 0000000f 00000000
3fff3be0: 3ffea97c 00000000 3fff3d9c 00000001
3fff3bf0: 00000024 00000032 00000000 40201020
3fff3c00: 3fff6e55 00000004 3fff3d9c 4023df6e
3fff3c10: 3ffea97c 00000004 3fff1ed8 00000001
3fff3c20: 00000004 3fff0b3c 00000000 40220e37
3fff3c30: 3ffe0055 400056cf 3ffee7e0 00000030
3fff3c40: 40103105 3ffee7e0 3fff3c70 4010068c
3fff3c50: 00007fff 01c24c18 3fff6a84 0000000f
3fff3c60: 00000000 3fff69f4 0000000f 00000000
3fff3c70: 00000000 3fff6e0c 0000000f 00000001
3fff3c80: 3fff6e24 0000000f 00000001 3fff6e3c
3fff3c90: 0000000f 00000001 3fff6e54 0000000f
3fff3ca0: 00000001 3fff6c8c 0000000f 0000000b
3fff3cb0: 3fff6dc4 0000000f 0000000b 3fff677c
3fff3cc0: 0000001f 00000010 3fff67a4 0000001f
3fff3cd0: 00000010 3fff65f4 0000000f 00000000
3fff3ce0: 3fff6c44 0000000f 00000000 3fff6c5c
3fff3cf0: 0000000f 00000000 3fff6c74 0000000f
3fff3d00: 00000000 65776f50 61462072 726f7463
3fff3d10: 29252820 3fffda00 3fff2f68 00000030
3fff3d20: 40000f83 00000030 00000010 ffffffff
3fff3d30: 3fff6e6c 0000000f 00000002 3fff6e84
3fff3d40: 0000000f 00000000 3fff6e9c 0000000f
3fff3d50: 00000000 3fff6cec 0000000f 00000001
3fff3d60: 3fff715c 0000000f 00000000 3fff65dc
3fff3d70: 0000000f 00000000 00000000 00000000
3fff3d80: 00000000 00000000 00000000 00000000
3fff3d90: 00000000 00000000 00000000 3fff6eb4
3fff3da0: 0000000f 00000000 3fff6efc 0000000f
3fff3db0: 00000001 3fff6ee4 0000000f 00000000
3fff3dc0: 3fff6ecc 0000000f 00000000 3fff6c2c
3fff3dd0: 0000000f 00000000 3fff6c14 0000000f
3fff3de0: 00000000 3fff6bfc 0000000f 00000000
3fff3df0: 3fff6be4 0000000f 00000000 3fff6bcc
3fff3e00: 0000000f 00000002 3fff6624 0000000f
3fff3e10: 00000002 3fff660c 0000000f 00000002
3fff3e20: 3fff7144 0000000f 00000002 3fff7594
3fff3e30: 0000000f 00000003 3fff6cbc 0000000f
3fff3e40: 00000001 00000476 00000476 3fff2e84
3fff3e50: 00000001 3fff17ec 00000001 3fff17ec
3fff3e60: 00000010 3fff3ec0 00000003 000002bc
3fff3e70: 3fff70bc 00000008 3fff3ec0 4023623c
3fff3e80: 00000002 00000001 3fff4a24 40221d59
3fff3e90: 00000002 00000001 3fff3ec0 4023fe6a
3fff3ea0: 00000000 00000000 3fff4a24 40236232
3fff3eb0: 3fff4a24 3fff1f18 3fff4a24 4023626e
3fff3ec0: 00000000 00000000 00000000 4023e04c
3fff3ed0: 3fff4a24 3fff1f18 3fff1ed8 40236301
3fff3ee0: 3fff70bc 0000000f 00000008 3fff2f70
3fff3ef0: 00000000 00000132 00000132 00000001
3fff3f00: 00000002 00000132 00000019 402403c4
3fff3f10: 00000000 00000000 3fff27b4 3fff2f68
3fff3f20: 00000001 3fff1efc 3fff1ed8 4023653b
3fff3f30: 3fffdad0 3fff2f68 4023edbc 3fff2f70
3fff3f40: 00000000 3fff70d4 00000000 4023d17e
3fff3f50: 3fffdad0 00000000 3fff0b38 40223173
3fff3f60: 00000000 00000000 3fff0b38 40228444
3fff3f70: 3fffdad0 00000000 3fff2f62 4023ee08
3fff3f80: feefeffe feefeffe 3fff2f70 40100718
<<<stack<<<

ets Jan 8 2013,rst cause:1, boot mode:(3,7)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v09826c6d
~ld
⸮U


INIT : Booting version: (custom)
FS : Mount successful
INIT : Free RAM:26016
INIT : SPI not enabled
bcn 0
del if1
usl
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100
bcn 0
del if1
usl
mode : sta(5c:cf:7f:20:db:c2)
add if0
WIFI : Connecting... 1
f r-1, scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 1
cnt

Also I can't figure out the two "HLWRESET" & "HLWCALIBRATE,V,A,W" commands. Both results in 'Unknown command' when trying from serial or "Tools\Command".

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Support for "Sonoff Pow" (from ITead) with Power Consumption Measurement via HLW8012 (HLW 8012) IC?

#80 Post by papperone » 06 Jul 2017, 14:00

I think the problem could be related to the fact that to save the parameters as they are "DOUBLE" I am forced to save them to SPIFF memory but I was able to test it only with 4Mb module.
I am not sure I can simulate a 1Mb module just compiling it with different paramentes, I will check.

@LisaM: this evening I will add few DEBUG points on the plugin in order to track down what is causing the issue...
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

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 121 guests