Strange (incorrect?) behavior of template expression in event log

All about the standard Meteobridge devices based on mobile routers from TP-Link, D-Link, ASUS

Moderator: Mattk

Post Reply
dolfs
Junior Boarder
Junior Boarder
Posts: 35
Joined: Mon Apr 20, 2015 11:26 am

Strange (incorrect?) behavior of template expression in event log

Post by dolfs » Sat Sep 16, 2017 4:57 am

I have created an alarm condition like this to raise: fabs([th0temp-age:999]-[thb0temp-age:999]) >= 100 (don't ask why), and the corresponding condition for clearing the alarm is: fabs([th0temp-age:999]-[thb0temp-age:999]) <= 3

When I go to the "Services" tab and hover over the orange "i" box I see that most recent evaluations. An example is attached.

Now during the interval covered by this log, the raise condition never is/becomes true, and the clear condition always is true. Yet, sometimes, there is a log line with the raise condition in it, evaluating to false. So the alarm is not actually raised, but the line should not appear, I think, and it surely does not appear every single time. So when is it supposed to appear. I would expect either every evaluation, or only when it evaluates to true.

That, I suspect, is a bug. It does not affect the functioning of the alarms, but makes looking at the log a little harder than strictly necessary.
Attachments
Alarm Log.png
Alarm Log.png (367.13 KiB) Viewed 183 times

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 5026
Joined: Mon Oct 01, 2007 10:51 pm

Re: Strange (incorrect?) behavior of template expression in event log

Post by admin » Sun Sep 17, 2017 10:41 pm

From the log I can see that raise condition is not as you said. I can see a second expression to be evaluated. Are you doing the brackets right? Please post the correct raise condition.

dolfs
Junior Boarder
Junior Boarder
Posts: 35
Joined: Mon Apr 20, 2015 11:26 am

Re: Strange (incorrect?) behavior of template expression in event log

Post by dolfs » Tue Sep 19, 2017 6:57 am

The full raise condition:

Code: Select all

fabs([th0temp-age:999]-[thb0temp-age:999]) >= 100 && [mbsystem-lastgooddata] < 30
I simply left the second part out as it does not seem relevant, but there it is. The log shows that overall raise condition to evaluate to false.

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 5026
Joined: Mon Oct 01, 2007 10:51 pm

Re: Strange (incorrect?) behavior of template expression in event log

Post by admin » Sat Sep 23, 2017 10:34 am

The idea of this log is to tell you about all evaluations done. Stripping unsuccessful raise or clear computations would contradict the idea to trouble shoot false formulated conditions.

dolfs
Junior Boarder
Junior Boarder
Posts: 35
Joined: Mon Apr 20, 2015 11:26 am

Re: Strange (incorrect?) behavior of template expression in event log

Post by dolfs » Sat Sep 23, 2017 11:00 pm

I understand that, but it does not seem to show all evaluations, or at least the raise condition is not evaluated as often as the clear condition. Why?

Post Reply