Event reporting on rainfall **solved**

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

Moderator: Mattk

Post Reply
edrean
Fresh Boarder
Fresh Boarder
Posts: 8
Joined: Tue Dec 06, 2016 9:55 am

Event reporting on rainfall **solved**

Post by edrean »

Hi guys,

I hope someone more experienced with the event scripting on Meteobridge can help me.

I am trying to get an event to trigger every hour if there was rainfall in the past hour and report on the total rainfall for the past 24 hours. I have an hourly trigger set up with the following as "Message" :

Code: Select all

#if#{*[rain0total-sum1h]>0*}#then#Allesbeste: Total rainfall for the past 24h is [rain0total-sum24h] mm. Max rain rate was [rain0rate-dmax] at [rain0rate-dmaxtime=apm.ij]:[rain0rate-dmaxtime=apm.kl] [rain0rate-dmaxtime=apm.op]#fi#
So long story short, it's not working. Can anyone see anything wrong or provide an improved way of getting this done?

Thanks!
Mattk
Platinum Boarder
Platinum Boarder
Posts: 1395
Joined: Mon Sep 22, 2014 3:24 am

Re: Event reporting on rainfall

Post by Mattk »

Should an #else# be included in the expression for the false expression to handle a do nothing scenario when there is no rainfall (rainfall is not >0)

.......[rain0rate-dmaxtime=apm.op]#else##fi#
edrean
Fresh Boarder
Fresh Boarder
Posts: 8
Joined: Tue Dec 06, 2016 9:55 am

Re: Event reporting on rainfall

Post by edrean »

Mattk wrote:Should an #else# be included in the expression for the false expression to handle a do nothing scenario when there is no rainfall (rainfall is not >0)

.......[rain0rate-dmaxtime=apm.op]#else##fi#
Thanks Mattk. I included the #else# and I think it will work better now. The problem I am having now is that rain0total-sum1h reports 0.0 even though there was rainfall. I will ask about this in a separate thread.
Post Reply