Is this not > than 0?

Tips and Techniques for using MLServer's Automation Rules
Art Dustman
Expert
Expert
Posts: 576
Joined: Fri Nov 10, 2006 3:22 pm
Location: NJ
Contact:

Is this not > than 0?

Postby Art Dustman » Fri Oct 02, 2015 2:28 pm

Why will this not fire? When I manually change the value to an integer, it fires perfect. Are we not looking at the deciamal value correctly? I have a pump getting stuck in this storm and really need to know what's going on rather than sitting in the rain.



Here is the changed variable:

rule.PNG
You do not have the required permissions to view the files attached to this post.

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10534
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Is this not > than 0?

Postby CinemarDave » Fri Oct 02, 2015 9:21 pm

The conditional test is looking for integer values. I'll change it tomorrow to accept any valid number.

Art Dustman
Expert
Expert
Posts: 576
Joined: Fri Nov 10, 2006 3:22 pm
Location: NJ
Contact:

Re: Is this not > than 0?

Postby Art Dustman » Fri Oct 02, 2015 10:18 pm

Would it be a safer bet to add a parameter "as int" or "as dec" or even perhaps if I challenge the condition with a decimal value it would evaluate as a decimal..

Where x is equal to "0.0" (i.e. 0 as decimal)?

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10534
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Is this not > than 0?

Postby CinemarDave » Mon Oct 05, 2015 11:36 am

Actually that is not the issue. A long time ago I had changed the integer tests to real numbers and just forgot I did it. So something else is going on. I'll replicate your rule here to see what it is doing.

Art Dustman
Expert
Expert
Posts: 576
Joined: Fri Nov 10, 2006 3:22 pm
Location: NJ
Contact:

Re: Is this not > than 0?

Postby Art Dustman » Mon Oct 05, 2015 12:30 pm

Ok. I have it kinda working as a hack at the moment, but not like it should. I am looking for not zero to see it change; though I assume I could have said != Elvis and it would do the same. To see it reset to zero, I am looking for it to start with zero. But in this case zero != zero, and therefore it's all the sudden changed. Then I start a timer, and check in 10 seconds to see if it still starts with zero. Yucky, but I am getting alerts. :roll:

Art Dustman
Expert
Expert
Posts: 576
Joined: Fri Nov 10, 2006 3:22 pm
Location: NJ
Contact:

Re: Is this not > than 0?

Postby Art Dustman » Mon Dec 14, 2015 8:07 pm

Ok, putting this back on the table. My new pump draws 0.2 watts continuously and I cannot evaluate the "likeness" of zero. Dave, let me know when you get a cold drink and want to be befuddled.

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10534
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Is this not > than 0?

Postby CinemarDave » Mon Dec 14, 2015 8:59 pm

What does this automation rule do? Verbose event log if it doesn't do anything.

Whenever lighting_160_watts changes value
If|IsGT##{{lighting_160_watts}}##0.2##Macro|Timers|Enable~WalkupPumpTimer!SetVariable|lighting_160_activity~Active!push.walkup.pump.timer.running##

Art Dustman
Expert
Expert
Posts: 576
Joined: Fri Nov 10, 2006 3:22 pm
Location: NJ
Contact:

Re: Is this not > than 0?

Postby Art Dustman » Mon Dec 14, 2015 9:54 pm

Need to play with that more. I see where you are going. I have to keep track of it differently or else it will fire for every fraction of a watt that is less than the running watts. I think I need to track a flag with it to get back to a binary state.


Return to “Automation Rules”

Who is online

Users browsing this forum: No registered users and 1 guest