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

Historic graph - where does it get its data from?

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
martinu
Posts: 93
Joined: Wed 01 Jan 2014 7:54 pm
Weather Station: Davis Vantage Vue
Operating System: Raspberry Pi: Raspbian Stretch
Location: Rudston, North Yorkshire

Historic graph - where does it get its data from?

Post by martinu »

I've just upgraded to b3107 and I'm very impressed with the historic and select-a-chart graphs. On my "round tuit" list was a task to devise a means of uploading data to my server, getting the server to add it to a SQL table, and then write PHP to extract data for a selected time period and display it with Google Charts. But you've solved all that ;-)

Just one "funny" with the historic graph, caused by the perennial problem with my weather station: registering a bizarre rain rate due to spurious tipping when I clean the tipping spoon. I'd hand-edited the various log.txt files in ~/Cumulus/data, so it didn't affect the record values. But I'd not done the .json files: alldailyraindata.json still had the rogue value.

It wasn't until I looked at the historic graph (Rainfall, rainfall rate graph) that I spotted this. I've now corrected that file and uploaded it to the web server, but I'm still seeing the spike.

So where does historic charts get its data from? Is it one of those things that will need Cumulus to be restarted?

It affects both the local :8998 site and my public web site.


UPDATE: Because Cumulus has just stopped when I was running the :8998 site (see separate thread), I've had to restart Cumulus and the corrected json file is now being read correctly. So that answers my question: the graphs used a cached version of the file, not the live one in the /web folder on the Cumulus computer (a RasPi) or on the public web server.
User avatar
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: Historic graph - where does it get its data from?

Post by mcrossley »

First, which historic graph? The Dashboard interface, or the default web site?

Ultimately the data source is your dayfile.txt file. If you edit data using the dashboard interface, then the cached dayfile data will be updated. If you edit the dayfile directly then it will be re-read when you start Cumulus MX again after the edit.

The json files are transient, they are re-created at day rollover, and at program start-up. You can re-create them on the fly by using the FTP Now function and selecting the option to include graph data files.
Post Reply