Page 1 of 1

graphconfig.json does not appear

Posted: Sat 15 May 2021 10:57 am
by HansR
In relation to a previous thread it appeared I had more or less forgotten where all files came from and where they had to be configured so I decided to delete the website and start all over again. That is a useful exercise. And there is one file I cannot trace and find back: graphconfig.json.

It appears to be configured at: Internet settings=>Web/FTP Settings=> Interval Settings=>Graph File Settings, to be uploaded at the FTP interval. In my case every 10 minutes but although all files are uploaded correctly, this one is not.

Also FTP Now! does not resolve the issue.

In the code I found:

Code: Select all

// The config files only need uploading once per change
if (GraphDataFiles[i].LocalFileName == "availabledata.json" ||
      GraphDataFiles[i].LocalFileName == "graphconfig.json")
{
    GraphDataFiles[i].FtpRequired = false;
}
So the question is: what change is required to get this file uploaded and shouldn't it upload with the FTP Now! ?

And yes, I presume a restart does the trick as well - yes it does! - but I don't get the why.

Re: graphconfig.json does not appear

Posted: Sat 15 May 2021 6:49 pm
by sfws
HansR wrote: Sat 15 May 2021 10:57 am there is one file I cannot trace and find back: graphconfig.json.
That is a one-off upload. See Settings --> Web/FTP settings --> Graph file settings and tick Generate

Re: graphconfig.json does not appear

Posted: Sat 15 May 2021 7:11 pm
by HansR
Generate and FTP upload are both ticked.
Point is that the file is never uploaded (unless restarted or maybe when I change from Celsius to Fahrenheit) and not at FTP Now!

Re: graphconfig.json does not appear

Posted: Sat 15 May 2021 7:33 pm
by Mapantz
HansR wrote: Sat 15 May 2021 7:11 pm Generate and FTP upload are both ticked.
Point is that the file is never uploaded (unless restarted or maybe when I change from Celsius to Fahrenheit) and not at FTP Now!
I just tried it, it works for me.

I don't actually use it, but CMX uploaded it. I then changed a setting and hit FTP now, and it uploaded it with the changes.

Re: graphconfig.json does not appear

Posted: Sat 15 May 2021 8:01 pm
by HansR
@Mapanz: I would expect FTP Now! to send it even if I had not made a change.

Reason is that I simulated a crash by deleting all my files and that should be restored automatically.
It almost does.

But OK, it is clear now how it works, not a big point.

Re: graphconfig.json does not appear

Posted: Sun 16 May 2021 5:36 am
by sfws
HansR wrote: Sat 15 May 2021 8:01 pm I would expect FTP Now! to send it even if I had not made a change.
Your previous reply to me focussed on the "Generate" I coloured in my earlier post, so perhaps you missed that I started that post saying
sfws wrote: Sat 15 May 2021 6:49 pm That is a one-off upload.
Mark might need to respond if he has changed the code since the new graph design implemented, but I believe you misunderstand what "FTPNow" does.

I have seen nothing from Mark since FTPNow discussed in viewtopic.php?f=40&t=17887&p=138832&, viewtopic.php?f=40&t=17818 and viewtopic.php?f=39&t=15139
Summarising, FTPNow! is based on a Cumulus 1 feature called "Web update", it just does what next normal upload would do, therefore neither repeat any one-off upload.

Re: graphconfig.json does not appear

Posted: Sun 16 May 2021 6:32 am
by HansR
Thanks @sfws, i may have missed some things but not the 'one off' remark. Apparently it is this file and the available data file which do not get uploaded again unless restarted or changed.

Indeed I misinterpreted the FTP Now! button but it could also have been read as an implicit request. They are small files so who would notice in the blob of a datafile and others upload.

Anyway, as I said:
HansR wrote: Sat 15 May 2021 8:01 pm But OK, it is clear now how it works, not a big point.

Re: graphconfig.json does not appear

Posted: Sun 16 May 2021 9:33 pm
by mcrossley
I'll add this to the list to take another look it.

Off the top of my head I think perhaps it should be uploaded either: on start (as now), on change (as now), at EOD, on FTP now.

Re: graphconfig.json does not appear

Posted: Mon 17 May 2021 12:41 am
by HansR
mcrossley wrote: Sun 16 May 2021 9:33 pm I'll add this to the list to take another look it.
Thanks, that would be nice