Page 1 of 1

CumulusMX backend crashes if weather station's USB is unplugged

Posted: Fri 07 Sep 2018 10:41 am
by martinu
While I'm comparing Cumulus 1 on my Windows PC and CumulusMX on Linux, I'm swapping the USB cable between the two, being careful to do so between the 10-minute updates the log files. It's a shame the USB doesn't allow you to tee a connection so it can feed two computers :-)

I've noticed that if I unplug the USB lead from the Linux (Ubuntu 18.04) PC without stopping the backend, it produces various error messages which seem to imply that it has crashed and needs to be restarted. Now loss of data feed is pretty catastrophic, but should the backend be able to handle this a bit more gracefully?

I've attached an MXdiags.zip file. The on-screen error message is in error-msg.txt. The relevant log file is 20180906-201349.txt; ignore the later ones.

It would be nice if the backend would carry on running and resume accepting data if the USB cable fault was rectified. In the real world, and not during testing, it might be caused a momentary disturbance of the cable, and it would be a shame if this required the backend to be restarted.


I notice that you've closed the thread "things in Cumulus 1 that you'd like in CumulusMX", so I'll take the opportunity here to mention a couple of things that I'd like to see:

Dashboard: display of inside temp and humidity; display of moon phase graphic (likewise for the graphic on the "Now" web page); "error" and "new record" lights and pages; station and remote sensor voltage - the latter at least shows "OK" or "LOW" for a Davis Vantage Vue remote unit to show that its battery is getting low and needs replacing.

Graphs: separate graph for inside temperature, so the outside temp graph doesn't re-scale itself when the "inside" trace is turned on (and also so small variations in inside value aren't masked by a reduced scale that accommodates both inside and outside); some form of thumbnail graphs at the bottom of the graphs page to give a quick overview of all the parameters, no mater which one is being displayed in detail; ability to customise colours and/or weight of trace lines on a graph to make one trace (eg normal outside temperature) stand out better from derived values such as dew point and wind chill.

Configuration of USB device in frontend: for the Linux installation, it might be useful if the default value for the device was something like "/dev/ttyUSB0" rather than COM1. If that's not possible because it's a single installation for all platforms, maybe mention this in tooltip help text, and the need to run dmesg to determine the correct value - and (the thing that caught me out!) the need for the "/dev/" prefix.

Re: CumulusMX backend crashes if weather station's USB is unplugged

Posted: Fri 07 Sep 2018 11:56 am
by ConligWX
AFAIK Cumulus is not designed to have the USB lead pulled out. (full stop) - It's a 24/7 application.

asking for future changes may not happen. Steve has retired and enjoying life.

As for help, there is plenty of helpful users in the forums, along with the wiki and FAQ's to get people setup.

Re: CumulusMX backend crashes if weather station's USB is unplugged

Posted: Fri 07 Sep 2018 12:57 pm
by martinu
Toxic17 wrote:asking for future changes may not happen. Steve has retired and enjoying life.
Ah, I hadn't realised that Steve had retired and that he'd been through a family crisis.

Many thanks Steve for all your work on Cumulus over the years.

Re: CumulusMX backend crashes if weather station's USB is unplugged

Posted: Fri 07 Sep 2018 1:46 pm
by steve
It’s unlikely that I’ll ever do any changes to the MX user interface. One of the reasons for doing it the way it’s done (using HTML and JavaScript) is that it can be modified and tailored without any changes from me. I will however look at adding items to the API if they are not already there, to facilitate the tailoring of the UI. And of course, the API needs documenting.

I spent a lot of time when developing Cumulus 1 trying to handle stations being deliberately unplugged and it proved quite difficult so that’s not something I want to spend any more on, given there are other things which are probably of higher importance.

The MX installation instructions and/or FAQ mention the need to configure the serial port differently on Linux.

Re: CumulusMX backend crashes if weather station's USB is unplugged

Posted: Fri 07 Sep 2018 3:39 pm
by dazza1223
dose that mean Steve you be bringing out a update off CumulusMX or you enjoying ur life to much??

Re: CumulusMX backend crashes if weather station's USB is unplugged

Posted: Wed 03 Oct 2018 3:28 pm
by ExperiMentor
martinu wrote:It would be nice if the backend would carry on running and resume accepting data if the USB cable fault was rectified. In the real world, and not during testing, it might be caused a momentary disturbance of the cable, and it would be a shame if this required the backend to be restarted.
I was asked why I have set my Raspberry Pi running CumulusMX to reboot itself once a day in the early hours. This is a good example of what that would help with. OK, so it crashes, but then at 0258 (even if I'm away on holiday) it will reboot and upload all the 10-minute-interval updates that my weather stationn has collected in the interim.

OK, it doesn't fix everything, but worth doing just in case