Page 1 of 1

Email notification when no update

Posted: Thu 06 Sep 2018 4:46 pm
by vpokroglo
Hello. Is there any script for raspberry pi, which is monitoring if cumulus is working correctly. Many times i get lost signal to weather station or cumulusMX doesn't get data for some other reason. Most often I must restart RPI to get it working back. So if i do not check my website time to time i lost many data, so an email notification when no data from station would be fine.
Now i am curious how are you dealing with this problem? Target files are realtime.txt and CUtags.php.

Thanks.

Re: Email notification when no update

Posted: Sat 15 Sep 2018 9:28 am
by BigOkie
The title of the post is for something else (although for you it might also be helpful) but further into the thread I discuss how to handle this. Make sure you read the whole thread before you invest in working it though. Some valuable evolution to the method used for this happens during it.

https://cumulus.hosiene.co.uk/viewtopic.php?f=27&t=15574

Re: Email notification when no update

Posted: Mon 24 Sep 2018 7:10 pm
by ExperiMentor
Instead of just getting an email, this should automatically restore the Pi even if you're not there!

Try the following - just make your Raspberry Pi reboot each day, or amend to make it reboot every few hours depending on what is needed. You should investigate and fix whatever is making it crash though.

To make Cumulus run each time the Pi is rebooted (and force reboot in the early hours each day)
On the Pi, type:

Code: Select all

sudo crontab -e
On first run select the text editor you prefer (defaults to #2, nano)
Then add the following lines at the end of the file:

Code: Select all

# Start Cumulus as background task 30s after reboot (delay to allow WiFi to startup)
@reboot (sleep 30;cd /home/pi/CumulusMX;sudo mono CumulusMX.exe) &

# Reboot each day at 0253
53 02 * * * sudo reboot
If you want to access the Pi without Cumulus running, simply log in, then sudo crontab –e, then add # before @reboot so that that line is ignored ‘commented out’. Then sudo reboot. Remove the # again for normal operation.