Website Generator

From Cumulus Wiki
Revision as of 10:59, 20 July 2021 by HansR (talk | contribs) (Introduction)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Website Example Wolfshagen

While CumulusUtils started as a collection of modules to be used at will in the creation of a weather website - for the site of the author - after several modules it became clear that generation of a complete website would not be too difficult. It required a HTML framework within which the modules would fit, a menu, a runtime system to handle the realtime data, loading of files, clocks, sun and moon and an adaptation of mcrossley's gauges or a rewrite of a total new set of gauges.

The work set out on a scratch board where the site was drafted and the runtime was coded. The choice was made to split the screen in two in a 5/7 ratio which never changed since. The right pane became the ReportView where the user chooses the report he wishes to see while the realtime data are always visible in the left pane, the Dashboard. The contents of the Dashboard can be toggled between two sets of twelve panes (see the Dashboard page).

In the example on the image on the right you see Holgers' fully translated site with expanded user menu and even multilingual by his own design to show off the things possible with the CumulusUtils framework.


The website generation includes in principle all modules. It is created with the following command:

  utils/bin/cumulusutils.exe Website


The output of the website generation is the output of all individual modules and in addition:

  1. index.html => is the Bootstrap formatted start page of the site
  2. cumulusutils.js => is the javascript runtime system
  3. cumuluscharts.txt => contains the charts for the Home page and is originally based on the CumulusMX recent charts.
                              this file is in the process of being replaced by the ChartsCompiler but will always remain as default and fall back.
  1. HighchartsLanguage.js => contains the language definitions for the charts. Not many possibilities are used but that may change. It is generated each run.

These files will be generated by the Website command. If you did not change anything, apart from the index.html they do NOT need to be uploaded (see the Thrifty qualifier)

Inifile parameters

NOTE: The Website Generator works closely together with the Internal FTP facility. You have to setup that first or upload the output manually. It's user preference.

The Website section is the largest parameters section. Not all parameters will be reproduced here, see the Cumulusutils.ini article. Only the important individual parameters will be discussed, the others are discussed as a group.

 GoogleStatsId=                        => When not empty, a google stats code fragment will be generated with this code as the user Id, default is empty
 PermitGoogleOptout=true | false       => Permits to generate code so the users own access to the site will not be measured, default=false
 CumulusRealTimeLocation=              => see below, default is empty
 ShowInsideMeasurements=true | false   => when true, inside temperature and humidity will be shown on the website (when available in the datafile), default=false
 CumulusRealTimeInterval=30            => The refresh cycle time of the runtime system to update the values on the dashboard and gauges, default=15
 ShowUV=true                           => Show the UV values (if there is a sensor), default=true
 ShowSolar=true                        => Show the solar radiation values (if there is a sensor), default=true
 HeaderLeftText=                       => A free plain or HTML formatted text destined at the left side of the header, default is empty
 HeaderRightText=                      => A free plain or HTML formatted text destined at the right side of the header, default is empty
 SiteTitleAddition=                    => A free text addition to the title, default is empty

All parameters starting with Panel affect what you actually see in that panel See Dashboard for more information.
All parameters starting with Color affect the Bootstrap elements relevant for the interface and give the user the possibility to create a personal touch to the presentation.
All parameters starting with Steelseries affect the presentation of the gauges. You may find examples here [1] and here.
All parameters starting with Threshold give a definition in pairs for a red led within a gauge to start flashing when the given boundary has surpassed.
All parameters starting with Home apply to the Home page graphs and give the user the possibility to explicitly set non-default colours.
When colours go in three they are gradient colours. If only the first colour is used, no gradient effect is seen.

  1. See the site of Mark Crossley if you wish to see more and create gauges yourself: lineair, extras, stopwatch, lightbulb, LCD and trafficlight


The parameter CumulusRealTimeLocation gives the user the possibility to setup the CumulusUtils website beside a main website and share the realtime and datafiles with the other site.

If there is a directory structure like:

 \                              as webroot
 - cutils\                       as directory where the CumulusUtils site is located
     |--- lib\
     |--- css\ 
     |--- CUicons\

then, when CumulusMX sends the realtime and datafiles to the webroot, you can set the CumulusRealTimeLocation to ..\ and it will automatically find the realtime and datafiles it needs.

Javascript libraries

When using the Website Generator, all modules are used implicitly. Modules, with some exceptions, can be used standalone in any website by including the output of CumulusUtils in that website. When using the standalone mode you need to be aware of the inifile parameters (section general) GeneratejQueryInclude and DoLibraryIncludes.

  1. GeneratejQueryInclude will - if true - generate the required jQuery library reference line on top of the module.
  2. DoLibraryIncludes will - if true - generate the required library references (e.g. HighCharts, Leaflet etc...) on top of the module.

If you manage these libraries in your website yourself set these parameter values to false. If the modules don't work and you have no idea what this is about, set these values to true.

If you use the Website Generator, set both parameters to false.