Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024

Legacy Cumulus 1 release v1.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

User Expansion of CumulusUtils

Discussion of the Cumulusutils tool and website generator.

Moderator: HansR

User avatar
HansR
Posts: 5870
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

User Expansion of CumulusUtils

Post by HansR »

One of the items of the old release thread deserves separate attention: the user expansion.

The website which is the result of the CumulusUtils website generator is not a fixed website but is user expandable and as such it is a standard template. I made a note in the README (which is rapidly becoming a true manual :) ) describing the technique:
The user can expand the site through user menu's in whatever way he likes. I believe there are no limitations. An example is found in 'CUsermenu-example.txt' which is found in the distribution.

Please note that loading text or html in the ReportView is possible using the LoadUtilsReport('filename'); call. The text will be interpreted as HTML and thus you can also execute javascript (via the <script> tag). You can create whichever report you want by whichever technique you prefer. Just remember the file offered to CumulusUtils using LoadUtilsReport('filename'); MUST be legal html/javascript (or just plain text) to be useful.
As an example I made two entries to activate windy.com from the menu, one to a separate tab in the browser and one to the report area of the site:

Code: Select all

  <div class="CUdropdown-content">
    <a href="https://www.windy.com/station/pws-f06f5696?53.259,6.932,8" target="_blank">Windy (excl)</a>
    <span onclick="LoadUtilsReport('Windy.txt');">Windy (incl)</span>
  </div>
The file Windy.txt looks as follows:

Code: Select all

<iframe width="1000" height="700" src="https://embed.windy.com/embed2.html?lat=53.259&lon=6.932&zoom=4" frameborder="0"></iframe> 
See here for these items in action.

If you code some HTML, CSS and/or javascript yourself - with or without the use of the webtags - and load it in the report area, you probably can create some easy and surprising reports.
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
kocher
Posts: 233
Joined: Sat 19 Apr 2014 7:57 pm
Weather Station: Davis Vantage Pro2+
Operating System: Windows 10
Location: San Sebastian - Spain
Contact:

Re: User Expansion of CumulusUtils

Post by kocher »

Good morning Hans

This innovation seemed like a good idea. :clap:

I have tried to follow the steps to see the menu as on your website (with the possibility of including or excluding Windy).

I have done the following:

- Create the file "Windy.txt", in which folder do I save it? Should I create another php file that includes it ?:

Code: Select all

<iframe width = "1000" height = "700" src = "https://embed.windy.com/embed2.html?lat=53.259&lon=6.932&zoom=4" frameborder = "0"> </iframe>
- Edit the file "CUsermenu.txt" as you have indicated:

Code: Select all

<!-- --------------------------------------------------------------------------------------- -->
<!-- This is an example file for the UserMenu of the CumulusUtils website generator/template -->
<!-- you can safely remove it, empty it or adjust to your own requirements ----------------- -->
<!-- Leave the HTML tags in tact, just fill in your links, Load requests and --------------- -->
<!-- --------------------------------------------------------------------------------------- -->
<div class="CUdropdown">
  <button class="CUdropbtn">
  <!-- Put your button text here, you can add  an onclick=LoadUtilsReport('')" event to the button -->
  <!-- or just put a link on the UserMenu text (with or without a dropdown). -->
    UserMenu
    <i class="fa fa-caret-down"></i>
  </button>
  <!-- The dropdown is optional, the div with CUdropdown-content can be safely removed -->
  <div class="CUdropdown-content">
 <div class="CUdropdown-content">
    <a href="https://www.windy.com/station/pws-f06f5696?53.259,6.932,8" target="_blank">Windy (excl)</a>
    <span onclick="LoadUtilsReport('Windy.txt');">Windy (incl)</span>
  </div>
    <a href="https://wow.knmi.nl/#1211bb08-6c93-e911-80e7-0003ff59889d" target="_blank">KNMI WOW</a>
    <a href="https://www.wunderground.com/dashboard/pws/IWAGEN6" target="_blank">WU</a>
    <span>--------</span>
    <span onclick="LoadUtilsReport('Yadr.txt');">Any file</span>
    <span>--------</span>
    <a href="https://topotijdreis.nl" target="_blank">Topo NL</a>
    <a href="https://waterinfo.rws.nl/#!/kaart/waterhoogte-t-o-v-nap/" target="_blank">Waterstanden</a>
    <span>--------</span>
    <a href="/wp/" target="_blank">The Blog</a>
  </div>
</div>
- I have run cumulusutis, but the menu on my website has not changed:

http://kocher.es/cumulusMX/FWI/

My doubts are the following:

- Should the file be saved in the folder "\ cumulusMX" or in the folder "\ cumulusMX \ cumulusutils?

- What files must be uploaded to the web for everything to work well?

Como puede ver, estoy bastante perdido :groan:

Muchas gracias por todo :D

Saludos desde San sebastian
Image
User avatar
HansR
Posts: 5870
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

Re: User Expansion of CumulusUtils

Post by HansR »

Hi Javier,

Let's start at the end: ;)
kocher wrote: Wed 22 Apr 2020 10:25 am Como puede ver, estoy bastante perdido
I needed a translator because my Spanish is very rusty... In NL we say 'we doen het stap voor stap' :)

So:
  1. I See you still have 3.1.0 installed, try 3.1.1 (just released)
  2. The generated website only knows one directory for it's data and menu files: it's root. So the directory where you install the index.html and the cumulusutils.js also contains CUsermenu.txt and CUserAbout.txt.
  3. You do not have to worry about file uploads, if the website runs, everything must be there. The only file you have to create yourself in the website root, is the one you want to load in the report section. But if you worry then: save the CUsermenu and CUserAbout, delete the rest and rerun CumulusUtils.
  4. Imn principle you do not have to run CumulusUtils to change the menu. The menu is changed by editing CUsermenu.txt and when done, reload the page.
  5. To avoid confusion, name the file you create e.g. Status.txt and fill it with the code you want to appear in the ReportView area.
  6. Edit the file CUsermenu.txt . Note you have in the code in your message two nested <div class="CUdropdown-content"> divisions. That may not occur. You can have two below each other, but they cannot be nested.
  7. Replace everything between <div class="CUdropdown"> and the last </div> with the follwing code (I left the comments out):

    Code: Select all

      <button class="CUdropbtn">
        UserMenu
        <i class="fa fa-caret-down"></i>
      </button>
      <div class="CUdropdown-content">
        <span onclick="LoadUtilsReport('Status.txt');">Kochers Wish</span>
        <span>--------</span>
        <a href="/wp/" target="_blank">The Blog</a>
      </div>
    
If you are done you must see version 3.1.1 and the UserMenu containing:
UserMenu (if you hover, you see the dropdown)
Kochers Wish
--------
The Blog
I think that is it. I wait for the result ;)
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
kocher
Posts: 233
Joined: Sat 19 Apr 2014 7:57 pm
Weather Station: Davis Vantage Pro2+
Operating System: Windows 10
Location: San Sebastian - Spain
Contact:

Re: User Expansion of CumulusUtils

Post by kocher »

I needed a translator because my Spanish is very rusty... In NL we say 'we doen het stap voor stap' :)
Perfect, I understand :D
I See you still have 3.1.0 installed, try 3.1.1 (just released)
If I'm not mistaken, I have the latest version installed, that is, version 3.1.1 :groan:


Thanks to his explanations, now the menu works as it should :clap:

http://kocher.es/cumulusMX/FWI/
Image
User avatar
HansR
Posts: 5870
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

Re: User Expansion of CumulusUtils

Post by HansR »

kocher wrote: Wed 22 Apr 2020 1:09 pm If I'm not mistaken, I have the latest version installed, that is, version 3.1.1 :groan:
Are we looking at the same site then? Because in the footer I see 3.1.0 and it was generated 2 days ago. Also the moon is wrong and I can't see the graphs. :?
Anyway, good the menu is as you want :D
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
meteo19
Posts: 89
Joined: Tue 03 May 2016 8:13 pm
Weather Station: Davis VP2+/DP1500 SmartHub
Operating System: Microsoft Windows 7 Pro
Location: Ségur-Le-Château, France
Contact:

Re: User Expansion of CumulusUtils

Post by meteo19 »

Bonsoir Hans

Je viens de passer de 3.1.0 à la version 3.1.1 et plus rien ne fonctionne :roll:
http://www.meteosegur.fr/CU_MX/utils/index.html

Merci pour votre aide.
Patrick
User avatar
HansR
Posts: 5870
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

Re: User Expansion of CumulusUtils

Post by HansR »

Bonsoir Patrick,
Nous pouvons communiquer le français par email, mais ici sur le forum public la langue de travail est l'anglais, pour que tout le monde puisse le comprendre. Espérons que ce ne soit pas un problème.

So to your problem: apparently you set the value for ShowInsideMeasurements to 'no', because I take the value from the ini-file and write that straight into the variable. So if you set it to true or false (default, see README) it should all work.

Hans
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
meteo19
Posts: 89
Joined: Tue 03 May 2016 8:13 pm
Weather Station: Davis VP2+/DP1500 SmartHub
Operating System: Microsoft Windows 7 Pro
Location: Ségur-Le-Château, France
Contact:

Re: User Expansion of CumulusUtils

Post by meteo19 »

Very good Hans :clap: :clap: :lol:

Patrick
User avatar
HansR
Posts: 5870
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

Re: User Expansion of CumulusUtils

Post by HansR »

Please be aware that, as of version 3.3.0, the menu has changed.

This means that, if you already had a User Menu defined you need to change some things there.
Look at the new 'CUsermenu-example.txt' for how to do it.

The main difference being:

1) The defining tag is now <li></li> and the user menu must be defined between these tags.
2) Any menu item you define, be it a <a> or a <span>, must contain class='nav-link'

For the rest it is the same ;)
Have fun! :D
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
kocher
Posts: 233
Joined: Sat 19 Apr 2014 7:57 pm
Weather Station: Davis Vantage Pro2+
Operating System: Windows 10
Location: San Sebastian - Spain
Contact:

Re: User Expansion of CumulusUtils

Post by kocher »

Greetings Hans

I have installed version 3.3.0

With the new "CUsermenu.txt", the template has stopped working correctly (it does not indicate the correct version), as well as the menu:

Code: Select all

<li class='nav-item dropdown'>
  <a class='nav-link dropdown-toggle' href='#' id='navbarDropdown' role='button' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'>
    UserMenu
  </a>
  
  <div class='dropdown-menu' aria-labelledby='navbarDropdown'>
    <span class='nav-link' onclick="LoadUtilsReport('status.html');">Status</span>
    <span class='nav-link' onclick="LoadUtilsReport('prevision.html');">Forecast</span>
    <span class='nav-link' onclick="LoadUtilsReport('euwather.html');">EWN</span>
    <span class='nav-link' onclick="LoadUtilsReport('averages-deviations.html');">Averages</span>    
    <div class='dropdown-divider'></div>
    <span class='nav-link' onclick="LoadUtilsReport('meteobridge.html');">Meteobridge</span>
    <span class='nav-link' onclick="LoadUtilsReport('Windy.txt');">Windy</span>
    <span class='nav-link' onclick="LoadUtilsReport('wu.txt');">Wunderground</span>
    <div class='dropdown-divider'></div>
    <a class='nav-link' href="https://topotijdreis.nl" target="_blank">Topo NL</a>
    <a class='nav-link' href="https://waterinfo.rws.nl/#!/kaart/waterhoogte-t-o-v-nap/">Waterstanden</a>
    <div class='dropdown-divider'></div>
    <a class='nav-link' href="/wp/" target="_blank">The Blog</a>
  </div>
</li>
http://kocher.es/cumulusMX/FWI/

:roll:
Image
User avatar
HansR
Posts: 5870
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

Re: User Expansion of CumulusUtils

Post by HansR »

@kocher:
You did not install 3.3.0 correctly => right below in the footer I can clearly see CumulusUtils Version 3.2.0 - generated at 26/04/2020 01:30 . I cleared my cache and refreshed, but it remained the same so that is your current version.

I would advice to clear the utils directory and reinstall and run CumulusUtils again (if you manually transfer files to the server do that after running CumulusUtils).
Then modify CUsermenu according to the new CUsermenu-example.txt and then we 'll see.

Good luck. 8-)
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
kocher
Posts: 233
Joined: Sat 19 Apr 2014 7:57 pm
Weather Station: Davis Vantage Pro2+
Operating System: Windows 10
Location: San Sebastian - Spain
Contact:

Re: User Expansion of CumulusUtils

Post by kocher »

Okay Hans, I will do it as you say.

regards :)
Image
User avatar
kocher
Posts: 233
Joined: Sat 19 Apr 2014 7:57 pm
Weather Station: Davis Vantage Pro2+
Operating System: Windows 10
Location: San Sebastian - Spain
Contact:

Re: User Expansion of CumulusUtils

Post by kocher »

Good. I have done how you say:

1) Delete "utils" folder

2) Run "cumulusutils.exe" (parameters: Website)

I have found that the utils folder is created again, but with a single file called: "systeminfoTable.txt".


Maybe something wrong with "cumulusutils v330.zip"?
Image
User avatar
HansR
Posts: 5870
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

Re: User Expansion of CumulusUtils

Post by HansR »

@kocher:
kocher wrote: Sun 26 Apr 2020 11:27 am I have found that the utils folder is created again, but with a single file called: "systeminfoTable.txt".
Sorry to see you fall first victim to a modification I made: When you run the Website Generator the map is always run and for the map a website link is obligatory.
That is where it fails

You were always on that map you why does it fail now?
The entry in 'stationswithutils.xml' for your station (you can check it in your local version in the cumulus directory) is:

Code: Select all

  <Station>
    <Name>San Sebastian - Arriola</Name>
    <Description>Estación Davis Vantage Pro2 Plus situada en San Sebastián, España</Description>
    <Website>//kocher.es/</Website>
    <Latitude>43.3116666666667</Latitude>
    <Longitude>-2.01555555555556</Longitude>
    <Date>23-04-2020</Date>
  </Station>
And your website is without the protocol. It needs 'http:' or 'https:' before the slashes.
Easy way out is: put the complete URL in the inifile and everything will be OK.
Thnx!
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
kocher
Posts: 233
Joined: Sat 19 Apr 2014 7:57 pm
Weather Station: Davis Vantage Pro2+
Operating System: Windows 10
Location: San Sebastian - Spain
Contact:

Re: User Expansion of CumulusUtils

Post by kocher »

Sorry to see you fall first victim to a modification I made: When you run the Website Generator the map is always run and for the map a website link is obligatory.
:lol:

Thank you very much Hans

In the afternoon, I get to work ;)
Image
Post Reply