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

Duplicate records in month file - rain value wrong

Discussion and questions about Cumulus weather station software version 1. This section is the main place to get help with Cumulus 1 software developed by Steve Loft that ceased development in November 2014.
Post Reply
vildan
Posts: 4
Joined: Mon 03 Nov 2014 9:03 am
Weather Station: VP2+
Operating System: Win Server 2008 R2
Location: Nyeri, Kenya

Duplicate records in month file - rain value wrong

Post by vildan »

Hi Steve!

Today I found my reported rain was too high. (http://www.wunderground.com/personal-we ... ICENTRAL42)

On investigating the month file (Nov14log.txt), from today at 09.00 it has duplicate records and each duplicate pair has on "real" rainfall recorded and one very high value. Below is an extract from the file:

Code: Select all

03/11/14,08:45,18.6,79,14.9,0.9,3.6,166,0.0,10.0,1013.62,490.6,33.9,32,0.9,18.6,18.6,3.3,694,0.08,1043.60,19.5,602,1.9,184,0.0,10.0
03/11/14,08:50,18.7,79,15.0,0.7,3.6,165,0.0,10.2,1013.62,490.8,33.4,31,0.4,18.7,18.7,1.7,241,0.08,1043.60,19.8,625,1.9,150,0.0,10.2
03/11/14,08:55,18.7,78,14.8,0.7,3.1,140,0.0,10.2,1013.65,490.8,32.1,32,1.3,18.7,18.7,1.7,248,0.08,1043.60,19.8,647,1.9,87,0.0,10.2
03/11/14,09:00,18.5,78,14.6,0.8,3.1,126,0.0,10.2,1013.72,490.8,30.8,34,0.9,18.5,18.5,1.5,241,0.08,1043.60,19.4,668,1.9,130,0.0,10.2
03/11/14,09:05,18.4,79,14.7,1.2,2.7,123,0.0,142.7,1013.72,623.3,30.0,36,0.4,18.4,18.4,2.5,930,0.30,1043.80,19.0,689,1.9,126,0.0,142.7
03/11/14,09:05,18.4,79,14.7,0.9,3.1,123,0.0,10.2,1013.72,490.8,30.0,36,0.9,18.4,18.4,2.5,930,0.30,1043.80,19.3,689,1.9,126,0.0,10.2
03/11/14,09:10,18.5,77,14.4,1.2,2.7,134,0.0,143.0,1013.75,623.6,30.0,36,2.2,18.5,18.5,1.7,227,0.30,1043.80,19.1,710,1.9,134,0.0,143.0
03/11/14,09:10,18.5,77,14.4,1.0,3.1,132,0.0,10.4,1013.75,491.0,30.0,36,1.8,18.5,18.5,1.6,227,0.30,1043.80,19.2,710,1.9,132,0.0,10.4
03/11/14,09:15,18.3,78,14.4,1.3,3.6,132,0.0,143.0,1013.68,623.6,29.2,37,0.9,18.3,18.3,4.4,949,0.30,1043.80,18.8,730,1.9,106,0.0,143.0
03/11/14,09:15,18.4,78,14.5,1.2,3.6,132,0.0,10.4,1013.68,491.0,29.2,37,0.9,18.4,18.4,4.4,949,0.30,1043.80,19.0,730,1.9,106,0.0,10.4
03/11/14,09:20,18.4,77,14.3,1.8,3.6,137,0.0,143.0,1013.72,623.6,30.0,37,0.4,18.4,18.4,2.5,276,0.30,1043.80,18.5,750,2.0,117,0.0,143.0
03/11/14,09:20,18.4,77,14.3,1.7,3.6,136,0.0,10.4,1013.72,491.0,30.0,37,0.9,18.4,18.4,2.5,276,0.30,1043.80,18.6,750,2.0,117,0.0,10.4
03/11/14,09:25,18.5,80,15.0,1.6,3.6,133,0.0,143.0,1013.72,623.6,30.0,38,1.3,18.5,18.5,2.3,290,0.30,1043.80,19.0,770,2.0,178,0.0,143.0
03/11/14,09:25,18.5,80,15.0,1.6,3.6,134,0.0,10.4,1013.72,491.0,30.0,38,1.3,18.5,18.5,2.3,290,0.30,1043.80,19.0,770,2.0,178,0.0,10.4
The duplicates are still being recorded after restart of cumulus. I am using v1.9.4 (build 1098).

Cumulus is communicating with the VP2 console through a 6555 Davis WeatherLink IP. Console is showing correct rain amount.

Do you have any idea of what might be going on?

Thanks for any assistance!
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: Duplicate records in month file - rain value wrong

Post by steve »

One explanation would be that you have more than one instance of Cumulus running. If you zip up the diags folder and attach it, I'll take a look.
Steve
vildan
Posts: 4
Joined: Mon 03 Nov 2014 9:03 am
Weather Station: VP2+
Operating System: Win Server 2008 R2
Location: Nyeri, Kenya

Re: Duplicate records in month file - rain value wrong

Post by vildan »

Thanks a lot!

There were two instances running :oops:

I might have started a second instance by mistake while logged in remotely from phone.

At my location there are multiple power cuts per day and the network is not yet fully on UPS. To avoid connection errors with Cumulus, I run the following batch file every 15 minutes:

Code: Select all

@echo off
set INTERVAL=15
set ipaddr=192.168.1.78
set killed=no
:loop
ping -n 1 %ipaddr%
if %errorlevel%==1 (
  set state=down
  if %killed%==no (
    set killed=yes
    echo.closing cumulus
    taskkill /im cumulus.exe
  )
  timeout %INTERVAL%
  goto :loop
)
if %killed%==yes (
  if %errorlevel%==0 (
    set state=up
    echo starting cumulus
    C:\Cumulus\cumulus.exe
  )
)
@echo on
If you do not mind me asking, could the above code be able to start a second instance without always killing the first?

Thanks again!

Daniel
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: Duplicate records in month file - rain value wrong

Post by steve »

I'm afraid I'm not very knowledgeable when it comes to DOS batch files. It's possible that there are some circumstances where the taskkill command was not able to fully close Cumulus, depending on what it was doing at the time (e.g. it may have been inside system code doing a web update or whatever). I'm assuming you don't have 'confirm shutdown' set?
Steve
User avatar
mcrossley
Posts: 12756
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Duplicate records in month file - rain value wrong

Post by mcrossley »

Why not check if Cumulus is running before attempting to start it?

tasklist /FI "IMAGENAME eq cumulus.exe" 2>NUL | find /I /N "cumulus.exe">NUL
if "%ERRORLEVEL%"=="0" echo Cumulus is already running
vildan
Posts: 4
Joined: Mon 03 Nov 2014 9:03 am
Weather Station: VP2+
Operating System: Win Server 2008 R2
Location: Nyeri, Kenya

Re: Duplicate records in month file - rain value wrong

Post by vildan »

Thanks guys!

Steve,
"confirm shutdown" is not set. I have tried setting "restart if data stops" but it does not seem to have any effect when connection is TCP/IP. The connection error dialogue stays active and Cumulus does not restart.

mcrossley,
I will include your suggested "running check", thanks a lot.

Would taskkill /f be a sure way of killing a process? (to overrun Steve's suggested possibility of not being able to kill the process because it is busy doing something)
User avatar
mcrossley
Posts: 12756
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Duplicate records in month file - rain value wrong

Post by mcrossley »

Using /f should always stop Cumulus, but it would not allow Cumulus to close down gracefully, you may end up with corrupt files if it was mid update (?Steve?).

You could try a graceful stop, wait a minute, if Cumulus is still running, then force a kill.
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: Duplicate records in month file - rain value wrong

Post by steve »

vildan wrote:"confirm shutdown" is not set. I have tried setting "restart if data stops" but it does not seem to have any effect when connection is TCP/IP. The connection error dialogue stays active and Cumulus does not restart.
Do you mean the dialogue that appears when Cumulus first tries to connect when it starts up? I don't think it displays a dialogue after that (but I don't have a WLIP so have never been able to test this code myself properly). If so, then the 'restart if data stops' setting doesn't come into play at all, as data hasn't started, hence can't be regarded as having stopped. The main idea behind that setting is to prevent Cumulus carrying on logging the same data if it's not getting any new data. On the restart, if it can't connect again, it just stops and hence no further duplicate data is logged.

If it gets an error while reading data using a TCP/IP connection, and can't reconnect, it should close itself down. But it depends on how the Davis DLL handles the situation and what errors it passes back to Cumulus.

Mark: yes, it's possible that an 'untidy' closedown might cause data corruption.
Steve
vildan
Posts: 4
Joined: Mon 03 Nov 2014 9:03 am
Weather Station: VP2+
Operating System: Win Server 2008 R2
Location: Nyeri, Kenya

Re: Duplicate records in month file - rain value wrong

Post by vildan »

My apologies Steve,

If i set "restart if data stops" Cumulus does restart one minute after IP connection is unplugged. Cumulus takes a few seconds to restart and, with IP connection still unplugged (or, IRL, network without power), displays "Error -32701 while trying to initialise the connection. Please check your connections and settings." Cumulus stays in this state until manually restarted.

Since my power cuts usually last longer than 1 minute, the result is that the error message stays active and I erroneously concluded that no restart has been made, even after several hours. Again :oops:

I believe that the batch script will work for me by doing a "manual" restart if data connection has been lost and then reestablished (checked by pinging the console).

Since I installed the script I have very few errors (always -32701) but on occasion I receive error messages from wunderground saying my station stopped reporting 2 hours ago. I have still not found the reason for this but I will continue in my search.

Thanks to you and to Mark for your help.
glennpm
Posts: 55
Joined: Sat 17 Dec 2016 1:31 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 10
Location: Wiscasset, Maine USA

Re: Duplicate records in month file - rain value wrong

Post by glennpm »

Hi Vildan,

I am having a similar problem with power outages. Once power is out, MX will not restart. When I restart it manually, the historical, archive data is not being read correctly or piecemeal. An example was yesterday morning when power was lost after midnight. I restarted MX, it said that the archive was being read, but the low temperature for the day which occurred two hours earlier, was not recorded. The Today and Yesterday readings are now wrong.

I am running Meteobridge. It picks up the Davis Vantage Vue data and wirelessly transmits it to the weather sites. When I connect MX it is also a wireless connection through Meteobridge. Weatherlink 6.3 read the archive data and displayed the low temperature correctly by the way.

I would like to try your script. Could you please post here the version you are now using? Are you running the bat file as a scheduled task In Windows 7 or how please?

Glenn
Post Reply