Alarm Service configurations help thread
Moderator: Mattk
Alarm Service configurations help thread
I just setup the Meteobridge Alarm Service which will be sending to e-mail or Twitter upon trigger. I'm interested in what condition expressions other people are using, so that we can share some alerts that maybe others haven't thought of or discover problems with the syntax that may lead to undesired results.
Here's mine (Edited due to initial non-triggering):
Raise Condition: wind0wind-max2=mph.0:0 > 39 || th0temp-val2=F.1:0 > 89 || rain0total-sum2=in:0 > 0
Clear Condition: wind0wind-max5=mph.0:0 < 10 || th0temp-val2=F.1:0 < 85 || rain0total-sum12h=in:0 = 0
Message: Weather ALERT [hh]:[mm]#Peak Wind Gust [wind0wind-dmax=mph.0:--] mph \n Hi Temp [th0temp-dmax=F.0:--] F \n Day Rain [rain0total-sumday=in.2:--]
Here's mine (Edited due to initial non-triggering):
Raise Condition: wind0wind-max2=mph.0:0 > 39 || th0temp-val2=F.1:0 > 89 || rain0total-sum2=in:0 > 0
Clear Condition: wind0wind-max5=mph.0:0 < 10 || th0temp-val2=F.1:0 < 85 || rain0total-sum12h=in:0 = 0
Message: Weather ALERT [hh]:[mm]#Peak Wind Gust [wind0wind-dmax=mph.0:--] mph \n Hi Temp [th0temp-dmax=F.0:--] F \n Day Rain [rain0total-sumday=in.2:--]
Re: Alarm Service configurations help thread
After my initial post I discovered that my temperature alarms weren't triggering. After re-reading the templates I noticed that I didn't enclose my variables between brackets, so here's my new Raise and Clear Conditions:
Raise Condition: [wind0wind-max2=mph.0:0] > 19 || [th0temp-val2=F.0:0] > 69 || [rain0total-sum2=in:0] > 0
Clear Condition: [wind0wind-max5=mph.0:0] < 10 || [th0temp-val2=F.0:0] < 65 || [rain0total-sum12h=in:0] = 0
THE PROBLEM: As soon as there was a Wind Gust of 21 mph, I got 25 alerts over the next 2 minutes.
WHY: The temperature at the time was 67 F, but the fact I've had no rain in 12 hours cleared the condition. The Wind raise condition then fired the alert again since the 21 mph gust over the past 2 minutes was still true, but then the Rain clear condition caused a loop for the next 2 minutes. Luckily I set my Wind raise condition for only 2 minutes and not something significantly higher.
Luckily I've been testing this as emails and not Twitter posts, so I'm not sending out my alarming unintended results to the world. In the meantime I've raise the values of my raise conditions, and deleted the clear condition for Rain until I figure out a resolve for this.
Does anyone have any suggestions for an alarm syntax that will fire off whenever the Peak Wind Gust or Temperature reach a high amount for the day or there's been any rainfall, without the clear conditions on another weather variable immediately clearing the condition, thus causing a loop? TIA.
Raise Condition: [wind0wind-max2=mph.0:0] > 19 || [th0temp-val2=F.0:0] > 69 || [rain0total-sum2=in:0] > 0
Clear Condition: [wind0wind-max5=mph.0:0] < 10 || [th0temp-val2=F.0:0] < 65 || [rain0total-sum12h=in:0] = 0
THE PROBLEM: As soon as there was a Wind Gust of 21 mph, I got 25 alerts over the next 2 minutes.
WHY: The temperature at the time was 67 F, but the fact I've had no rain in 12 hours cleared the condition. The Wind raise condition then fired the alert again since the 21 mph gust over the past 2 minutes was still true, but then the Rain clear condition caused a loop for the next 2 minutes. Luckily I set my Wind raise condition for only 2 minutes and not something significantly higher.
Luckily I've been testing this as emails and not Twitter posts, so I'm not sending out my alarming unintended results to the world. In the meantime I've raise the values of my raise conditions, and deleted the clear condition for Rain until I figure out a resolve for this.
Does anyone have any suggestions for an alarm syntax that will fire off whenever the Peak Wind Gust or Temperature reach a high amount for the day or there's been any rainfall, without the clear conditions on another weather variable immediately clearing the condition, thus causing a loop? TIA.
Re: Alarm Service configurations help thread
I think there is no solution for that right now.
Re: Alarm Service configurations help thread
After thinking about it some more, the following syntax should give me the desired results:
Raise Condition: [wind0wind-dmax=mph.0:0] > 19 || [th0temp-dmax=F.0:0] > 69 || [rain0total-daysum=in:0] > 0
Clear Condition: [hh] = 0 && [mm] = 0
The clear condition should clear the alarm every day at midnight. I'm hoping the raise condition will alarm me with with every subsequent increase in Wind, Temperature and Rain (i.e. 20, 21, 22...mph, 70, 71, 72...F, .01, .02, .03 ...in).
Thoughts?
Raise Condition: [wind0wind-dmax=mph.0:0] > 19 || [th0temp-dmax=F.0:0] > 69 || [rain0total-daysum=in:0] > 0
Clear Condition: [hh] = 0 && [mm] = 0
The clear condition should clear the alarm every day at midnight. I'm hoping the raise condition will alarm me with with every subsequent increase in Wind, Temperature and Rain (i.e. 20, 21, 22...mph, 70, 71, 72...F, .01, .02, .03 ...in).
Thoughts?
Re: Alarm Service configurations help thread
Your request brings a design flaw of the "push services" as realized in Meteobridge to my attention again.
It should have been separated into a section where you define channels like:
- email
- twitter
- ftp
- mysql
- http
and then define events on that channels which can be triggered by
- fixed time schedules (at 10:00 AM)
- repeating schedules (every 10 minutes)
- alarm conditions
and each event selecting one of the defined channels and defining a payload/message text to be handed over to the channel.
Having that you can define as many events as you like and choose from the channels. In the example above you would simply define 2 or three independent alarm events and you are done.
Only problem is, that this is 1) a severe redesign consuming quite some development efforts and 2) the old definitions must be automatically converted to the new design as a user would be unhappy when his Meteobridge does stop doing push services caused by loading the new application stack after a reboot.
I wish days would have 36 hours or so...
It should have been separated into a section where you define channels like:
- ftp
- mysql
- http
and then define events on that channels which can be triggered by
- fixed time schedules (at 10:00 AM)
- repeating schedules (every 10 minutes)
- alarm conditions
and each event selecting one of the defined channels and defining a payload/message text to be handed over to the channel.
Having that you can define as many events as you like and choose from the channels. In the example above you would simply define 2 or three independent alarm events and you are done.
Only problem is, that this is 1) a severe redesign consuming quite some development efforts and 2) the old definitions must be automatically converted to the new design as a user would be unhappy when his Meteobridge does stop doing push services caused by loading the new application stack after a reboot.
I wish days would have 36 hours or so...
Re: Alarm Service configurations help thread
I've been anxiously waiting for that 36-hour day too
I was hoping this thread would bring out some creative examples to have the alarms work with the current configuration of Meteobridge. I welcome any updates to the push services. I haven't had an alarm pushed to my newly created Twitter account yet - but I've temporarily set it to an "every minute" upload to test. I've been wondering when having Twitter upload set to "on alarm only" will it send the Twitter Message Text, or the Alarm Service Message?

I was hoping this thread would bring out some creative examples to have the alarms work with the current configuration of Meteobridge. I welcome any updates to the push services. I haven't had an alarm pushed to my newly created Twitter account yet - but I've temporarily set it to an "every minute" upload to test. I've been wondering when having Twitter upload set to "on alarm only" will it send the Twitter Message Text, or the Alarm Service Message?
Re: Alarm Service configurations help thread
then it will send alarm message only.
Re: Alarm Service configurations help thread
Is there any way to set an email alarm if meteobridge doesn't receive a reading from a sensor for a period of time? Currently using a Acurite 5 in 1.
Re: Alarm Service configurations help thread
Selector "age" reports seconds elapsed since last reception of data for that particular sensor.
http://meteobridge.com/wiki/index.php/T ... #Selectors
You can define an alarm condition when "age" exceeds a certain value.
http://meteobridge.com/wiki/index.php/T ... #Selectors
You can define an alarm condition when "age" exceeds a certain value.
Re: Alarm Service configurations help thread
Awesome! Thank you!
Re: Alarm Service configurations help thread
I'm using the Services in a unique way I think. I have a weather webcam in addition to my weather station (a Foscam clone from Ambient Weather). To get a less "grainy" image at night, I need to alter the webcam's video contrast settings, then restore them in the morning. Although there are some timing capabilities on the webcam, it does not know actual sunrise or sunset times, and thus cannot vary that timing by season.
However, the MeteoBridge does know the unique daily sunrise and sunset times at my GPS location, and the MeteoBridge can send an HTTP API command to the webcam.
For example, there is a first "one-time" Event that drops the contrast 30 minutes after sunset:
Raise: {* ([hh] * 60) + [mm] *} = {* ([mbsystem-sunset.ab] * 60) + 30 + [mbsystem-sunset.de] *}
Clear: {* ([hh] * 60) + [mm] *} = {* ([mbsystem-sunset.ab] * 60) + 31 + [mbsystem-sunset.de] *}
URL: http://<clipped>/cgi-bin/CGIProxy.fcgi?cmd=setContrast&constrast=25&usr=<clipped>&pwd=<clipped>
And a second "one-time" Event is defined for 15 minutes before sunrise to reset the contrast back it its default value of 50:
Raise: {* ([hh] * 60) + [mm] *} = {* ([mbsystem-sunrise.ab] * 60) - 15 + [mbsystem-sunrise.de] *}
Clear: {* ([hh] * 60) + [mm] *} = {* ([mbsystem-sunrise.ab] * 60) - 14 + [mbsystem-sunrise.de] *}
URL: http://<clipped>/cgi-bin/CGIProxy.fcgi?cmd=setContrast&constrast=50&usr=<clipped>&pwd=<clipped>
So do not limit your thinking about using the Services capability for only the weather station sensor. It can be used to also control other weather-related hardware if needed.
However, the MeteoBridge does know the unique daily sunrise and sunset times at my GPS location, and the MeteoBridge can send an HTTP API command to the webcam.
For example, there is a first "one-time" Event that drops the contrast 30 minutes after sunset:
Raise: {* ([hh] * 60) + [mm] *} = {* ([mbsystem-sunset.ab] * 60) + 30 + [mbsystem-sunset.de] *}
Clear: {* ([hh] * 60) + [mm] *} = {* ([mbsystem-sunset.ab] * 60) + 31 + [mbsystem-sunset.de] *}
URL: http://<clipped>/cgi-bin/CGIProxy.fcgi?cmd=setContrast&constrast=25&usr=<clipped>&pwd=<clipped>
And a second "one-time" Event is defined for 15 minutes before sunrise to reset the contrast back it its default value of 50:
Raise: {* ([hh] * 60) + [mm] *} = {* ([mbsystem-sunrise.ab] * 60) - 15 + [mbsystem-sunrise.de] *}
Clear: {* ([hh] * 60) + [mm] *} = {* ([mbsystem-sunrise.ab] * 60) - 14 + [mbsystem-sunrise.de] *}
URL: http://<clipped>/cgi-bin/CGIProxy.fcgi?cmd=setContrast&constrast=50&usr=<clipped>&pwd=<clipped>
So do not limit your thinking about using the Services capability for only the weather station sensor. It can be used to also control other weather-related hardware if needed.
Re: Alarm Service configurations help thread
cool hack!