Today I had to stop CumulusMX for more than one hour. After I restarted CumulusMX the archived records were read and the Cumulus logfiles were being updated.
I am also using a MySQL database to log everyhing, but the MySQL database is not being updated.
Has anyone seen this behaviour?
Dinant
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
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
Archived records not stored in MySQL
Moderator: mcrossley
- steve
- Cumulus Author
- Posts: 26672
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: Archived records not stored in MySQL
Do you mean that you are using the built in facility in MX to log to MySQL when the monthly log file is updated? I'm fairly sure I added the code to do the updates from archive data, and I would have tested that it works. I'm on holiday at the moment and can't look at the code. If you zip up the MX diags folder and attach it, I'll try to take a look, but I may not be able to do it until I am home. You could look at the files yourself, it may be obvious what is going on.
Steve
-
Dinant
- Posts: 101
- Joined: Sat 17 Aug 2013 9:11 am
- Weather Station: Davis Vantage Pro2
- Operating System: Windows 2012 R2
- Location: Markelo
- Contact:
Re: Archived records not stored in MySQL
Yes, I am using the built-in MySQL facility.
After investigating the MXdiag file I may conclude the archived records are put into the MySQL database. There is only 1 record missing.
I think I pressed "Ctrl-C" when the MySQL update was busy. See logfile:
In the monthly logfile the entry 12:16 is present, but in the MySQL file it isn't!
The reason I thought archived records where not put into the MySQL database was the recent_graphic.php made by Mark from weather.wilmslowastro.com.
I am using that php/javascript script on my webpage. I attached the image recent_graph.png.
Realtime graphics at http://www.weerstation-markelo.nl/grafieken_recent.php
You see a gap between 12:14 and 13:42. The data from these records is omitted from the graph. In the MySQL database there is only 1 record at 12:16 missing.
Why is there a gap in the graphic? Those records (gap) are in the MySQL database. I have checked that.
Hopefully Mark will read this topic and maybe he can answer this question.
Dinant
After investigating the MXdiag file I may conclude the archived records are put into the MySQL database. There is only 1 record missing.
I think I pressed "Ctrl-C" when the MySQL update was busy. See logfile:
Code: Select all
2016-06-12 12:16:00.529 Writing log entry for 12-06-2016 12:16:00
2016-06-12 12:16:00.529 Written log entry for 12-06-2016 12:16:00
2016-06-12 12:16:00.529 Writing today.ini, LastUpdateTime = 12-06-2016 12:16:00 raindaystart = 276.6 rain counter = 276.6
2016-06-12 12:16:00.529 INSERT IGNORE INTO Monthly (LogDateTime,Temp,Humidity,Dewpoint,Windspeed,Windgust,Windbearing,RainRate,TodayRainSoFar,Pressure,Raincounter,InsideTemp,InsideHumidity,LatestWindGust,WindChill,HeatIndex,UVindex,SolarRad,Evapotrans,AnnualEvapTran,ApparentTemp,MaxSolarRad,HrsSunShine,CurrWindBearing,RG11rain,RainSinceMidnight,WindbearingSym,CurrWindBearingSym) Values('16-06-12 12:16',18.8,76,14.5,3.2,8.0,176,0.0,0.0,1009.04,276.6,27.2,46,4.8,18.8,18.8,0.0,0,0.00,0.00,19.6,852,0.0,196,0.0,0.0,'Z','ZZW')
Exiting system due to external CTRL-C, or process kill, or shutdown
2016-06-12 12:16:05.232 Cumulus closing
2016-06-12 12:16:05.295 Writing Cumulus.ini file
2016-06-12 12:16:05.342 Closing connection
2016-06-12 12:16:05.342 Station stoppedThe reason I thought archived records where not put into the MySQL database was the recent_graphic.php made by Mark from weather.wilmslowastro.com.
I am using that php/javascript script on my webpage. I attached the image recent_graph.png.
Realtime graphics at http://www.weerstation-markelo.nl/grafieken_recent.php
You see a gap between 12:14 and 13:42. The data from these records is omitted from the graph. In the MySQL database there is only 1 record at 12:16 missing.
Why is there a gap in the graphic? Those records (gap) are in the MySQL database. I have checked that.
Hopefully Mark will read this topic and maybe he can answer this question.
Dinant
You do not have the required permissions to view the files attached to this post.
- 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: Archived records not stored in MySQL
The real time data is only logged into MySQL when cumulus is 'live' running, cumulus will add data into the SQL log tables during the catch up, but does not update the real time data - there isn't any. I guess it could trigger the real time insert every time a log entry is added during catchup which would add a bit of the missing data. Steve would have to look into that though.
-
Dinant
- Posts: 101
- Joined: Sat 17 Aug 2013 9:11 am
- Weather Station: Davis Vantage Pro2
- Operating System: Windows 2012 R2
- Location: Markelo
- Contact:
Re: Archived records not stored in MySQL
The recent_graph.php is using the Monthly MySQL table (not the Realtime MySQL table) , isn't it?
I don't use the Realtime MySQL table at all and I have graphs shown!
I don't use the Realtime MySQL table at all and I have graphs shown!
- 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: Archived records not stored in MySQL
Oops, yes you are correct, it was too late last night - you are talking about the recent graphs not realtime.
So yes, that graph gets its data from the the monthly table.
If you say the data is in the table, then I have no idea why it is not being picked up. I'd really have to take a look at it and run the query manually. Are you sure the logged date/times are correct - no subtle differences?
edit: MX catch-up has worked OK for me in the past
So yes, that graph gets its data from the the monthly table.
If you say the data is in the table, then I have no idea why it is not being picked up. I'd really have to take a look at it and run the query manually. Are you sure the logged date/times are correct - no subtle differences?
edit: MX catch-up has worked OK for me in the past
-
Dinant
- Posts: 101
- Joined: Sat 17 Aug 2013 9:11 am
- Weather Station: Davis Vantage Pro2
- Operating System: Windows 2012 R2
- Location: Markelo
- Contact:
Re: Archived records not stored in MySQL
If I start the php script which gets the data from the MySQL database, it shows the data from the gap is not there. So it seems there is an error in the php script. The script is a copy of your realtimeLogSql.php script file. I cannot find the error in the script. Maybe you can find it. I'll send you a copy of the script tonight by PM.
Dinant
Dinant
-
Dinant
- Posts: 101
- Joined: Sat 17 Aug 2013 9:11 am
- Weather Station: Davis Vantage Pro2
- Operating System: Windows 2012 R2
- Location: Markelo
- Contact:
Re: Archived records not stored in MySQL
I found the error. The script is using the Realtime table and not the Monthly table. To use Mark's script I have chosen the Realtime interval equal to the normal archive interval e.g. 1 minute. I am not using the Realtime table for other things. Because the Realtime table is not updated during the catch up I got a gap in the recent graph.
Anyway thanks for your help.
Dinant
Anyway thanks for your help.
Dinant