Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

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

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

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Updating UV index in strings.ini

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
canlab@sasktel.net
Posts: 8
Joined: Thu 18 Mar 2021 2:12 pm
Weather Station: Ecowitt
Operating System: Windows 10

Updating UV index in strings.ini

Post by canlab@sasktel.net »

I currently have my website set up to display UV index. It currently shows as a number. I would like to change that to "low", "moderate", etc. Would that be done in the strings.ini file? If so how?
User avatar
mcrossley
Posts: 14382
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Updating UV index in strings.ini

Post by mcrossley »

No, you would have to translate the index number into text either on your server using say PHP, or in the clients browser using a bit of JavaScript.
User avatar
ConligWX
Posts: 1835
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 24.04.1 LTS
Location: Bangor, NI
Contact:

Re: Updating UV index in strings.ini

Post by ConligWX »

if you take a look at Saratoga templates code you should find how it is done.

Example:

https://www.conligwx.org/wxuvforecast.php

though the url its taken from is here: https://www.temis.nl/uvradiation/nrt/uvindex.php the value is then read and a Low, Medium, high value put in place.
User avatar
Dador
Posts: 352
Joined: Thu 24 Nov 2011 2:22 pm
Weather Station: Davis VP2 Plus & Ecowitt
Operating System: Windows 10
Location: Rybnik, Poland
Contact:

Re: Updating UV index in strings.ini

Post by Dador »

I have also been using this script for a long time. Probably the rounding of numbers used in it causes "none" to appear instead of "low" for any value below 0.5. Has anyone solved this problem for themselves?
User avatar
mcrossley
Posts: 14382
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Updating UV index in strings.ini

Post by mcrossley »

If you are using the Davis UV-I, it does not have any values below 0.5, it reports zero.
User avatar
Dador
Posts: 352
Joined: Thu 24 Nov 2011 2:22 pm
Weather Station: Davis VP2 Plus & Ecowitt
Operating System: Windows 10
Location: Rybnik, Poland
Contact:

Re: Updating UV index in strings.ini

Post by Dador »

The problem is probably in the code. The script concerns the UV index forecast and not the actual dose read.
The original script comes from saratoga-weather.


Source:
https://saratoga-weather.org/scripts-UV ... hp#UVworld
Post Reply