Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.9.0 (build 3095) - 09 October 2020 (please see announcement regarding releases since 3.5.0)
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of the NOAA report and Snow Index drop-down menus to 2030)

Use this Wiki link to Download the Software (Cumulus MX / Cumulus 1 and other related items).

Dayfile.txt uploading to a web server via FTP?

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

User avatar
mcrossley
Posts: 6986
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Buster Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Dayfile.txt uploading to a web server via FTP?

Post by mcrossley »

I use the MX MySQL options to update both my dayfile, and logdata tables (using the stand built-in option) and they work just fine. I use the custom option to update my realtime table (as I have 'tweaked' it) every minute as well.

You must make sure that the public IP address of your MX server is on the 'allowed to connect to MySQL' list of your server - some servers do not allow universal direct access to MySQL.

The loooong term plan is to drive the whole website from MySQL and do away with the tag file uploads.

bigmac
Posts: 159
Joined: Wed 13 May 2009 9:35 am
Weather Station: Davis Vantage Pro 2 Wireless
Operating System: Raspbian wheezy
Location: Nr Ilkley, West Yorks, UK
Contact:

Re: Dayfile.txt uploading to a web server via FTP?

Post by bigmac »

Thanks Steve & Mark.

Steve, it was from the info about Custom HTTP calls on the CumulusMX internet settings option:

"Custom HTTP call - at rollover
A custom HTTP URL to be invoked just before end of day rollover - can include webtags"

and also in the Custom Upload in the CumulusMX MySQL settings:

"Custom upload - at rollover
A custom SQL command to be executed just before end of day rollover - can include webtags"

That's why I assumed it wouldn't do what I wanted it to.

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

Re: Dayfile.txt uploading to a web server via FTP?

Post by steve »

Those do happen just before writing dayfile.txt rather than just after, as with the 'standard' one. But they still all happen before the rest of actual rollover process, so the data will be the same. It's designed so that you get the last values of the day. If they happened after the rollover had completed, you would get the reset values, which usually aren't much use. Writing dayfile.txt is the very first part of the rollover process. for the same reason.
Steve

bigmac
Posts: 159
Joined: Wed 13 May 2009 9:35 am
Weather Station: Davis Vantage Pro 2 Wireless
Operating System: Raspbian wheezy
Location: Nr Ilkley, West Yorks, UK
Contact:

Re: Dayfile.txt uploading to a web server via FTP?

Post by bigmac »

Thank you for your patient explanation Steve. I've totally got the process wrapped around my neck! I understand it now so will have another go at it.

User avatar
Werk_AG
Posts: 182
Joined: Sun 13 Jan 2013 8:04 pm
Weather Station: WeatherDuino Pro2 PLUS
Operating System: Windows 7
Location: Cercal CDV - Portugal
Contact:

Re: Dayfile.txt uploading to a web server via FTP?

Post by Werk_AG »

mcrossley wrote:
You must make sure that the public IP address of your MX server is on the 'allowed to connect to MySQL' list of your server - some servers do not allow universal direct access to MySQL.
Which may be a problem to all that have a dynamic IP, I think.
Already installed on the Raspberry PI is: curl
Syntax to upload a file to an FTP Server is:

curl -m 60 -T /path_to/source_file ftp://"FTPHOST":"FTPPORT" "FTPDIR"/ --user "FTPUSER":"FTPPASS"
This solution posted by jank, works well and its easy to add to a cron job

Post Reply