Alarm to email me when sensor reports no new data

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

Moderator: Mattk

Post Reply
crazyace
Senior Boarder
Senior Boarder
Posts: 40
Joined: Sat Jan 24, 2015 8:13 am

Alarm to email me when sensor reports no new data

Post by crazyace »

I am new to Meteobridge and am using the software with a Acurite 5 in 1 sensor and internet bridge. I would like to create an alarm condition that will email me when the bridge does not receive any valid updated sensor data for 15 minutes. COuld someone point me in the right direction of how to approach this? Note that I have am email alarm working now that emails me when rain is sensed each day.

As a bonus, it would also be great to have an alarm that would email me when the sensor batteries are low or the signal is very weak.
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7874
Joined: Mon Oct 01, 2007 10:51 pm

Re: Alarm to email me when sensor reports no new data

Post by admin »

As mostly... it is in the wiki: http://meteobridge.com/wiki/index.php/T ... _Variables

Variable "mbsystem-lastgooddata" returns number of seconds passed since last data reception.
crazyace
Senior Boarder
Senior Boarder
Posts: 40
Joined: Sat Jan 24, 2015 8:13 am

Re: Alarm to email me when sensor reports no new data

Post by crazyace »

OK, I will work with that System variable. Do I have to specify a sensor for the lastgooddata variable to work or does it report for any/all sensors? Could you give me a couple of examples of how I could use lastgooddata to see if my 5 in 1 has reported no useful data in the last 5 minutes?
crazyace
Senior Boarder
Senior Boarder
Posts: 40
Joined: Sat Jan 24, 2015 8:13 am

Re: Alarm to email me when sensor reports no new data

Post by crazyace »

In response to my previous post would the following work for a one-time alarm email?

Raise Condition: [ [mbsystem-lastgooddata] = -1 ] || [ [mbsystem-lastgooddata] > 300 ]

Clear Condition: [ [mbsystem-lastgooddata] != -1 ] && [ [mbsystem-lastgooddata] < 300 ]

Subj # Body: No PWS Data Alarm # No PWS Data received for [mbsystem-lastgooddata] seconds.

I think this would email me when there is no valid data or no new data for 300 seconds (5 mins). If what I read is correct it would send one email when the raise condition is met and not send another unless the clear condition is met and then another raise condition is met. I am choosing one-time instead of periodic because I think I would get many emails in an extended outage situation. I really am just looking for an email to alert me that something is wrong and to investigate. Would this work OK?
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7874
Joined: Mon Oct 01, 2007 10:51 pm

Re: Alarm to email me when sensor reports no new data

Post by admin »

1) Priority of evaluation is given by rounded brackets (not square ones), as we learned in school ;-)
2) Raise condition will trigger you each time data logging is started. When you don't want this, just put "[mbsystem-lastgooddata] > 300" as raise condition.
crazyace
Senior Boarder
Senior Boarder
Posts: 40
Joined: Sat Jan 24, 2015 8:13 am

Re: Alarm to email me when sensor reports no new data

Post by crazyace »

I thought that the square brackets were required when using system variables. Where are you suggesting that I use () instead of square brackets? Should I not use the -1 check at all for my application? Also, is my clear condition ok?

On a lesser important note, I do not get any emails from this forum when someone replies to my posts, is this normal? I am just checking periodically.
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7874
Joined: Mon Oct 01, 2007 10:51 pm

Re: Alarm to email me when sensor reports no new data

Post by admin »

variables in square brackets, numeric expressions in round brackets...

raise: [mbsystem-lastgooddata] > 300
clear: ([mbsystem-lastgooddata] >=0) && ([mbsystem-lastgooddata] < 300)
crazyace
Senior Boarder
Senior Boarder
Posts: 40
Joined: Sat Jan 24, 2015 8:13 am

Re: Alarm to email me when sensor reports no new data

Post by crazyace »

Ok, thanks for the help... I will give this a try.
crazyace
Senior Boarder
Senior Boarder
Posts: 40
Joined: Sat Jan 24, 2015 8:13 am

Re: Alarm to email me when sensor reports no new data

Post by crazyace »

My alarm to notify me when no good data is working however I have outdoor and indoor sensors. Is there a way to specify lastgooddata for only the outdoor rain, wind, etc sensor?
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7874
Joined: Mon Oct 01, 2007 10:51 pm

Re: Alarm to email me when sensor reports no new data

Post by admin »

No, will check if there is an easy way to add this.
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7874
Joined: Mon Oct 01, 2007 10:51 pm

Re: Alarm to email me when sensor reports no new data

Post by admin »

Did incorporate this in the update just released.

Please also read here about features of todays update: http://meteobridge.com/wiki/index.php/Forum
crazyace
Senior Boarder
Senior Boarder
Posts: 40
Joined: Sat Jan 24, 2015 8:13 am

Re: Alarm to email me when sensor reports no new data

Post by crazyace »

Awesome... Thank You!
Post Reply