SonOff POW R2 support
Moderators: grovkillen, Stuntteam, TD-er
SonOff POW R2 support
Hi all,
As the Sonoff POW R2 is now getting more available i ordered two of them and now i am wondering are the internal sensors already supported by ESP easy and would it be possible to get simular numbers out of the unit as with their original app.
Thanks
Jerome
As the Sonoff POW R2 is now getting more available i ordered two of them and now i am wondering are the internal sensors already supported by ESP easy and would it be possible to get simular numbers out of the unit as with their original app.
Thanks
Jerome
Re: SonOff POW R2 support
I've received mine last week and noticed there is quite a number of differences compared to the original POW (R1).
Please have a look at the file define_plugin_sets.h to see a summary of the differences.
https://github.com/letscontrolit/ESPEas ... .h#L75-L95
The new chip is not yet included in ESPeasy.
Please have a look at the file define_plugin_sets.h to see a summary of the differences.
https://github.com/letscontrolit/ESPEas ... .h#L75-L95
The new chip is not yet included in ESPeasy.
Re: SonOff POW R2 support
I will try to get the new schematic and as well some knowledge of the new hardware to try to implement it in ESPEasy...
@TD-er: as you defined now in current cource code my HLKW8012 plugin can be used only with Sonoff-POW, while there are few dev board with this chip (e.g. ElectroDragon) and as well I've 2 custom PCB with this circuit that uses different pins; like this I'll now be forced to always makes custom compiled for my own version of POW and I can't use the standard .BIN (which I tend to avoid in final devices due to complexity of managing upgrades via OTA)...
@TD-er: as you defined now in current cource code my HLKW8012 plugin can be used only with Sonoff-POW, while there are few dev board with this chip (e.g. ElectroDragon) and as well I've 2 custom PCB with this circuit that uses different pins; like this I'll now be forced to always makes custom compiled for my own version of POW and I can't use the standard .BIN (which I tend to avoid in final devices due to complexity of managing upgrades via OTA)...
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: SonOff POW R2 support
Hello i use sonoff pow ver2.0 in this version amper sensor is CSE7759, but in firmware ESP_Easy_mega-20180524_dev_ESP8266_4096 inly 7766 and 7759 not worked, but sonoff pow ver2.0(CSE7759) work with firmware ESP_Easy_mega-20180524_hard_SONOFF_POW
I understand so much the difference between HWL and CSE is not present
p.s. accuracy is very low even after calibration
sorry for my bad english
I understand so much the difference between HWL and CSE is not present
p.s. accuracy is very low even after calibration
sorry for my bad english
Re: SonOff POW R2 support
I just moved the plugin from playground to Mega and made sure it compiled.papperone wrote: ↑25 Apr 2018, 22:49 I will try to get the new schematic and as well some knowledge of the new hardware to try to implement it in ESPEasy...
@TD-er: as you defined now in current cource code my HLKW8012 plugin can be used only with Sonoff-POW, while there are few dev board with this chip (e.g. ElectroDragon) and as well I've 2 custom PCB with this circuit that uses different pins; like this I'll now be forced to always makes custom compiled for my own version of POW and I can't use the standard .BIN (which I tend to avoid in final devices due to complexity of managing upgrades via OTA)...
I even flashed it to my own POW r2, but did not test it yet.
A configuration option is missing indeed.
@taku:
If there are different versions of both the POW (first version) and also of the POW r2, then I would like to know what versions there are.
My hope is to create builds for specific hardware which require little to none configuration and work just out of the box.
So if there are different version r2 and different versions r1, then it we can deal with that.
Re: SonOff POW R2 support
Great helpfull topic.
I received several Sonoff devices yeterday.
- Updated successfully 2 Sonoff Basic with ESPEasy_R120_1024
- Updated successfully 2 Sonoff S20 with ESP_Easy_mega-20180524_normal_ESP8266_1024.bin to allow the SSID to show up
- SonOff POW R2, not updated yet following this thread for further instructions.
Keep up the good work.
I received several Sonoff devices yeterday.
- Updated successfully 2 Sonoff Basic with ESPEasy_R120_1024
- Updated successfully 2 Sonoff S20 with ESP_Easy_mega-20180524_normal_ESP8266_1024.bin to allow the SSID to show up
![Erg Blij :D](./images/smilies/icon_e_biggrin.gif)
- SonOff POW R2, not updated yet following this thread for further instructions.
![Neutraal :|](./images/smilies/icon_neutral.gif)
![Vraag :?:](./images/smilies/icon_question.gif)
Keep up the good work.
Re: SonOff POW R2 support
I received my POW yesterday . I believe it must be version 1 since I don't see any mention on box that it is version 2 .
I just soldered in 4 pin header and flashed it using ESP_Easy_mega-20180606_hard_SONOFF_POW.bin and it all went well.
It is now wired up to 110v and I put an outlet on output to test it.
I have it set up as seen in attached screenshot. The voltage shows up but I have not figured out yet how to turn the relay on so I can have a load on it to see if current is working.
Thanks for any advice.
I just soldered in 4 pin header and flashed it using ESP_Easy_mega-20180606_hard_SONOFF_POW.bin and it all went well.
It is now wired up to 110v and I put an outlet on output to test it.
I have it set up as seen in attached screenshot. The voltage shows up but I have not figured out yet how to turn the relay on so I can have a load on it to see if current is working.
Thanks for any advice.
Re: SonOff POW R2 support
GPIO0 is the push-button, if I remember correctly the relay is connected to GPIO12...
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: SonOff POW R2 support
Thanks I am reading up on it now
https://rutg3r.com/sonoff-firmware-tuto ... -esp-easy/
and also these videos
https://www.youtube.com/watch?v=8CuD6YBdACs&t=6s
https://rutg3r.com/sonoff-firmware-tuto ... -esp-easy/
and also these videos
https://www.youtube.com/watch?v=8CuD6YBdACs&t=6s
Re: SonOff POW R2 support
This wiki page helped me a lot:
https://www.letscontrolit.com/wiki/inde ... noff_basic
https://www.letscontrolit.com/wiki/inde ... noff_basic
Re: SonOff POW R2 support
Yesterday installed the mega-20180606 (DEV) version on two POW R2's and all works great. See power, Watt, Amp & Count so totally no issues.larduino wrote: ↑06 Jun 2018, 18:15 I received my POW yesterday . I believe it must be version 1 since I don't see any mention on box that it is version 2 .
I just soldered in 4 pin header and flashed it using ESP_Easy_mega-20180606_hard_SONOFF_POW.bin and it all went well.
It is now wired up to 110v and I put an outlet on output to test it.
I have it set up as seen in attached screenshot. The voltage shows up but I have not figured out yet how to turn the relay on so I can have a load on it to see if current is working.
Thanks for any advice.
pow.jpg
Although some questions:
1: Anybody experiance to send the value(s) to Domoticz and be able to see them? I created as usual a Dummy but since all is going over a single IDX a device is required in Domoticz that would be able to handle the 4 values.
2: I send the Pulses also to Grafana and figured out that 12530 pulses would mean 1KW (Right?) I would need an example for the Grafana part to see usage per day / year / total. I tried already a few settings but not sure if i do it right.
Thanks.
Re: SonOff POW R2 support
At this moment, if you want to split values from one plugin over multiple IDX, you have to use rules to do so.
For example, I use this on my node with SDS011 to upload to Domoticz:
For example, I use this on my node with SDS011 to upload to Domoticz:
Code: Select all
On System#Boot do //This will happen at boot ESP8266
timerSet,1,30 //Set and start timer 1 at 30 seconds
endon
On Rules#Timer=1 do //When the timer 1 is up:
SendToHTTP 192.168.1.28,8080,/json.htm?type=command¶m=udevice&idx=105&nvalue=0&svalue=[SDS011#PM25] //Send the PM2,5 data to Domoticz
SendToHTTP 192.168.1.28,8080,/json.htm?type=command¶m=udevice&idx=108&nvalue=0&svalue=[SDS011#PM10] ////Send the PM10 data to Domoticz
timerSet,1,120 //Set the next cycle at 120 seconds
endon
-
- New user
- Posts: 3
- Joined: 15 Jun 2018, 00:24
Re: SonOff POW R2 support
Hello. Sorry, but where do I get this file: ESP_Easy_mega-20180524_hard_SONOFF_POW.bin
Re: SonOff POW R2 support
It is included in the latest Mega developmentprojectsun wrote: ↑15 Jun 2018, 00:26 Hello. Sorry, but where do I get this file: ESP_Easy_mega-20180524_hard_SONOFF_POW.bin
https://github.com/letscontrolit/ESPEasy/releases
Re: SonOff POW R2 support
Or use the latest version of the normal mega but the DEV version if you have the R2.projectsun wrote: ↑15 Jun 2018, 00:26 Hello. Sorry, but where do I get this file: ESP_Easy_mega-20180524_hard_SONOFF_POW.bin
At least then you also have all the other options for additional sensors (although it requires then soldering as the internal serial port is used for the POW sensor and cant be switched to GPIO)
Re: SonOff POW R2 support
Stupid of me as i had something simular but more simple for calculating DeltaT already on the ESP:TD-er wrote: ↑14 Jun 2018, 19:03 At this moment, if you want to split values from one plugin over multiple IDX, you have to use rules to do so.
For example, I use this on my node with SDS011 to upload to Domoticz:Code: Select all
On System#Boot do //This will happen at boot ESP8266 timerSet,1,30 //Set and start timer 1 at 30 seconds endon On Rules#Timer=1 do //When the timer 1 is up: SendToHTTP 192.168.1.28,8080,/json.htm?type=command¶m=udevice&idx=105&nvalue=0&svalue=[SDS011#PM25] //Send the PM2,5 data to Domoticz SendToHTTP 192.168.1.28,8080,/json.htm?type=command¶m=udevice&idx=108&nvalue=0&svalue=[SDS011#PM10] ////Send the PM10 data to Domoticz timerSet,1,120 //Set the next cycle at 120 seconds endon
Code: Select all
On Living_Radiator_In#Temp_3 do
TaskValueSet 7,1,[Living_Radiator_In#Temp_3]-[Living_Radiator_Out#Temp_4]
endon
And no timer is required in that case as it will update the value when the originating device has also a new value.
Will post the result later today.
Re: SonOff POW R2 support
Prutsium wrote: ↑15 Jun 2018, 10:32Ok noticed making dummies is more work so the result:Where the On POW_2_Sensors#POW_2_Voltage triggers the sending of the data instead of a timer.Code: Select all
On POW_2_Sensors#POW_2_Voltage do SendToHTTP 192.168.99.5,8080,/json.htm?type=command¶m=udevice&idx=93&nvalue=0&svalue=[POW_2_Sensors#POW_2_Voltage] //Send the Voltage data to Domoticz SendToHTTP 192.168.99.5,8080,/json.htm?type=command¶m=udevice&idx=94&nvalue=0&svalue=[POW_2_Sensors#POW_2_Power] //Send the Watt data to Domoticz SendToHTTP 192.168.99.5,8080,/json.htm?type=command¶m=udevice&idx=95&nvalue=0&svalue=[POW_2_Sensors#POW_2_Current] //Send the Amp data to Domoticz SendToHTTP 192.168.99.5,8080,/json.htm?type=command¶m=udevice&idx=96&nvalue=0&svalue=[POW_2_Sensors#POW_2_Pulses] //Send the Usage data to Domoticz endon
All values come now in at Domoticz but have some issues with the Pulse sensor as it does not send an actual pulse but an incremental counter that resets itself after number xxx seems Domotics has some issues with it. Trying now in ESPEasy to divide the value by /1253 so Domoticz get the count as more handlable value. Not sure if it's the right thing to do will hook up the Aircon of 1KW for an hour to see if numbers are right.
Edit:
That did not work correctlyAs its a looping counter it goes to 65355 and back to zero afterwards ....
Resulting in first stage nice increment but after it jumped back to 0 and so on ....
-
- New user
- Posts: 3
- Joined: 15 Jun 2018, 00:24
Re: SonOff POW R2 support
But when I flash this hard_POW bin to my POW ver 2.0 (not R2), after flash complete nothing happens... no webif, no ping, no ESPEasy_0. After flashing a normal or dev bin, ping is there again.Prutsium wrote: ↑15 Jun 2018, 10:26Or use the latest version of the normal mega but the DEV version if you have the R2.projectsun wrote: ↑15 Jun 2018, 00:26 Hello. Sorry, but where do I get this file: ESP_Easy_mega-20180524_hard_SONOFF_POW.bin
At least then you also have all the other options for additional sensors (although it requires then soldering as the internal serial port is used for the POW sensor and cant be switched to GPIO)
What did I do wrong?
(Tested with 20180524_hard_SONOFF_POW, 20180606_hard_SONOFF_POW, 20180615_hard_SONOFF_POW) all the same. CSE7759 is present.
Re: SonOff POW R2 support
Hi,
I have the sonoff Pow and did a flasch with ESP_Easy_mega-20180524_hard_SONOFF_POW.bin. I can see the values on the device direct, but only the voltage in Domoticz, I do not understand the way to see all the values, here mentioned by Prutsium, please will You tell me more about that. I am not a programmer 70 years old but I want to learn always something.
I have the sonoff Pow and did a flasch with ESP_Easy_mega-20180524_hard_SONOFF_POW.bin. I can see the values on the device direct, but only the voltage in Domoticz, I do not understand the way to see all the values, here mentioned by Prutsium, please will You tell me more about that. I am not a programmer 70 years old but I want to learn always something.
Re: SonOff POW R2 support
Domoticz is a bit strange in processing data.
You have to deliver the data in the right format and order to match the pre-defined types.
If you want to graph them in separate charts, you have to split the values using rules.
You have to deliver the data in the right format and order to match the pre-defined types.
If you want to graph them in separate charts, you have to split the values using rules.
Re: SonOff POW R2 support
Like this rule:
Code: Select all
On POW_2_Sensors#POW_2_Voltage do
SendToHTTP 192.168.99.5,8080,/json.htm?type=command¶m=udevice&idx=93&nvalue=0&svalue=[POW_2_Sensors#POW_2_Voltage] //Send the Voltage data to Domoticz
SendToHTTP 192.168.99.5,8080,/json.htm?type=command¶m=udevice&idx=94&nvalue=0&svalue=[POW_2_Sensors#POW_2_Power] //Send the Watt data to Domoticz
SendToHTTP 192.168.99.5,8080,/json.htm?type=command¶m=udevice&idx=95&nvalue=0&svalue=[POW_2_Sensors#POW_2_Current] //Send the Amp data to Domoticz
SendToHTTP 192.168.99.5,8080,/json.htm?type=command¶m=udevice&idx=96&nvalue=0&svalue=[POW_2_Sensors#POW_2_Pulses] //Send the Usage data to Domoticz
endon
Only 1 problem stays: Domoticz cant working with an rotating counter (it sends pulses 0-65535 and returns to 0)
Still working on that one to figure out somehow ...... would be great if ESPEasy could handle that by dividing the pulses by 12530 (means 1KW) and stores this on the ESP so we can read out an actual value.
Re: SonOff POW R2 support
Support for the POW devices is still very beta (if not alpha), so all suggestions to improve are more than welcome.
Re: SonOff POW R2 support
See my post above here.pa3gmi wrote: ↑18 Jun 2018, 14:42 Hi,
I have the sonoff Pow and did a flasch with ESP_Easy_mega-20180524_hard_SONOFF_POW.bin. I can see the values on the device direct, but only the voltage in Domoticz, I do not understand the way to see all the values, here mentioned by Prutsium, please will You tell me more about that. I am not a programmer 70 years old but I want to learn always something.
Just make sure rules are active on the ESP and create the rule mentioned in the code above.
Change the IP and IDX to the right ones for your Domoticz.
In Domoticz create 4 Dummy sensors. The first 3 will work flawless the 4th (usage) i am still trying to figure out to get that one right.
Re: SonOff POW R2 support
Then my suggestion: Store the real usage on the ESP memory somehow (i know writing in the flash sucks .....)
Not sure what other type of data Domoticz is accepting but other way could be not store every pulse but only the divided ones (12530)
Re: SonOff POW R2 support
I have these modules myself too, so I will install them in the next coming days I hope.
Then I can really see what's going on and I will think of some way to make them work fine.
The Sonoff POW build was meant to be the first build that's actually "plug-and-play", so there is a lot of the new build options used in that one and I plan to make some flexible complex default settings to try on that build.
The whole idea is to make builds for those Sonoff units that have a proper default setup.
But we're not there yet.
Then I can really see what's going on and I will think of some way to make them work fine.
The Sonoff POW build was meant to be the first build that's actually "plug-and-play", so there is a lot of the new build options used in that one and I plan to make some flexible complex default settings to try on that build.
The whole idea is to make builds for those Sonoff units that have a proper default setup.
But we're not there yet.
-
- New user
- Posts: 3
- Joined: 15 Jun 2018, 00:24
Re: SonOff POW R2 support
Can somebody help me with this question?But when I flash this hard_POW bin to my POW ver 2.0 (not R2), after flash complete nothing happens... no webif, no ping, no ESPEasy_0. After flashing a normal or dev bin, ping is there again.
What did I do wrong?
(Tested with 20180524_hard_SONOFF_POW, 20180606_hard_SONOFF_POW, 20180615_hard_SONOFF_POW) all the same. CSE7759 is present.
Re: SonOff POW R2 support
Sounds like your model is one with an ESP8266 and maybe the one you tried to flash is an ESP8285?
Re: SonOff POW R2 support
Thanks for answer, I have done as you say, but until now I can get only the Voltage readout. Is this script also sensitive for the name of the unit or somewhat else?
I have fill in my Domoticz IP and port address and made 3 virtual sensors note the IDX and fill in on the right place, what else can or must I do. Has the Device self an IDX?
Thanks for your patience
I have fill in my Domoticz IP and port address and made 3 virtual sensors note the IDX and fill in on the right place, what else can or must I do. Has the Device self an IDX?
Thanks for your patience
Re: SonOff POW R2 support
I assume you have connected it to 220V and there is some load connected to it?pa3gmi wrote: ↑19 Jun 2018, 18:56 Thanks for answer, I have done as you say, but until now I can get only the Voltage readout. Is this script also sensitive for the name of the unit or somewhat else?
I have fill in my Domoticz IP and port address and made 3 virtual sensors note the IDX and fill in on the right place, what else can or must I do. Has the Device self an IDX?
Thanks for your patience
(And the relay is switched on .....)
What version of ESPEasy are you using the POW one or the DEV that i mentioned before?
Did you also change the names from my example to yours? Please share a screenshot of the device tab like this:
![Image](https://preview.ibb.co/bHNUzd/11111_Capture.jpg)
In my case the RED and Blue are corresponding to the names in the script under rules.
Re: SonOff POW R2 support
Hi,
I have found some things that where wrong (the blue circle helps)and make them ok, now I see in Domoticz that there is contact to the ESP device my sensors are updated. But still only the voltage is coming in here.
This is the software version I have: The POW print is ver 2
Build 20102 - Mega
Libraries ESP82xx Core 2_4_1, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.0.3
GIT version mega-20180615
Plugins 6 [Normal]
Build Md5 82bc2e38ccca02be1ce841c18b0b5
Md5 check passed.
Build time Jun 15 2018 02:17:36
Binary filename ESP_Easy_mega-20180615_hard_SONOFF_POW.bin
I see difference in the Device name, mine is : Energy (AC) - HLW8012 [TESTING]
Don’t know how to put a screenshot on this site.
In the mean time I have load the build from 19-Jun, but no difference.
This is the log output:
688892: EVENT: POW_2_Sensors#POW_2_Current =0.00
688911: EVENT: POW_2_Sensors#POW_2_Active Power=0.00
688931: EVENT: POW_2_Sensors#POW_2_Power Factor=0.00
694139: HLW8012: Read values - V=223 - A=0.00 - W=0 - Pf%=0
694143: EVENT: POW_2_Sensors#POW_2_Voltage=223.00
694152: ACT : SendToHTTP 192.168.178.49,8080,/json.htm?type=command¶m=udevice&idx=95&nvalue=0&svalue=223.00
694160: Command: sendtohttp
694205: ACT : SendToHTTP 192.168.178.49,8080,/json.htm?type=command¶m=udevice&idx=96&nvalue=0&svalue=
694213: Command: sendtohttp
694249: ACT : SendToHTTP 192.168.178.49,8080,/json.htm?type=command¶m=udevice&idx=97&nvalue=0&svalue=
694256: Command: sendtohttp
694318: EVENT: POW_2_Sensors#POW_2_Current =0.00
694338: EVENT: POW_2_Sensors#POW_2_Active Power=0.00
694359: EVENT: POW_2_Sensors#POW_2_Power Factor=0.00
698842: WD : Uptime 12 ConnectFailures 0 FreeMem 21696 Thanks, Rien
I have found some things that where wrong (the blue circle helps)and make them ok, now I see in Domoticz that there is contact to the ESP device my sensors are updated. But still only the voltage is coming in here.
This is the software version I have: The POW print is ver 2
Build 20102 - Mega
Libraries ESP82xx Core 2_4_1, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.0.3
GIT version mega-20180615
Plugins 6 [Normal]
Build Md5 82bc2e38ccca02be1ce841c18b0b5
Md5 check passed.
Build time Jun 15 2018 02:17:36
Binary filename ESP_Easy_mega-20180615_hard_SONOFF_POW.bin
I see difference in the Device name, mine is : Energy (AC) - HLW8012 [TESTING]
Don’t know how to put a screenshot on this site.
In the mean time I have load the build from 19-Jun, but no difference.
This is the log output:
688892: EVENT: POW_2_Sensors#POW_2_Current =0.00
688911: EVENT: POW_2_Sensors#POW_2_Active Power=0.00
688931: EVENT: POW_2_Sensors#POW_2_Power Factor=0.00
694139: HLW8012: Read values - V=223 - A=0.00 - W=0 - Pf%=0
694143: EVENT: POW_2_Sensors#POW_2_Voltage=223.00
694152: ACT : SendToHTTP 192.168.178.49,8080,/json.htm?type=command¶m=udevice&idx=95&nvalue=0&svalue=223.00
694160: Command: sendtohttp
694205: ACT : SendToHTTP 192.168.178.49,8080,/json.htm?type=command¶m=udevice&idx=96&nvalue=0&svalue=
694213: Command: sendtohttp
694249: ACT : SendToHTTP 192.168.178.49,8080,/json.htm?type=command¶m=udevice&idx=97&nvalue=0&svalue=
694256: Command: sendtohttp
694318: EVENT: POW_2_Sensors#POW_2_Current =0.00
694338: EVENT: POW_2_Sensors#POW_2_Active Power=0.00
694359: EVENT: POW_2_Sensors#POW_2_Power Factor=0.00
698842: WD : Uptime 12 ConnectFailures 0 FreeMem 21696 Thanks, Rien
Last edited by pa3gmi on 20 Jun 2018, 10:49, edited 3 times in total.
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: SonOff POW R2 support
For screenshots, just add them using the attachments tab below the editing box. (To the right of the options tab)
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
![Idee :idea:](./images/smilies/icon_idea.gif)
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
![Idee :idea:](./images/smilies/icon_idea.gif)
![Idee :idea:](./images/smilies/icon_idea.gif)
![Idee :idea:](./images/smilies/icon_idea.gif)
Re: SonOff POW R2 support
Rien,
Try the DEV version so not the POW i run the DEV version with the CSE and all works ok for me.
Re: SonOff POW R2 support
Re: SonOff POW R2 support
What do you mean with "the CSE"
Thanks anyway for the fast response.
Thanks anyway for the fast response.
Re: SonOff POW R2 support
Hi is it possible that i have not the right POW version on the print is Ver 2.0 the measuring chip is HLW8012
With your configuration I have now no readings at all, so the measuring circuit seems not working.
Rien
With your configuration I have now no readings at all, so the measuring circuit seems not working.
Rien
Re: SonOff POW R2 support
Looks like you have the POW V2,0 where i have the new POW R2: https://www.itead.cc/sonoff-pow-r2.html
As this topic was about the R2 i assumed you had the R2 and not the V2.0
Re: SonOff POW R2 support
Hi,
I have put theESP_Easy_mega-20180615_hard_SONOFF_POW.bin in the device and now it works, no idea what was the problem.
Thanks for all the help, I keep an eye on this site the teller is of course most interesting.
I see that the voltage measuring is about 10 volt to low, is there a way to correct this?
Rien.
I have put theESP_Easy_mega-20180615_hard_SONOFF_POW.bin in the device and now it works, no idea what was the problem.
Thanks for all the help, I keep an eye on this site the teller is of course most interesting.
I see that the voltage measuring is about 10 volt to low, is there a way to correct this?
Rien.
Re: SonOff POW R2 support
Btw ... this is how Domoticz handles right now the incoming data from the POW (R2)
![Image](https://preview.ibb.co/mRaXN8/POWUsage.jpg)
Keep in mind i did not set any divider yet but its clear to see its not adding but just restarting the counter.
Would say this rather might be something to fix in Domoticz wil post same graph in Domoticz forum as maybe someone has a bright idea there.
( http://www.domoticz.com/forum/viewtopic ... 14&t=23878 )
![Image](https://preview.ibb.co/mRaXN8/POWUsage.jpg)
Keep in mind i did not set any divider yet but its clear to see its not adding but just restarting the counter.
Would say this rather might be something to fix in Domoticz wil post same graph in Domoticz forum as maybe someone has a bright idea there.
( http://www.domoticz.com/forum/viewtopic ... 14&t=23878 )
Re: SonOff POW R2 support
Update:
I Went to Tasmota for now as this does exactly what is required. It counts the usage internal and sends 2 values: Current Watt, Total Watt.
Might be an idea to look how its handled in Tasmota and implement similar in ESPEasy
The actual MQT message: 11:08:17 MQT: domoticz/in = {"idx":103,"nvalue":0,"svalue":"48;25.1","Battery":58,"RSSI":6}
I Went to Tasmota for now as this does exactly what is required. It counts the usage internal and sends 2 values: Current Watt, Total Watt.
Might be an idea to look how its handled in Tasmota and implement similar in ESPEasy
The actual MQT message: 11:08:17 MQT: domoticz/in = {"idx":103,"nvalue":0,"svalue":"48;25.1","Battery":58,"RSSI":6}
Re: SonOff POW R2 support
The following rules will allow the POW2 to report the data to domoticz. you create a Voltage, Amp, Watt, and Electric Counter (calculated) in domoticz as virtual devices. In addition you can add a virtual switch to toggle the relais_switch.
https://www.domoticz.com/forum/viewtopi ... 78#p187554
![Image](https://www.domoticz.com/forum/download/file.php?id=17060)
Devices 1: Energy (AC) - CSE7766 [TESTING] Energy
Devices 2: Switch input - Switch SW_1 GPIO-0
Devices 3: Switch input - Switch relais (idx 599) GPIO-12
Devices 4: Generic - System Info POW2_RSSI (idx 601)
Devices 5: Generic - Dummy Device Calculation
https://www.domoticz.com/forum/viewtopi ... 78#p187554
Devices 1: Energy (AC) - CSE7766 [TESTING] Energy
Devices 2: Switch input - Switch SW_1 GPIO-0
Devices 3: Switch input - Switch relais (idx 599) GPIO-12
Devices 4: Generic - System Info POW2_RSSI (idx 601)
Devices 5: Generic - Dummy Device Calculation
Code: Select all
On System#Boot do
TaskValueSet 5,1,0
TaskValueSet 5,2,0
TaskValueSet 5,3,0
EndOn
// LAMP CONTROLLING INCLUDING LED LIGHT
on lamp_on do
gpio,12,1
gpio,13,0
endon
on lamp_off do
gpio,12,0
gpio,13,1
endon
on SW_1#Switch do
if [SW_1#Switch]=1
gpio,12,1
gpio,13,0
else
gpio,12,0
gpio,13,1
endif
endon
on Energy#Voltage do
if Clock#Time=All,**:*0 do
SendToHTTP 192.168.1.10,8080,/json.htm?type=command¶m=udevice&idx=600&nvalue=0&svalue=[Energy#Voltage]
SendToHTTP 192.168.1.10,8080,/json.htm?type=command¶m=udevice&idx=608&nvalue=0&svalue=[Energy#Power]
SendToHTTP 192.168.1.10,8080,/json.htm?type=command¶m=udevice&idx=603&nvalue=0&svalue=[Energy#Power]
SendToHTTP 192.168.1.10,8080,/json.htm?type=command¶m=udevice&idx=604&nvalue=0&svalue=[Energy#Current]
endif
if [Energy#Voltage]!=[Calculation#Voltage]
SendToHTTP 192.168.1.10,8080,/json.htm?type=command¶m=udevice&idx=600&nvalue=0&svalue=[Energy#Voltage] // Voltage
TaskValueSet 5,1,[Energy#Voltage]
endif
if [Energy#Power]!=[Calculation#Power]
SendToHTTP 192.168.1.10,8080,/json.htm?type=command¶m=udevice&idx=603&nvalue=0&svalue=[Energy#Power] // Calculated KwH.
SendToHTTP 192.168.1.10,8080,/json.htm?type=command¶m=udevice&idx=608&nvalue=0&svalue=[Energy#Power] // Watt only
TaskValueSet 5,2,[Energy#Power]
endif
if [Energy#Current]!=[Calculation#Current]
SendToHTTP 192.168.1.10,8080,/json.htm?type=command¶m=udevice&idx=604&nvalue=0&svalue=[Energy#Current] // Amp
TaskValueSet 5,3,[Energy#Current]
endif
TaskValueSet 5,4,[Energy#Pulses]
endon
Last edited by sincze on 18 Aug 2018, 13:34, edited 1 time in total.
Re: SonOff POW R2 support
This should be at the wiki I guess.
Re: SonOff POW R2 support
If it is good enough for the Wiki I can add it ![Lachend :lol:](./images/smilies/icon_lol.gif)
![Lachend :lol:](./images/smilies/icon_lol.gif)
Re: SonOff POW R2 support
Well it is clear enough for me, so if I install my own, I know where to look for instructions, but since I am not that well organized I am sure it will take forever to find again
![Lach :)](./images/smilies/icon_e_smile.gif)
So please do add it to the wiki.
Re: SonOff POW R2 support
Hi,
@sincze which version of mega do you use?
I have try mega_20180826 and mega_20180719, both correctly show values from CSE7759, but http push from rules doesn't work...
This rules work fine:
On WIFI#RSSI do
SendToHTTP x.x.x.x,8080,/json.htm?type=command¶m=udevice&idx=88&nvalue=0&svalue=[POW#Voltage]
endon
Confirmed by logs:
Aug 26 21:32:56 POW EspEasy: SYS : -77.00
Aug 26 21:32:56 POW EspEasy: EVENT: WIFI#RSSI=-77.00
Aug 26 21:32:56 POW EspEasy: ACT : SendToHTTP x.x.x.x,8080,/json.htm?type=command¶m=udevice&idx=88&nvalue=0&svalue=235.07
Aug 26 21:32:56 POW EspEasy: Command: sendtohttp
But this one is never triggered:
On POW#Current do
SendToHTTP x.x.x.x,8080,/json.htm?type=command¶m=udevice&idx=89&nvalue=0&svalue=[POW#Power];[POW#Pulses]
SendToHTTP x.x.x.x,8080,/json.htm?type=command¶m=udevice&idx=90&nvalue=0&svalue=[POW#Current]
endon
Greetings from Tahiti!
@sincze which version of mega do you use?
I have try mega_20180826 and mega_20180719, both correctly show values from CSE7759, but http push from rules doesn't work...
This rules work fine:
On WIFI#RSSI do
SendToHTTP x.x.x.x,8080,/json.htm?type=command¶m=udevice&idx=88&nvalue=0&svalue=[POW#Voltage]
endon
Confirmed by logs:
Aug 26 21:32:56 POW EspEasy: SYS : -77.00
Aug 26 21:32:56 POW EspEasy: EVENT: WIFI#RSSI=-77.00
Aug 26 21:32:56 POW EspEasy: ACT : SendToHTTP x.x.x.x,8080,/json.htm?type=command¶m=udevice&idx=88&nvalue=0&svalue=235.07
Aug 26 21:32:56 POW EspEasy: Command: sendtohttp
But this one is never triggered:
On POW#Current do
SendToHTTP x.x.x.x,8080,/json.htm?type=command¶m=udevice&idx=89&nvalue=0&svalue=[POW#Power];[POW#Pulses]
SendToHTTP x.x.x.x,8080,/json.htm?type=command¶m=udevice&idx=90&nvalue=0&svalue=[POW#Current]
endon
Greetings from Tahiti!
Re: SonOff POW R2 support
mmm strange indeed. ntp was enabled?? to have the timer work for you?Djoe wrote: ↑27 Aug 2018, 09:35 Hi,
@sincze which version of mega do you use?
I have try mega_20180826 and mega_20180719, both correctly show values from CSE7759, but http push from rules doesn't work...
This rules work fine:
On WIFI#RSSI do
SendToHTTP x.x.x.x,8080,/json.htm?type=command¶m=udevice&idx=88&nvalue=0&svalue=[POW#Voltage]
endon
Confirmed by logs:
Aug 26 21:32:56 POW EspEasy: SYS : -77.00
Aug 26 21:32:56 POW EspEasy: EVENT: WIFI#RSSI=-77.00
Aug 26 21:32:56 POW EspEasy: ACT : SendToHTTP x.x.x.x,8080,/json.htm?type=command¶m=udevice&idx=88&nvalue=0&svalue=235.07
Aug 26 21:32:56 POW EspEasy: Command: sendtohttp
But this one is never triggered:
On POW#Current do
SendToHTTP x.x.x.x,8080,/json.htm?type=command¶m=udevice&idx=89&nvalue=0&svalue=[POW#Power];[POW#Pulses]
SendToHTTP x.x.x.x,8080,/json.htm?type=command¶m=udevice&idx=90&nvalue=0&svalue=[POW#Current]
endon
Greetings from Tahiti!
Code: Select all
On System#Boot do
TaskValueSet 5,1,0
TaskValueSet 5,2,0
TaskValueSet 5,3,0
EndOn
// LAMP CONTROLLING INCLUDING LED LIGHT
on lamp_on do
gpio,12,1
gpio,13,0
endon
on lamp_off do
gpio,12,0
gpio,13,1
endon
on SW_1#Switch do
if [SW_1#Switch]=1
gpio,12,1
gpio,13,0
else
gpio,12,0
gpio,13,1
endif
endon
on Energy#Power do
if Clock#Time=All,**:*0 do
SendToHTTP x.x.x.x,8080,/json.htm?type=command¶m=udevice&idx=11&nvalue=0&svalue=[Energy#Voltage]
SendToHTTP x.x.x.x,8080,/json.htm?type=command¶m=udevice&idx=18&nvalue=0&svalue=[Energy#Power]
SendToHTTP x.x.x.x,8080,/json.htm?type=command¶m=udevice&idx=13&nvalue=0&svalue=[Energy#Power]
SendToHTTP x.x.x.x,8080,/json.htm?type=command¶m=udevice&idx=14&nvalue=0&svalue=[Energy#Current]
endif
if [Energy#Voltage]!=[Calculation#Voltage]
SendToHTTP x.x.x.x,8080,/json.htm?type=command¶m=udevice&idx=1&nvalue=0&svalue=[Energy#Voltage] // Voltage
TaskValueSet 5,1,[Energy#Voltage]
endif
if [Energy#Power]!=[Calculation#Power]
SendToHTTP x.x.x.x,8080,/json.htm?type=command¶m=udevice&idx=13&nvalue=0&svalue=[Energy#Power] // Calculated KwH.
SendToHTTP x.x.x.x,8080,/json.htm?type=command¶m=udevice&idx=18&nvalue=0&svalue=[Energy#Power] // Watt only
TaskValueSet 5,2,[Energy#Power]
endif
if [Energy#Current]!=[Calculation#Current]
SendToHTTP x.x.x.x,8080,/json.htm?type=command¶m=udevice&idx=14&nvalue=0&svalue=[Energy#Current] // Amp
TaskValueSet 5,3,[Energy#Current]
endif
TaskValueSet 5,4,[Energy#Pulses]
endon
it will now be triggered if the Power value changes.. not the voltage.
Should be okay to get the data into domoticz.
Please let me know.
Re: SonOff POW R2 support
Thank you for your reply,
I don't use NTP (long time ago it was not stable and all is automated from domoticz).
But if you really want me to test with NTP I can do it (is there a link between NTP and a triggered property?)
I have tested again all properties as "trigger", here below the complete rules:
For information the "Pulses" property is configured with the formula : %value%/12530
There is no external sensor connected to this POW.
Here below the log (through syslog with "Info" level) :
Aug 27 20:46:09 POW EspEasy: SYS : -77.00
Aug 27 20:46:09 POW EspEasy: EVENT: WIFI#RSSI=-77.00
Aug 27 20:46:09 POW EspEasy: ACT : SendToHTTP 10.0.0.4,8080,/json.htm?type=command¶m=udevice&idx=88&nvalue=0&svalue=232.76
Aug 27 20:46:09 POW EspEasy: Command: sendtohttp
Aug 27 20:46:09 POW EspEasy: SYS : 484.00
Aug 27 20:46:09 POW EspEasy: EVENT: SONOFF#Uptime=484.00
Aug 27 20:46:10 POW EspEasy: Domoticz: Sensortype: 1 idx: 83 values: 484.00
Aug 27 20:46:10 POW EspEasy: WD : Uptime 485 ConnectFailures 0 FreeMem 14560
Aug 27 20:46:39 POW EspEasy: WD : Uptime 485 ConnectFailures 0 FreeMem 14584
Aug 27 20:47:09 POW EspEasy: WD : Uptime 486 ConnectFailures 0 FreeMem 14512
Aug 27 20:47:39 POW EspEasy: WD : Uptime 486 ConnectFailures 0 FreeMem 14512
Aug 27 20:48:09 POW EspEasy: WD : Uptime 487 ConnectFailures 0 FreeMem 14512
Aug 27 20:48:39 POW EspEasy: WD : Uptime 487 ConnectFailures 0 FreeMem 14512
Aug 27 20:49:09 POW EspEasy: WD : Uptime 488 ConnectFailures 0 FreeMem 14512
I have switch on and off 3 times the light connected to the POW... The value are correctly shown on the POW:
Voltage: 232.76
Power: 18.11
Current: 0.13
Pulses: 9949.00
Have you compile your own binary for your POW or are you using a binary delivered by a release?
My POW R2 is written V1.0 on the PCB...
Thank you gain,
Mc/
I don't use NTP (long time ago it was not stable and all is automated from domoticz).
But if you really want me to test with NTP I can do it (is there a link between NTP and a triggered property?)
I have tested again all properties as "trigger", here below the complete rules:
Code: Select all
On Button#State do
if [Relay#State]=1
gpio,12,0
else
gpio,12,1
endif
endon
On System#Boot do
gpio,12,1
endon
On WIFI#RSSI do
SendToHTTP xxx,8080,/json.htm?type=command¶m=udevice&idx=88&nvalue=0&svalue=[POW#Voltage]
endon
On POW#Power do
SendToHTTP xxx,8080,/json.htm?type=command¶m=udevice&idx=89&nvalue=0&svalue=[POW#Power];[POW#Pulses]
SendToHTTP xxx,8080,/json.htm?type=command¶m=udevice&idx=90&nvalue=0&svalue=[POW#Current]
endon
On POW#Current do
SendToHTTP xxx,8080,/json.htm?type=command¶m=udevice&idx=89&nvalue=0&svalue=[POW#Power];[POW#Pulses]
SendToHTTP xxx,8080,/json.htm?type=command¶m=udevice&idx=90&nvalue=0&svalue=[POW#Current]
endon
On POW#Voltage do
SendToHTTP xxx,8080,/json.htm?type=command¶m=udevice&idx=99&nvalue=0&svalue=test_vol
endon
On POW#Pulses do
SendToHTTP xxx,8080,/json.htm?type=command¶m=udevice&idx=99&nvalue=0&svalue=test_pul
endon
There is no external sensor connected to this POW.
Here below the log (through syslog with "Info" level) :
Aug 27 20:46:09 POW EspEasy: SYS : -77.00
Aug 27 20:46:09 POW EspEasy: EVENT: WIFI#RSSI=-77.00
Aug 27 20:46:09 POW EspEasy: ACT : SendToHTTP 10.0.0.4,8080,/json.htm?type=command¶m=udevice&idx=88&nvalue=0&svalue=232.76
Aug 27 20:46:09 POW EspEasy: Command: sendtohttp
Aug 27 20:46:09 POW EspEasy: SYS : 484.00
Aug 27 20:46:09 POW EspEasy: EVENT: SONOFF#Uptime=484.00
Aug 27 20:46:10 POW EspEasy: Domoticz: Sensortype: 1 idx: 83 values: 484.00
Aug 27 20:46:10 POW EspEasy: WD : Uptime 485 ConnectFailures 0 FreeMem 14560
Aug 27 20:46:39 POW EspEasy: WD : Uptime 485 ConnectFailures 0 FreeMem 14584
Aug 27 20:47:09 POW EspEasy: WD : Uptime 486 ConnectFailures 0 FreeMem 14512
Aug 27 20:47:39 POW EspEasy: WD : Uptime 486 ConnectFailures 0 FreeMem 14512
Aug 27 20:48:09 POW EspEasy: WD : Uptime 487 ConnectFailures 0 FreeMem 14512
Aug 27 20:48:39 POW EspEasy: WD : Uptime 487 ConnectFailures 0 FreeMem 14512
Aug 27 20:49:09 POW EspEasy: WD : Uptime 488 ConnectFailures 0 FreeMem 14512
I have switch on and off 3 times the light connected to the POW... The value are correctly shown on the POW:
Voltage: 232.76
Power: 18.11
Current: 0.13
Pulses: 9949.00
Have you compile your own binary for your POW or are you using a binary delivered by a release?
My POW R2 is written V1.0 on the PCB...
Thank you gain,
Mc/
Re: SonOff POW R2 support
I use the following: mega-20180723. (Development)
Regarding NTP usage I once read somewhere it is needed to have the timer function trigger correctly.
However since then I enable it on all my devices. So not sure what happens if I disable it.
Regarding NTP usage I once read somewhere it is needed to have the timer function trigger correctly.
However since then I enable it on all my devices. So not sure what happens if I disable it.
Re: SonOff POW R2 support
I like the rules, but my question. Can i also used them for my first generation Sonoff Pow with the HLW8012? And if it's yes what must i change in the rules.
Re: SonOff POW R2 support
I have upgraded the POW to mega-20180723 (dev), and it's not working better...
Very strange...
I'm going to continue to push CSE7759 data through the wifi#rssi trigger, but it's not a "realtime" push, so not very good for the appliance I would like to run....
I have another POW in a box, I will get it out tomorrow and I will try with this one...
I also use timer (without NTP) on a sonoff basic, like this :
It work:
Aug 26 16:00:02 Piscine EspEasy: Command: timerset
Aug 26 16:00:04 Piscine EspEasy: EVENT: Rules#Timer=1
Aug 26 16:00:04 Piscine EspEasy: ACT : timerSet,2,21600
Aug 26 16:00:04 Piscine EspEasy: Command: timerset
Aug 26 22:00:05 Piscine EspEasy: EVENT: Rules#Timer=2
Aug 26 22:00:05 Piscine EspEasy: ACT : timerSet,3,21600
Aug 26 22:00:05 Piscine EspEasy: Command: timerset
But if the number of second is to high (I don't remember the limit), I notice some strange behavior (next timer not triggered, or triggered in a shorter time).
Since I use "small" number, it's work perfectly...
Very strange...
I'm going to continue to push CSE7759 data through the wifi#rssi trigger, but it's not a "realtime" push, so not very good for the appliance I would like to run....
I have another POW in a box, I will get it out tomorrow and I will try with this one...
I also use timer (without NTP) on a sonoff basic, like this :
Code: Select all
On Rules#Timer=1 do
timerSet,2,21600
endon
Aug 26 16:00:02 Piscine EspEasy: Command: timerset
Aug 26 16:00:04 Piscine EspEasy: EVENT: Rules#Timer=1
Aug 26 16:00:04 Piscine EspEasy: ACT : timerSet,2,21600
Aug 26 16:00:04 Piscine EspEasy: Command: timerset
Aug 26 22:00:05 Piscine EspEasy: EVENT: Rules#Timer=2
Aug 26 22:00:05 Piscine EspEasy: ACT : timerSet,3,21600
Aug 26 22:00:05 Piscine EspEasy: Command: timerset
But if the number of second is to high (I don't remember the limit), I notice some strange behavior (next timer not triggered, or triggered in a shorter time).
Since I use "small" number, it's work perfectly...
Who is online
Users browsing this forum: No registered users and 28 guests