SonOff POW R2 support

Moderators: BertB, rtenklooster, Voyager, Stuntteam, Martinus

Message
Author
Prutsium
Normal user
Posts: 6
Joined: 29 Mar 2018, 15:39

Re: SonOff POW R2 support

#11 Post by Prutsium » 11 Jun 2018, 08:21

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
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.
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.

TD-er
Normal user
Posts: 744
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: SonOff POW R2 support

#12 Post by TD-er » 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&param=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&param=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

projectsun
Normal user
Posts: 2
Joined: 15 Jun 2018, 00:24

Re: SonOff POW R2 support

#13 Post by projectsun » 15 Jun 2018, 00:26

Hello. Sorry, but where do I get this file: ESP_Easy_mega-20180524_hard_SONOFF_POW.bin

larduino
Normal user
Posts: 5
Joined: 19 Mar 2017, 05:15

Re: SonOff POW R2 support

#14 Post by larduino » 15 Jun 2018, 02:00

projectsun wrote:
15 Jun 2018, 00:26
Hello. Sorry, but where do I get this file: ESP_Easy_mega-20180524_hard_SONOFF_POW.bin
It is included in the latest Mega development
https://github.com/letscontrolit/ESPEasy/releases

Prutsium
Normal user
Posts: 6
Joined: 29 Mar 2018, 15:39

Re: SonOff POW R2 support

#15 Post by Prutsium » 15 Jun 2018, 10:26

projectsun wrote:
15 Jun 2018, 00:26
Hello. Sorry, but where do I get this file: ESP_Easy_mega-20180524_hard_SONOFF_POW.bin
Or use the latest version of the normal mega but the DEV version if you have the R2.
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)

Prutsium
Normal user
Posts: 6
Joined: 29 Mar 2018, 15:39

Re: SonOff POW R2 support

#16 Post by Prutsium » 15 Jun 2018, 10:32

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&param=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&param=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
Stupid of me as i had something simular but more simple for calculating DeltaT already on the ESP:

Code: Select all

On Living_Radiator_In#Temp_3 do
TaskValueSet 7,1,[Living_Radiator_In#Temp_3]-[Living_Radiator_Out#Temp_4]
endon
So now for the POW (R2) will be just a matter of creating 4 dummies and assign each one of them to a IDX.
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.

Prutsium
Normal user
Posts: 6
Joined: 29 Mar 2018, 15:39

Re: SonOff POW R2 support

#17 Post by Prutsium » 15 Jun 2018, 11:32

Prutsium wrote:
15 Jun 2018, 10:32
TD-er wrote:
14 Jun 2018, 19:03
Ok noticed making dummies is more work so the result:

Code: Select all

On POW_2_Sensors#POW_2_Voltage do
SendToHTTP 192.168.99.5,8080,/json.htm?type=command&param=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&param=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&param=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&param=udevice&idx=96&nvalue=0&svalue=[POW_2_Sensors#POW_2_Pulses] //Send the Usage data to Domoticz
endon
Where the On POW_2_Sensors#POW_2_Voltage triggers the sending of the data instead of a timer.
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 correctly :( As 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 ....

projectsun
Normal user
Posts: 2
Joined: 15 Jun 2018, 00:24

Re: SonOff POW R2 support

#18 Post by projectsun » 15 Jun 2018, 22:37

Prutsium wrote:
15 Jun 2018, 10:26
projectsun wrote:
15 Jun 2018, 00:26
Hello. Sorry, but where do I get this file: ESP_Easy_mega-20180524_hard_SONOFF_POW.bin
Or use the latest version of the normal mega but the DEV version if you have the R2.
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)
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.

pa3gmi
Normal user
Posts: 1
Joined: 04 Jun 2018, 15:46

Re: SonOff POW R2 support

#19 Post by pa3gmi » 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.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests