Alarm Conditions - Help

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

Moderator: Mattk

Post Reply
User avatar
Wessel
Senior Boarder
Senior Boarder
Posts: 41
Joined: Fri May 06, 2011 1:14 am

Alarm Conditions - Help

Post by Wessel » Sat Jul 28, 2018 1:06 pm

Hi,

I seted up some alarms to tweet in certain conditions. All are one-time alarms, but I'm not sure if they are 100% right. I want that they be triggered when raise conditions is reached and every day, they must be cleared at midnight. Let's see some of them:


Tweet when actual temperature is below then 5ºC:

Raise:

Code: Select all

([th0temp-act=c.1:0] <= 5.0)
Clear:

Code: Select all

([th0temp-act=c.1:0] > 6.0) || (([hh] = 0) && ([mm] = 1)) 
Message: FRIO | Temperatura atual no bairro Languiru, em Teutônia, já está abaixo dos [th0temp-act.1:--] °C.

I have one more for temperature below 0ºC, higher than 35ºC, 38ºC, heatindex higher than 40ºC, 45ºC and th11 below 0ºC.

Tweet when UV index is higher than 8:

Raise:

Code: Select all

([uv0index-act.1:0] >= 8.0)
Clear:

Code: Select all

([uv0index-act.1:0] < 7.0) || (([hh] = 1) && ([mm] = 0)) 
Message: RADIAÇÃO UV | Atenção, radiação UV MUITO ALTA (Superior a [uv0index-act.1:--] uvi) agora em Teutônia. Evite ficar exposto ao sol entre o horário das 10h às 16h. Camisa, protetor solar e chapéu são uma obrigação.

I have one more for UV index higher then 11.

Another for low pressure:

Raise:

Code: Select all

([thb0seapress-act.1:--] <= 1000.0)
Clear:

Code: Select all

([thb0seapress-act.1:--] > 1005.0) || (([hh] = 1) && ([mm] = 0)) 
Message: ([thb0seapress-act.1:--] > 1005.0) || (([hh] = 1) && ([mm] = 0))

For wind speed:

Raise:

Code: Select all

([wind0wind-act=kmh.0:0] >= 40.0)
Clear:

Code: Select all

([wind0wind-act=kmh.0:0] < 30.0) || (([hh] = 1) && ([mm] = 0))
Message: VENTO | Vento forte no bairro Languiru. Rajadas superam os [wind0wind-act=kmh.0:0] Km/h.

For rain rate is my great doubt:

Raise:

Code: Select all

([rain0rate-act.0:0] >= 25.1 & <= 50.0)
Clear:

Code: Select all

([rain0rate-act.0:0] == 24.0 || (([hh] = 1) && ([mm] = 0)) 
Message: CHUVA | Chuva forte no bairro Languiru. A taxa de precipitação é de [rain0rate-act.0:--] mm/h.

I want to tweet for differents scales of rain rate, like light rain, heavy rain, etc.

Is there anything wrong with my raise and clear conditions?

User avatar
Wessel
Senior Boarder
Senior Boarder
Posts: 41
Joined: Fri May 06, 2011 1:14 am

Re: Alarm Conditions - Help

Post by Wessel » Mon Jul 30, 2018 9:19 pm

i'm making some tests with those onte-time alarms, like this one:

Code: Select all

Raise: ([th0temp-act=c.1:0] >= 18.1)

Code: Select all

Clear: ([th0temp-act=c.1:0] < 17.0) || (([hh] != 00) && ([mm] != 01))
What I noticed is that I receive an e-mail every hour, like 15:01; 16:01, 17:01 when the temperatur is above 18.1°C and I though that the clear condition would work when temperatura is under 17°C or everyday at 00:01. What's wrong?

When I check the "i" icon, instead to see "||" there is only "|".
Sem título-1.png
Sem título-1.png (34.01 KiB) Viewed 176 times

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

Re: Alarm Conditions - Help

Post by admin » Wed Aug 01, 2018 10:41 am

| and || are equivalent, they are both logical operators (not bitwise).

User avatar
Wessel
Senior Boarder
Senior Boarder
Posts: 41
Joined: Fri May 06, 2011 1:14 am

Re: Alarm Conditions - Help

Post by Wessel » Thu Aug 02, 2018 8:53 pm

Ok, thank you.
And there is a way to avoid alarm trigger when there is a lack of signal? Almost everyday my alarms are triggered and I don't know way there is this lack of signal for some sec/minutes:
Sem título-1.png
Sem título-1.png (231.44 KiB) Viewed 129 times

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

Re: Alarm Conditions - Help

Post by admin » Thu Aug 09, 2018 11:45 am

Interesting, I didn't realize that "--" might give a true when compared with a number. However, simply replace "--" in your definition by another default value that does not hit the trigger. For the clear condition "0" might do the trick, in rise condition "9999" should be fine.

Post Reply