Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

Add Storm Rain to Rain Gauge Tooltip

Share your Cumulus MX user interface here
Herbaldew
Posts: 65
Joined: Sun Mar 12, 2017 8:33 pm
Weather Station: VP2+
Operating System: Raspbian Stretch
Location: US Mid-Atlantic

Add Storm Rain to Rain Gauge Tooltip

Postby Herbaldew » Wed Apr 05, 2017 7:33 pm

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: 4982
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Jessie Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Add Storm Rain to Rain Gauge Tooltip

Postby mcrossley » Wed Apr 05, 2017 11:05 pm

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: 65
Joined: Sun Mar 12, 2017 8:33 pm
Weather Station: VP2+
Operating System: Raspbian Stretch
Location: US Mid-Atlantic

Re: Add Storm Rain to Rain Gauge Tooltip

Postby Herbaldew » Fri Apr 07, 2017 1:47 pm

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: 4982
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Jessie Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Add Storm Rain to Rain Gauge Tooltip

Postby mcrossley » Fri Apr 07, 2017 2:25 pm

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: 65
Joined: Sun Mar 12, 2017 8:33 pm
Weather Station: VP2+
Operating System: Raspbian Stretch
Location: US Mid-Atlantic

Re: Add Storm Rain to Rain Gauge Tooltip

Postby Herbaldew » Fri Apr 07, 2017 5:15 pm

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: 65
Joined: Sun Mar 12, 2017 8:33 pm
Weather Station: VP2+
Operating System: Raspbian Stretch
Location: US Mid-Atlantic

Re: Add Storm Rain to Rain Gauge Tooltip

Postby Herbaldew » Fri Apr 07, 2017 7:38 pm

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: 4982
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Jessie Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Add Storm Rain to Rain Gauge Tooltip

Postby mcrossley » Sat Apr 08, 2017 5:59 pm

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: 65
Joined: Sun Mar 12, 2017 8:33 pm
Weather Station: VP2+
Operating System: Raspbian Stretch
Location: US Mid-Atlantic

Re: Add Storm Rain to Rain Gauge Tooltip

Postby Herbaldew » Mon Apr 10, 2017 1:15 pm

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: 4982
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Jessie Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Add Storm Rain to Rain Gauge Tooltip

Postby mcrossley » Mon Apr 10, 2017 2:33 pm

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


Return to “Customisation”

Who is online

Users browsing this forum: No registered users and 1 guest