Sonoff POW rule trigger for Current / Power

Moderators: Voyager, BertB, rtenklooster, Stuntteam

Forum rules
You have entered the experimental forum, beware!!!
Post Reply
Message
Author
Sandominion
Normal user
Posts: 9
Joined: 02 Aug 2018, 12:36

Sonoff POW rule trigger for Current / Power

#1 Post by Sandominion » 23 Dec 2018, 01:06

I try to use a Sonoff POW (R2 v1.0 with mega-20180826) for failure monitoring of a drainage pump. The pump is allways voltage supplied and switches itself on/off dependend on the water level. If the pump is working the Sonoff recognize the used current and even calculates the energy but I don't manage to use this for triggering a command like:
On Pumpe#Current>0 do ...

If I use an other device from my list everything works fine e.g.:
On Button#pressed>0 do ...

My settings for devices are:
Task: 1
Enabled: ✔
Device: Energy (AC) - CSE7766 [TESTING]
Name: Pumpe
GPIO:
Values: Voltage: 239.15 Power: 36.90 Current: 0.16 Pulses: 12577.00

Task: 2
Enabled: ✔
Device: Switch input - Switch
Name: Button
GPIO: GPIO-0
Values: pressed: 1


Might this be somehow connected to the selected device type for current measurement 'Energy (AC) - CSE7766 [TESTING]'?

Any suggestions?

User avatar
grovkillen
Normal user
Posts: 2837
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Sonoff POW rule trigger for Current / Power

#2 Post by grovkillen » 23 Dec 2018, 08:33

If you look in the log, what do you see?
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 :idea: :idea: :idea:

Sandominion
Normal user
Posts: 9
Joined: 02 Aug 2018, 12:36

Re: Sonoff POW rule trigger for Current / Power

#3 Post by Sandominion » 23 Dec 2018, 14:36

grovkillen wrote:
23 Dec 2018, 08:33
If you look in the log, what do you see?
Before I took the log I reduced the rule to focus on the problem:

On Button#pressed>0 do
rtttl,4:d=10,o=6,b=180:8c,8e,8g,c,e,g,8c,8e,8g //melody2buzzer
notify 2, Button_pressed_while_Power[Pumpe#Power] //Email ack
endon

On Pumpe#Power>1 do
rtttl,4:d=10,o=6,b=180:8c,8e,8g,c,e,g,8c,8e,8g //melody2buzzer
notify 2, Power_delta //Email ack
endon


Logging: Info (2)

5259: EVENT: Pumpe#Voltage=236.77

5279: EVENT: Pumpe#Power=0.00

5293: EVENT: Pumpe#Current=0.00

5306: EVENT: Pumpe#Pulses=0.00

5334: SW : State 0.00

5336: EVENT: Button#pressed=0.00

5797: Current Time Zone: DST time start: 2019-03-31 02:00:00 offset: 120 minSTD time start: 2019-10-27 03:00:00 offset: 60 min

5798: EVENT: Time#Initialized

5815: EVENT: Clock#Time=Wed,23:35

17047: SW : Switch state 0 Output value 1

17049: EVENT: Button#pressed=1.00

17056: ACT : rtttl,4:d=10,o=6,b=180:8c,8e,8g,c,e,g,8c,8e,8g

18458: SW : rtttl,4:d=10,o=6,b=180:8c,8e,8g,c,e,g,8c,8e,8g

18495: ACT : notify 2, Button_pressed_while_Power0.00

The trigger for Button works well. There comes a melody from the Buzzer and an Email. After that I switched on the device to drain power without any trigger reaction. It seemed that the log was frozen. After refresh for the log I managed to catch another one (and pressed the Button again):

Logging: Info (2)

229537: ACT : notify 2, Button_pressed_while_Power36.36

229571: SW : Switch state 1 Output value 0

229573: EVENT: Button#pressed=0.00

229679: Command: notify

230748: Timeout while reading input data!

231748: Timeout while reading input data!

232748: Timeout while reading input data!

233898: EMAIL: Connection Closed Successfully

235912: EVENT: Clock#Time=Wed,23:39

242045: SW : Switch state 0 Output value 1

242048: EVENT: Button#pressed=1.00

242054: ACT : rtttl,4:d=10,o=6,b=180:8c,8e,8g,c,e,g,8c,8e,8g

243455: SW : rtttl,4:d=10,o=6,b=180:8c,8e,8g,c,e,g,8c,8e,8g

243491: ACT : notify 2, Button_pressed_while_Power36.32

243576: SW : Switch state 1 Output value 0

243578: EVENT: Button#pressed=0.00

243650: WD : Uptime 4 ConnectFailures 0 FreeMem 19384

243656: Command: notify

244725: Timeout while reading input data!

245725: Timeout while reading input data!

246725: Timeout while reading input data!

247875: EMAIL: Connection Closed Successfully

272296: WD : Uptime 5 ConnectFailures 0 FreeMem 19752

295914: EVENT: Clock#Time=Wed,23:40

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest