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
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
Moderator: mcrossley
-
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
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?
- 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
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.
- 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
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.
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.
- 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
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?
- 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
If you are using the Davis UV-I, it does not have any values below 0.5, it reports zero.
- 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
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
The original script comes from saratoga-weather.
Source:
https://saratoga-weather.org/scripts-UV ... hp#UVworld