Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Thoughts on Error Handling.

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
Phil23
Posts: 888
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Thoughts on Error Handling.

Post by Phil23 »

Hi All,

In particular @mcrossley,

Following my recent issue I posted I'm wondering what error handling could be added to MX.

First that comes to mind, is adding a single line to the MX DOS Console under the words Running Normally,
maybe just a simple Errors Have Occured.

Second thought would be an Alarm Light on the Interface Dashboard.

Third idea, which appeals to me personally, is;

External Command to Run after "X" number of errors.

In my own case I'd use that to launch on of my favorite little utils, Swithmail…
https://www.tbare.com/software/swithmail/

A Simple CLI program that could send me a notification email.
(And has a GUI that can be used to generate either an XML file with the message details or the full command line,

Code: Select all

C:\Swithmail.exe /S CmxError.xml
Only other condition with the above, would be the frequency with which the External Command would be executed.
For the above case I think just once would be sufficient/mandatory????

Cheers

Phil
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Thoughts on Error Handling.

Post by mcrossley »

Yes, MX does even have a web tag for last error, but it isn't used at the moment. The problem becomes what to classify as an error. There are probably a thousand ways it can go wrong, some are handled silently, some with a debug message, some with a full message, some stop things working some don't, and some still crash the whole thing! It would be a big job to search through all the code and decide what to do at each failure point.

There is already the Data Stopped alarm you could use that flags Cumulus has stopped getting any valid data.
Phil23
Posts: 888
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: Thoughts on Error Handling.

Post by Phil23 »

It's mainly failures to upload I'd like to catch.

I did have an idea of thinking outside the box & writing a script to run on one of my servers.

My Initial thought was it would do this:-

Periodically download a copy of index.htm from the site.
Do a file compare with the local copy.
If different, trigger a notification email.

Basic & not covering all scenarios, but flawed from the start as the uploaded files all have an extra <CR>'s added to the end of each line.

I did try & get my head around why the remote file had the extra <CR>'s, but didn't get far with that.

Anyone else got suggestion on how to take this fort of external approach?


Phil.
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Thoughts on Error Handling.

Post by HansR »

Check file date/time to whether is has actually uploaded/downloaded? May that help?

And the <CR> probably is inserted by the upload. The server is probably Unix and the Windows <CR><LF> may be changed to <CR> only. EOF is also a typical thing. Maybe your tool replaces that with a <CR>. Files are changed during upload/download.
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
Phil23
Posts: 888
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: Thoughts on Error Handling.

Post by Phil23 »

Firstly,

I don't mind if I need to make another simple file like WatchDogT.txt & process & upload it; It could just contain time & Date....

But I'm open to suggestions on what to use as a simple compare tool to check a downloaded copy every hour against the one sitting locally.

Just a simple tool that would return an error code of files different & could be run from within a batch file.

Task Scheduler could then run that on another Server.

If the Weather PC was down, the util might even return a different error level for specified file not found
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Post Reply