This object is in archive! 

Counting events with rule creator

THomas gonzi shared this question 3 years ago
Need Answer

Good morning all,


i have a pump that is independant, equipped with a pressure sensor that senses

a pressure drop in the piping. when pressure drop, this activate the pump. this

is all fully independant from the zipabox; nothing to do with it.


Still, in case of a small leak the pump will start, reach the pressure, stop,

start again...


To avoid that, i installed a on/off Fibaro switch on the power inlet of the

pump.


I see easylly when the pump start as the power consumption rockets up.


i would like to create a rule that counts how many time did the pump start and

stop to be able to swith the whole pump off if it starts and stop too often.


To do so, i created a virtuel meter that is used in 2 rules :


First one is a recet rule : as soon as the meter is not 0, wait 3600s

then set it to 0


/VyXD2e9hs4O0NXl5gvYEgJsngOsNJcmsdEcpxwMkvorCC3IhSEsrwGMBmd9MzDskoA1S2B9idSJoN1vX4fwCSdoGVcXpWZgAAAABJRU5ErkJggg==


Second rule is the pump protection rule that should increase the value of the

meter each time the pump restarts :


/jR6+U4vmwL8fwOPY7kHqfD92wAAAABJRU5ErkJggg==


In addition, it should stop the pump if it is on or more than 2400s.


Problem, it doesn't work. I think there is a trick with some 'join' or 'stop'

action, but i can't make it right.


Can anybody help ?


Thanks in advance


Normal

0


false

false

false


EN-US

X-NONE

X-NONE


/* Style Definitions */

table.MsoNormalTable

{mso-style-name:"Table Normal";

mso-tstyle-rowband-size:0;

mso-tstyle-colband-size:0;

mso-style-noshow:yes;

mso-style-priority:99;

mso-style-parent:"";

mso-padding-alt:0cm 5.4pt 0cm 5.4pt;

mso-para-margin-top:0cm;

mso-para-margin-right:0cm;

mso-para-margin-bottom:10.0pt;

mso-para-margin-left:0cm;

line-height:115%;

mso-pagination:widow-orphan;

font-size:11.0pt;

font-family:"Calibri","sans-serif";

mso-ascii-font-family:Calibri;

mso-ascii-theme-font:minor-latin;

mso-hansi-font-family:Calibri;

mso-hansi-theme-font:minor-latin;}

Comments (2)

photo
1

Hello,


"Stop" seems a bad solution here. I deleted "Stop" from rules because they did not work fine for me.

I would change your rule in an other architecture: Make a scheduler which tests every 2 or 5 minutes the status of the pump. Then do not use to much if then else inside. Try more to use simple if then clauses with semaphores like your value1. I have i.e a rule which tests several clauses if it is necessary to start my garden pump. Time, temperature etc. Every clause is inside a if then clause. If the pump should be started, then I set a variable to 1 (at the very first beginning it is set to 0). My last clause is if variable is 1 then pump= on. Same way you can do it. Test for consumption every some minutes and depending of the findigs do something.

In the beginning of such a project I send myselfe some emails from every clause. So I know what is happening.

Hope this helps.

Andreas

photo
1

Hi,

Thank you for very quick answer.

Popint is that when there is a leak, the pump can stop and start many times. it would be a big change to catch the moment when the pump is stopped. this is why i wanted a counter that actually can count how many stop&start operation are realised.

I did the email thing anlready. Indeed excelent idea.