Notification when weather station is down?

Hi there,

Sorry if this is the wrong forum section for this question :oops:

I was wondering if anyone has any suggestions for monitoring a website to get an email notification when weather data is not updating?

I run WD on an old mac mini with no monitor so when something goes wrong I’m often not aware of it for several days, it would really nice if I could somehow get notified when there’s a problem.

Cheers!
Bruce

I don’t know of any pre-made facility to do this. You could check on your server to see if they have anything which might do this.

The way I would do it is to write a script which would check for a particular file changing, say clientraw.txt, and if it had not changed in say 2 minutes send myself an email. I would set this up as a cron job on the server to run every 2 minutes.

Stuart

I developed a small script that flags my main weather page when ever the site is down, noting that the weather updates are offline. I posted an associated explanation on the status page New Milford, CT Weather - Station Status .
We have frequent power outages and/or internet disruptions.
While this won’t notify you at least viewers will be aware some of the information is stale.

Theres a script called flatline check, I’ve used it for years, basically if it send me an email then there’s an issue on the pc, do set the parameters too low though cause eif it’s foggy, you will get false alarms, check the script here
https://jcweather.us/scripts.php

There are also a few things on the PC/laptop to make it easier if WD locks,crashes or looses connection.

  1. Go to Setup > Advanced/Misc Settings > Program tab > Third tick box on the left “Reboot computer when no comport data received for 10 minutes” also “Restart WD instead of reboot”
  2. On the same window as above but 7th tick box down “Run WDwatch.exe (checks for crashes of WD)”
    [li]Download & run StartWatch to monitor all your software. If it detects a lockup or crash, it will restart that software. Also good for automatically starting all your software after a power failure. I have my WX PC set to boot when it detects power and StartWatch is set to run on Windows start up.

I run that too but it doesn’t alert to you any issues not WD related, sometimes my ip changes when I reboot my router, this in turn can ban my new ip on my server, thus no further updates, that flatline check script does the job every time.

It also helps to have WD reboot regularly, this helps to keep things fresh even if there’s no problems

Thanks all for the helpful replies, I’ll have a play with some of these suggestions today :slight_smile:

I had WD set up to restart at the same time every day. Took care of a lot of issues.

Do you also Teamviewer in?

As a great alternative, I use googles own remote desktop, its an extension for the Chrome browser and an Android app and has worked great for me over the years

Hi Bashy
I have tried to use that flatline script with no luck as it says error on line 35. I also have emailed Jim at jcweather with no reply as yet, so cant get it working…Damn… :frowning: :frowning: :frowning:

flatline didn’t work for me until I edited “flatline-status.txt” and replaced the help text with a single “0”

Hmmm strange
I changed the file and it still didnt work, so downloaded the script again from JC weather and it had different values in line 35, so now it works, so will have to wait and see if it sends an email when WD is down.

Thanks

I haven’t received any emails about this script, so please don’t think I’m ignoring you. As far as I know, the .zip file copy works fine. I don’t know what is meant by “help text” so I don’t think that refers to this script. - Jim

Hi Jim
I did send a request via the contact us from your website.
When i downloaded the script it had 59999 in line 35 and after a new download it had changed and all works now, just got to wait and see if I get an email.
I think that the help text that is refurred to is the line that was in the text file. If you remove this and just put a 0 it all works.

Thanks for the script.

I don’t know your website, but should you use the brilliant Leuven Template, as I do, you could do it like this…
The Leuven Template has a built in Status Page, which says whether or not the weather data is ‘current’.
I use (a free plan over at) UptimeRobot.com to check my own weather website status page for a keyword. If UptimeRobot sees ‘NOT CURRENT’ on my Status Page, it triggers an alarm (both e-mail and UptimeRobot-app). This way I get an alarm if just WD is down, the entire machine WD runs on is down, or when there are FTP problems :smiley:

If there is a specific text being displayed on your website when the weather data is stale, I suppose you could use the keyword functionality of UptimeRobot here as well, so you actually would get a notification.

Thanks, I misread your post. I just did a test and see what you saw, that problem has been there for awhile so thanks! I’ve updated flatline-status.txt in the .zip now for future users.

swright1957, your flatline-status.txt is showing “1642670088,3.9,85,1035.5,0.7,1.7, active 01-20-22 9:14 am”, so yours is operating correctly.

Sorry for the problems this has caused. - Jim

Hi Jim,

I just downloaded your zip file. Thank you for the share!

I noticed that your script update messages at the very top doesn’t include any recent fixes. I just wanted to be sure that I’ve got the corrected version.

Regards,
Michael

Michael,

Thanks, I’ll note that now. Since there were no changes in the PHP code, it got overlooked. Good catch. - Jim

You could, instead of uptimerobot, use an app on your phone (android not sure if ios has one) that’s called Web Alert XP (paid for version), this does the same and is what i use for instant rain alert. I will explain further.

I have a davis Leaf wetness sensor, btw any other station leaf sensor will work for this.
My sensor goes from 0.1 to 15.
I created a new page using wd, internet file creation and uploads / setup page 2 / file #26 that has just the leaf sensor data as shown here https://brecklandweather.com/wx18.html
Then using that app Web Alert XP (very configurable), it monitors that page for any change, so as soon as it goes to 0.2 or higher i get an instant notification. Ive also set to so if it starts to go back down i get another alert to say it might be stopping and a 3rd alert if it goes back to 0.1 to say its stopped. Handy to know if i can let the dogs out lol

The above will work for any station leaf or no leaf, it can be based on the rain bucket but that’s not a great alarm to be fair as it takes a while for the 1st tip.

You can use it for other purposes to, that file creation is a really useful tool, i use it for my Alexa skill, i have created many single data pages lol

Sorry, i didn’t get an alert about this message, glad ya got it working though, just don’t set the parameters too low, i still get flatline alerts when its foggy and other data doesn’t change for a while but i can live with that because its saved my bacon many times over the years, through me not paying attention, like rebooting the machine and walking away only to find my USB drive many the reboot hang, of the router IP address changed when i rebooted the router and my servers firewall blocked the IP dies to too many connections, and many more reasons i cant think of :slight_smile: