historical graphs

156 views
Skip to first unread message

burton

unread,
Sep 30, 2021, 9:50:23 PM9/30/21
to weewx-user
hello!

i want to generate historical weekly graphs for a year worth of data. as i understand from reading the docs and searching the forum, wee_reports with a timestamp and a custom weewx.conf will do that. i don't want to break the running config; can someone confirm these are the correct steps:

1) cp weewx.conf to weewx_archive.conf

2) make weewx_archive.conf barebones: i assume it should be made "passive" and read-only -- what is the strict minimum required [Engine] to generate reports?

3) change HTML_ROOT to point somewhere correlated with the timestamp

is there something missing? 

also: what is the command-line format for the timestamp?

thanks!
alex.



gjr80

unread,
Sep 30, 2021, 10:29:55 PM9/30/21
to weewx-user
Hi,

1 - yes
2 - no, well you can if it makes you feel better but it will have no impact on wee_reports other than you possibly removing something that wee_reports or its dependencies require. wee_reports loads a minimal dummy engine that essentially does nothing so its not going to upset a running WeeWX instance.
3 - yes if you want your wee_reports output to go elsewhere, eg not overwrite your running WeeWX instance output if WeeWX and wee_reports are going to generate some common output.

You might be able to use day/month/year/week substitution in your template name to automatically generate a uniquely named file, depends on exactly what you are doing. In any case, if your template file name includes YYYY, MM, DD or WW they will be replaced with four digit year, two digit month, two digit day of month and two digit week of year number in the resulting file name, eg my_templateYYYY.txt.tmpl would result in my_template2021.txt being produced. No guarantees as I have not used this with wee_reports but I don't see why it won't work.

timestamp is a standard Unix epoch timestamp, eg 1633055346

Gary

burton

unread,
Oct 1, 2021, 1:09:49 AM10/1/21
to weewx-user
Hello Gary!

Thanks for the quick follow-up, it allowed me to make a test and confirm i can generate my past weeks, with a simple wrapper script. i manage the naming with the HTML_ROOT directory name so each generation goes into it's own directory (I'm embedding the PNGs in a different HTML context (not the reports per se) so it works for me.)

A little follow-up question: is there a way to generate arbitrary length graphs (ex: 5 days or 80 days). We run different experiments over various durations (and collect the sensor data in weewx, in addition to the weather data) it would be nice to be select specific periods to visualize the data adjusted to each experiment. Perusing the different template did not lead to explicit examples of other periods than day/week/month/year.

Thanks again,
Alex.

gjr80

unread,
Oct 1, 2021, 2:45:46 AM10/1/21
to weewx-user
On Friday, 1 October 2021 at 15:09:49 UTC+10 burton wrote:
A little follow-up question: is there a way to generate arbitrary length graphs (ex: 5 days or 80 days). We run different experiments over various durations (and collect the sensor data in weewx, in addition to the weather data) it would be nice to be select specific periods to visualize the data adjusted to each experiment. Perusing the different template did not lead to explicit examples of other periods than day/week/month/year.


Simple, just adjust the time_length config option for the respective plot definition in the skin config file skin.conf.  The level in the config tree that you set time_length config option determines which plots it applies to; it's typically applied at the [[[ ]]] level to apply to all subordinate plots (eg all week plots, day plots etc) but you can go up or down the config tree to affect more (all) or less (individual) plots.

Gary
 
Reply all
Reply to author
Forward
0 new messages