Welcome to the Cumulus Support forum.

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

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 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

MX 3028 - No station re-connect? And Linux ttyUSBx issues

Topics about the Beta trials up to Build 3043, the last build by Cumulus's founder Steve Loft. It was by this time way out of Beta but Steve wanted to keep it that way until he made a decision on his and Cumulus's future.

Moderator: mcrossley

Locked
Mark_A
Posts: 25
Joined: Sun 07 Apr 2013 10:54 pm
Weather Station: Davis VP2 with Vue console
Operating System: Win 10 64 bit and Ubuntu
Location: Grass Valley, California

MX 3028 - No station re-connect? And Linux ttyUSBx issues

Post by Mark_A »

I'm finding the if CumuluxMX loses the connection with the wx station (Davis VUE console in my case, direct USB connection on a Linux Ubuntu laptop) that it continues to log the last read data to local files over and over AND transmits the same to any online services (Weather Underground, CWOP on mine). This result in a big flat-line of the same values/data until a CumulusMX restart. I've had this happen twice now and didn't notice it for several hours.

On restarting CMX the archived data stored in the console is successfully downloaded, but doesn't seem to overwrite the flat-line data from the previous several hours.

When this happened the first time I deleted the bad entries from my local Aug15log.txt before restarting CumulusMX. This allowed the archived data from the console to get written again to the Aug15log.txt file after I restarted CMX and it retrieved the data from the console. I forgot to do this when this happened yesterday, so still had the flat-line data in my local data file after archive retrieval from the console. And I'm guessing that because the local file didn't have any new data, this must be why Weather Underground didn't get the new data either.

It also appears that CMX does not attempt to re-connect after the station console connection is lost. My weather console is usually connected to /dev/ttyUSB0 on this Linux machine, and is what WAS set in my Cumulus.ini file for the port setting. I found that if I plugged or unplugged some particular devices into another USB port that for whatever reason, this machine re-mapped my Davis console connection to /dev/ttyUSB1 on-the-fly. This is what happened on instance one of this. After some research I found that I could create a symlink to whatever port the console ended up at, which makes it so I can use that symlink in Cumulus.ini for com port (Cumulus does see it), which I hoped would solve all this, but without any station reconnect attempts data collection stops and I end up with the flat-line data over and over.

And last night I had a power outage. The weather station and the DSL modem are on a battery backup. Since this Linux laptop is a temporary test for MX for me, it's just plugged into the wall and has an internal battery. During some of the switches to main-power, battery-backup to house-generator last night, the USB ports on the laptop were dancing around (stopping and restarting) -- I'm not sure why. The new symlink didn't make a difference as there didn't seem to be any reconnect attempts from MX to the weather station. MX just stopped collecting data and kept logging and re-sending the same data over and over.

Have I overlooked anything? Any ideas to solve the lack of reconnect attempts?

For anybody interested, here's how I created the symlink for ttyUSBx:
http://hintshop.ludvig.co.nz/show/persi ... l-devices/
and
http://superuser.com/questions/212443/l ... usb-device

EDIT (I forgot the log entries in the first draft):

Code: Select all

2015-08-19 20:30:00.489 Updating CWOP
2015-08-19 20:30:01.364 WU Response: OK: success
2015-08-19 20:30:53.597 Reading reception stats
2015-08-19 20:31:00.488 Writing log entry for 8/19/2015 8:31:00 PM
2015-08-19 20:31:00.488 Written log entry for 8/19/2015 8:31:00 PM
2015-08-19 20:31:00.489 Writing today.ini, LastUpdateTime = 8/19/2015 8:31:00 PM raindaystart = 22.62 rain counter = 22.62
2015-08-19 20:32:00.489 Writing log entry for 8/19/2015 8:32:00 PM
2015-08-19 20:32:00.490 Written log entry for 8/19/2015 8:32:00 PM
2015-08-19 20:32:00.491 Writing today.ini, LastUpdateTime = 8/19/2015 8:32:00 PM raindaystart = 22.62 rain counter = 22.62
2015-08-19 20:32:31.509 Reading reception stats
2015-08-19 20:33:00.491 Writing log entry for 8/19/2015 8:33:00 PM
2015-08-19 20:33:00.491 Written log entry for 8/19/2015 8:33:00 PM
2015-08-19 20:33:00.492 Writing today.ini, LastUpdateTime = 8/19/2015 8:33:00 PM raindaystart = 22.62 rain counter = 22.62
2015-08-19 20:33:59.109 System.IO.IOException: Input/output error
  at System.IO.Ports.SerialPortStream.ThrowIOException () [0x00000] in <filename unknown>:0 
  at System.IO.Ports.SerialPortStream.get_BytesToRead () [0x00000] in <filename unknown>:0 
  at System.IO.Ports.SerialPort.get_BytesToRead () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.Ports.SerialPort:get_BytesToRead ()
  at . (Int32 ) [0x00000] in <filename unknown>:0 
2015-08-19 20:33:59.110 Reading reception stats
2015-08-19 20:33:59.110 System.IO.IOException: Input/output error
  at System.IO.Ports.SerialPortStream.ThrowIOException () [0x00000] in <filename unknown>:0 
  at System.IO.Ports.SerialPortStream.DiscardInBuffer () [0x00000] in <filename unknown>:0 
  at System.IO.Ports.SerialPort.DiscardInBuffer () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.Ports.SerialPort:DiscardInBuffer ()
  at . (System.IO.Ports.SerialPort ) [0x00000] in <filename unknown>:0 
2015-08-19 20:33:59.111 System.IO.IOException: Input/output error
  at System.IO.Ports.SerialPortStream.ThrowIOException () [0x00000] in <filename unknown>:0 
  at System.IO.Ports.SerialPortStream.DiscardInBuffer () [0x00000] in <filename unknown>:0 
  at System.IO.Ports.SerialPort.DiscardInBuffer () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.Ports.SerialPort:DiscardInBuffer ()
  at . (System.IO.Ports.SerialPort ) [0x00000] in <filename unknown>:0 
System.IO.IOException: Input/output error
  at System.IO.Ports.SerialPortStream.ThrowIOException () [0x00000] in <filename unknown>:0 
  at System.IO.Ports.SerialPortStream.DiscardInBuffer () [0x00000] in <filename unknown>:0 
  at System.IO.Ports.SerialPort.DiscardInBuffer () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.Ports.SerialPort:DiscardInBuffer ()
  at . (System.IO.Ports.SerialPort , System.String ) [0x00000] in <filename unknown>:0 
  at . () [0x00000] in <filename unknown>:0 
  at System.Threading.Thread.StartInternal () [0x00000] in <filename unknown>:0 
2015-08-19 20:34:00.492 Writing log entry for 8/19/2015 8:34:00 PM
2015-08-19 20:34:00.493 Written log entry for 8/19/2015 8:34:00 PM
2015-08-19 20:34:00.494 Writing today.ini, LastUpdateTime = 8/19/2015 8:34:00 PM raindaystart = 22.62 rain counter = 22.62
2015-08-19 20:35:00.494 *** Data input appears to have stopped
2015-08-19 20:35:00.494 Writing log entry for 8/19/2015 8:35:00 PM
2015-08-19 20:35:00.495 Written log entry for 8/19/2015 8:35:00 PM
2015-08-19 20:35:00.496 Writing today.ini, LastUpdateTime = 8/19/2015 8:35:00 PM raindaystart = 22.62 rain counter = 22.62
2015-08-19 20:35:00.615 WU Response: OK: success...
Thanks.
Mark_A
Posts: 25
Joined: Sun 07 Apr 2013 10:54 pm
Weather Station: Davis VP2 with Vue console
Operating System: Win 10 64 bit and Ubuntu
Location: Grass Valley, California

Re: MX 3028 - No station re-connect? And Linux ttyUSBx issu

Post by Mark_A »

Maybe answering part of my own question here, but I re-read the docs/wiki and see there is the "RestartIfDataStops=1" setting in Cumulus.ini which should in theory help this, but I also see in the MX "things left out of MX" thread, that this is listed as missing in MX. I set it and then unplugged the USB cable from the laptop and CumulusMX immediately crashes with an IO error.

Since we're running as root (sudo) in Linux I suppose the restart may be more difficult, but perhaps some kind of reconnect attempt when data comms are lost, without restarting the whole app if possible(?).

Thanks.
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: MX 3028 - No station re-connect? And Linux ttyUSBx issu

Post by steve »

With Cumulus 1, when I have tried to do reconnects without a full restart of Cumulus, it has never seemed to work (which is why the 'restart' options exist, as a work around). But it's something I can possibly look into at some point in MX.
Steve
User avatar
pete_c
Posts: 228
Joined: Wed 12 Oct 2011 11:22 pm
Weather Station: Davis Vue-Pro2 - Fine Offset
Operating System: W2003-XPSP3-Linux
Location: Time Traveler

Re: MX 3028 - No station re-connect? And Linux ttyUSBx issu

Post by pete_c »

Here I have not seen that issue with my Cumulus MX running on the RPi2 with the Davis consoles.

I did have one issue with a non synced download timing thing via the buffered cable.

I am uploading to WUN, CWOP, mySQL and my internet website with the CumulusMX software sitting in the /CumulusMX directory. I also run Webmin on the RPi2 as it purely run headless. Everything is run by root (not sudo in my case). I have to date not unplugged the network or Davis Console cable to see what happens. I have had power glitches and those have not caused an issue. A cold power off had not dinged it.

=======
I am in to automation and have migrated now to using Linux Ubuntu 14.40 64 bit for my automation server which has multiple serial / USB hardware connections / USB 3.0 / USB 2.0 stuff. I also run same software a bit lighter on an RPi2. I have only seen weird power issues on the RPi2 with power sucking devices off of the RPi2 USB ports.

The automation software runs in Ubuntu 14.04 64 bit Mono. I do also run a Wintel server VB concurrently talking to other automation hardware connected to the mothership. Historically and I cannot recall now but had a multiple port ttyUSB issue which I thought at the time was related to some Mono issue. The raw hardware ttyUSB was seen just fine in a command line. Something odd (note this is relating to automation software running on whatever flavor (soup du jour) of Mono. It was simply that the software running in mono had issues running with more that one ttyUSB port and would seemingly change in the software which didn't make any sense to me. Relating to the automation software it was just an update and methodology of mono use that fixed me. Rather here too not a symlink but configured a check of the specific hardware port for certain devices which was a PITA to do with multiple ports. Today using two Digi Edgeports on the automation server with 16 serial ports connected to one Digi USB powered hub. Looks to be fine these days chit chatting. ( I can abend the mono Z-Wave software running though by disconnecting the hardware while its scanning the network or doing whatever - it doesn't come back unless I do a warm/cold restart).

=======

All said I have switched from using the Davis console buffered USB cable to the console buffered serial cable and whatever USB to Serial cable I had sitting around. (IE the RS-232 cable cable be moved to a nearby Quatech 4 port serial server for failover to Wintel Cumulus 1 if need be).

Curious what other USB devices are you plugging in to your Ubuntu laptop?

Here do not hot plug or remove any USB devices concurrent to the RPi2 running. (but do not use any anyways). I have not seen any flippant USB / ttyUSB changing though on my automation server. (stay statically configured on warm/cold boots). Here while typing on my laptop I do see sometimes that the network switches when I open the laptop to see the LCD screen to one of 4 statically configured WLAN / LAN connections even though I am using MAC DHCP reservation for the static IPs. (well too sometimes the bluetooth kicks on even though it is off).

Geez now in the last two days my Fine Offset stuff keeps shutting down. I do not know what it is. Remotely everything has looked fine. Might be the batteries in the Fine Offset tablet. I have only rebooted it to get it working as I cannot reach over 2000 miles right now to change the batteries (what a PITA that is).

I cannot offer much other than trying an RPi2 CumulusMX & Davis Console network cold disconnect / console disconnect cable thing while it is running and having a look see if or what it does in the diagnostic logs here.
- Pete
Automator
Locked