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

ImportCumulusFile.php 4.0

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
richard_newberry
Posts: 500
Joined: Tue 12 Apr 2011 10:23 pm
Weather Station: Watson W-8186
Operating System: Raspbian Bookworm & Debian 12
Location: Leicester
Contact:

ImportCumulusFile.php 4.0

Post by richard_newberry »

I have the following error message when I access this file the following message appears
http://desford-weather.co.uk/ImportCumulusFile.php

Running from web server
Error: You must supply a 'file' parameter/value

Don't it load like that? have to put a parameter in there?

http://desford-weather.co.uk/ImportCumu ... ayfile.txt

Running from web server
Script start: 04/05/20 - 23:30:17
Importing file: /data/dayfile.txt, To table: Dayfile ...
Error: Failed to open file: '/data/dayfile.txt'
Script complete: 04/05/20 - 23:30:17
Execution time: 0 secs
Desford Weather (at parents)
https://desford-weather.co.uk

Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
water01
Posts: 3670
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10/11 64bit Synology NAS
Location: Burnham-on-Sea
Contact:

Re: ImportCumulusFile.php 4.0

Post by water01 »

The dayfile.txt file must in the same place as your ImportCumulusFile.php i.e. uploaded on the webserver, not pointed at your CumulusMX Data Directory.
David
Image
richard_newberry
Posts: 500
Joined: Tue 12 Apr 2011 10:23 pm
Weather Station: Watson W-8186
Operating System: Raspbian Bookworm & Debian 12
Location: Leicester
Contact:

Re: ImportCumulusFile.php 4.0

Post by richard_newberry »

Done that i got following error message
You do not have the required permissions to view the files attached to this post.
Desford Weather (at parents)
https://desford-weather.co.uk

Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
User avatar
laulau
Posts: 678
Joined: Tue 13 Oct 2009 10:52 pm
Weather Station: WeatherDuino Pro2
Operating System: Win 7
Location: Meyenheim, Alsace, FR
Contact:

Re: ImportCumulusFile.php 4.0

Post by laulau »

I have the same error !
Perhaps it's because older entry have less data ?
SQL guru help needed :oops:
Laurent

Image
richard_newberry
Posts: 500
Joined: Tue 12 Apr 2011 10:23 pm
Weather Station: Watson W-8186
Operating System: Raspbian Bookworm & Debian 12
Location: Leicester
Contact:

Re: ImportCumulusFile.php 4.0

Post by richard_newberry »

laulau wrote: Thu 07 May 2020 4:49 pm I have the same error !
Perhaps it's because older entry have less data ?
SQL guru help needed :oops:
What version you on laulau?

I am on 4.0 latest is 4.1
Desford Weather (at parents)
https://desford-weather.co.uk

Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
water01
Posts: 3670
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10/11 64bit Synology NAS
Location: Burnham-on-Sea
Contact:

Re: ImportCumulusFile.php 4.0

Post by water01 »

There was an error in 4.0 for some people (I was one of them and I helped Mark test 4.1) who had existing tables that is why 4.1 was released, I suggest you try that version.
David
Image
richard_newberry
Posts: 500
Joined: Tue 12 Apr 2011 10:23 pm
Weather Station: Watson W-8186
Operating System: Raspbian Bookworm & Debian 12
Location: Leicester
Contact:

Re: ImportCumulusFile.php 4.0

Post by richard_newberry »

Thank you.

Which file is the monthly log thats used on the table called monthly?
Desford Weather (at parents)
https://desford-weather.co.uk

Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: ImportCumulusFile.php 4.0

Post by sfws »

richard_newberry wrote: Thu 07 May 2020 6:32 pm Which file is the monthly log thats used on the table called monthly?
Sometimes you can answer your questions by looking at the wiki in this case the rather obvious page is https://cumuluswiki.org/a/Monthly_log_files



I think Steve Loft's naming scheme was rather illogical, his daily log has 1 line per day, but only one file.

His monthly log has lots of lines, but a separate file for each month.
(In early versions of ImportCumulusFile, if I recall correctly, there was one monthly table for each month). The monthly table in MX is made up of rows from lines in all monthly log files.
richard_newberry
Posts: 500
Joined: Tue 12 Apr 2011 10:23 pm
Weather Station: Watson W-8186
Operating System: Raspbian Bookworm & Debian 12
Location: Leicester
Contact:

Re: ImportCumulusFile.php 4.0

Post by richard_newberry »

Updated to 4.1 and following message appears:-

Running from web server
Script version 4.1
Script start: 07/05/20 - 21:08:53
Importing file: dayfile.txt, To table: Dayfile ...
Connected to database OK.
Set MySQL TZ OK.
Processing dayfile...
Insert = INSERT IGNORE INTO Dayfile (LogDate,HighWindGust,HWindGBear,THWindG,MinTemp,TMinTemp,MaxTemp,TMaxTemp,MinPress,TMinPress,MaxPress,TMaxPress,MaxRainRate,TMaxRR,TotRainFall,AvgTemp,TotWindRun,HighAvgWSpeed,THAvgWSpeed,LowHum,TLowHum,HighHum,THighHum,TotalEvap,HoursSun,HighHeatInd,THighHeatInd,HighAppTemp,THighAppTemp,LowAppTemp,TLowAppTemp,HighHourRain,THighHourRain,LowWindChill,TLowWindChill,HighDewPoint,THighDewPoint,LowDewPoint,TLowDewPoint,DomWindDir,HeatDegDays,CoolDegDays,HighSolarRad,THighSolarRad,HighUV,THighUV,MaxFeelsLike,TMaxFeelsLike,MinFeelsLike,TMinFeelsLike,HWindGBearSym,DomWindDirSym) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
Target table already exists.
ERROR - Failed to prepare the insert statement: Dayfile, error: Unknown column 'MaxFeelsLike' in 'field list'
INSERT IGNORE INTO Dayfile (LogDate,HighWindGust,HWindGBear,THWindG,MinTemp,TMinTemp,MaxTemp,TMaxTemp,MinPress,TMinPress,MaxPress,TMaxPress,MaxRainRate,TMaxRR,TotRainFall,AvgTemp,TotWindRun,HighAvgWSpeed,THAvgWSpeed,LowHum,TLowHum,HighHum,THighHum,TotalEvap,HoursSun,HighHeatInd,THighHeatInd,HighAppTemp,THighAppTemp,LowAppTemp,TLowAppTemp,HighHourRain,THighHourRain,LowWindChill,TLowWindChill,HighDewPoint,THighDewPoint,LowDewPoint,TLowDewPoint,DomWindDir,HeatDegDays,CoolDegDays,HighSolarRad,THighSolarRad,HighUV,THighUV,MaxFeelsLike,TMaxFeelsLike,MinFeelsLike,TMinFeelsLike,HWindGBearSym,DomWindDirSym) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
End.

I had to delete the Table and then reload the URL again and it works. Won't spam it all but at the end should say it's successful.
Desford Weather (at parents)
https://desford-weather.co.uk

Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
water01
Posts: 3670
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10/11 64bit Synology NAS
Location: Burnham-on-Sea
Contact:

Re: ImportCumulusFile.php 4.0

Post by water01 »

By the way you could of also have used that little known program ExportMySql.exe that is in the same MX folder as CumulusMX. It works in a command window and has 1 parameter either dayfile or monthly.

In then updates your dayfile or ALL your monthly log files from your PC's data directory to the MySQL database defined in the CumulusMX MySQL area and held in the Cumulus.ini file. Worked well for me.
David
Image
Post Reply