Page 2 of 2

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

Posted: Sun 03 Jan 2016 7:05 pm
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.

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

Posted: Sun 03 Jan 2016 10:47 pm
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.

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

Posted: Mon 04 Jan 2016 9:16 am
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.

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

Posted: Mon 04 Jan 2016 8:05 pm
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.

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

Posted: Mon 30 May 2016 1:40 am
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