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

Add Storm Rain to Rain Gauge Tooltip

Share your Cumulus MX user interface here

Moderator: mcrossley

Post Reply
Herbaldew
Posts: 113
Joined: Sun 12 Mar 2017 8:33 pm
Weather Station: VP2+
Operating System: Raspberry Pi OS (64-bit)
Location: US Mid-Atlantic

Add Storm Rain to Rain Gauge Tooltip

Post by Herbaldew »

In the last couple weeks I have managed to:

-Drop tenths from wind speed and temp gauge LCD's
-Darkened the green average wind "wedge" and the red wedges in all to match the daker red color of the hi/low pressure and theoretical solar max wedges.
-Changed layout of the gauges page
-Figured out how to make the "Other Temps" gauge load my choice by default
-Added Storm Rain to the web templates (easy) and to two of the interface pages (tougher as I had to create entries rather than just edit existing code)
-Purchased and setup a Raspberry Pi to include an Apache web server

That leaves my wish list with three items. I would prefer the amount of minor ticks in the wind scale to equal the amount of numbers between the major ticks. Has been discussed here already so I know that isn't happening.

Most of the gauges have an "Arrow Head" to show the high for the day or a shaded wedge to show the range for the day. Rainfall stays at it's amount until it resets at midnight. The exception is the UV Index - would like for the highest segment that illuminates during the day to stay there to indicate the high until it resets at midnight - I have know clue if or how this could be done so not obesessing on this one either.

The last item is to add "Storm Total" to the tool tip of the rain gauge. I *think* this would be relatively simple. I *think* this would require adding an entry to gaugefeed.js, language.min.js and gauges.js. The entry to the first two files seem straight forward and simple but I have experimented with trying to figure out what to add to gauges.js for several hours and am lost and defeated.

Can anyone offer any advice on how to accomplish this?


TIA - Herb
User avatar
mcrossley
Posts: 12689
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Add Storm Rain to Rain Gauge Tooltip

Post by mcrossley »

Herb,

You will have to switch the UV gauge to a regular pointer gauge to put a 'max' marker on, the LED gauges do not support that functionality.

Adding storm total, just add the required value to the JSON data file template realtimegaugesT.txt.
Then in rain gauge code that creates the "tip" string, refer to the value as "data.<what_ever_you_called_it_in_the_json_file>"
You can use hard coded strings for the surrounding text if you do not use multiple languages - if you do, then yes you will have to add new strings to language.js and re-minimise it.
Herbaldew
Posts: 113
Joined: Sun 12 Mar 2017 8:33 pm
Weather Station: VP2+
Operating System: Raspberry Pi OS (64-bit)
Location: US Mid-Atlantic

Re: Add Storm Rain to Rain Gauge Tooltip

Post by Herbaldew »

Thanks for the instructions. I have given up on adding the tooltip. Adding it to the JSON was no problem but I just can't get my head wrapped around the gauges.js entry.

UV Gauge: I couldn't find anything about switching to a pointer gauge. I experimented and found that changing:

Code: Select all

ssGauge = new steelseries.RadialBargraph('canvas_uv', params);

to:

Code: Select all

ssGauge = new steelseries.Radial('canvas_uv', params);
changed it to a pointer gauge. I also added:

Code: Select all

params.maxMeasuredValueVisible = true;
and that seems to have turned on the max arrow head. However I have two issues - first there is a red arrow head pointing out that I have no idea about. It is at the "5" in the screenie attached, but if I change the scale it moves to the halfway point. Second, the max arrow doesn't go to max but instead follows the pointer.

EDIT: I just noticed....the max pointer does stay at the high during constant operation - it just isn't going to the high during initialization.

I wanted to change the rain gauge to pointer as well but when I delete "Bargraph" as I did for the UV gauge, the gauge page loads and displays but will not receive data.

Any further advice?

Thanks again

Image
User avatar
mcrossley
Posts: 12689
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Add Storm Rain to Rain Gauge Tooltip

Post by mcrossley »

The Radial gauges take different (and more) parameters from the RadialBargraphs.

The pointer at the midpoint is the "threshold" indicator, you will want to disable that in the init params...
thresholdVisible: false,

To make the UV max indicator reflect today's high, you will need to add a call to .setMaxMeasuredValue() using today's high UV value.
Herbaldew
Posts: 113
Joined: Sun 12 Mar 2017 8:33 pm
Weather Station: VP2+
Operating System: Raspberry Pi OS (64-bit)
Location: US Mid-Atlantic

Re: Add Storm Rain to Rain Gauge Tooltip

Post by Herbaldew »

Image

:D :D :D :D :D Thanks!

I wanted to change the rain gauge to pointer as well but when I delete "Bargraph" as I did for the UV gauge, the gauge page loads and displays but will not receive data.
Any clues for this? I thought it would be simple beings there is no max arrow to deal with.

TIA
Herbaldew
Posts: 113
Joined: Sun 12 Mar 2017 8:33 pm
Weather Station: VP2+
Operating System: Raspberry Pi OS (64-bit)
Location: US Mid-Atlantic

Re: Add Storm Rain to Rain Gauge Tooltip

Post by Herbaldew »

Got it sorted ... found in another post that I had to remove:

Code: Select all

gaugeRain.gauge.setGradient(gaugeRain.data.grad);
Thanks again!

Image
User avatar
mcrossley
Posts: 12689
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Add Storm Rain to Rain Gauge Tooltip

Post by mcrossley »

Great, glad you got it all working. Maybe I'll add "all pointer gauges" as an option at some point as a few people like the consistent look...
Herbaldew
Posts: 113
Joined: Sun 12 Mar 2017 8:33 pm
Weather Station: VP2+
Operating System: Raspberry Pi OS (64-bit)
Location: US Mid-Atlantic

Re: Add Storm Rain to Rain Gauge Tooltip

Post by Herbaldew »

Herbaldew wrote:I have given up on adding the tooltip
And back to the subject of this post...I "un"gave up.

Image

Persistence has paid off 8-)
User avatar
mcrossley
Posts: 12689
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Add Storm Rain to Rain Gauge Tooltip

Post by mcrossley »

8-) - I'd forgotten about that one!
Post Reply