WUnderground UV Index?

Posted on
Wed Apr 11, 2018 5:59 am
McJohn offline
User avatar
Posts: 295
Joined: Dec 18, 2012
Location: The Netherlands

WUnderground UV Index?

Thank you Dave for this giant WUnderground plugin!
A lot of info and a lot of work.

Question: is it possible to display the UV index per location?
Attachments
Screen Shot 2018-04-11 at 13.56.13.png
Screen Shot 2018-04-11 at 13.56.13.png (17.34 KiB) Viewed 237 times

Posted on
Wed Apr 11, 2018 6:08 am
DaveL17 offline
User avatar
Posts: 3760
Joined: Aug 20, 2013

Re: WUnderground UV Index?

McJohn wrote:
Thank you Dave for this giant WUnderground plugin!
A lot of info and a lot of work.

Question: is it possible to display the UV index per location?

Thanks for the kind words! The UV data for each location can easily be displayed. The data is found under the WUnderground Weather device type under "Current Conditions - UV".

The rub is that not every location is going to report a valid UV value. For example, the main PWS that I follow doesn't report UV (presumably because the weather station doesn't measure it). So you'll need to select a location that reports UV.

Screen Shot 2018-04-11 at 7.07.11 AM.png
Screen Shot 2018-04-11 at 7.07.11 AM.png (26.78 KiB) Viewed 230 times

Posted on
Wed Apr 11, 2018 7:43 am
McJohn offline
User avatar
Posts: 295
Joined: Dec 18, 2012
Location: The Netherlands

Re: WUnderground UV Index?

Thanks Dave for the fast reply.
I was looking at the "Hourly Forecast" device details. Sorry (there is so more interesting info!).
Just found the UV details in the "Weather" device. Perfect!

There are interesting differences between some UV sources:

- Our Oregon UV sensor says: UV 0
- WUnderground Plugin Weather device says UV=6
(Location Amsterdam)
- WUnderground web site says UV 0
(Location Amsterdam)
Attachments
Screen Shot 2018-04-11 at 15.40.27.png
Screen Shot 2018-04-11 at 15.40.27.png (19.6 KiB) Viewed 211 times

Posted on
Wed Apr 11, 2018 8:17 am
DaveL17 offline
User avatar
Posts: 3760
Joined: Aug 20, 2013

Re: WUnderground UV Index?

The difference is interesting. Without diving into the code, I think the only things I do with the UV value is to convert the value from a string to a float, and I think I also have some logic in there to convert a "nonsense" number to zero. For example, WU may provide a value of "-99" for UV which means that it doesn't know what a valid value is. Since I know that any UV value that's negative doesn't make sense, I convert it to a zero.

You can check this for yourself if you like by saving the weather data to a file (from the plugin menu) and then searching for the UV value.

Posted on
Wed Apr 11, 2018 8:34 am
McJohn offline
User avatar
Posts: 295
Joined: Dec 18, 2012
Location: The Netherlands

Re: WUnderground UV Index?

Thanks for the feedback.
We changed the location to "autoip" and now it says UV=1,
that's ok.
Probably with the autoip setting, it looks to the nearest complete weather station, including the UV index?

Posted on
Wed Apr 11, 2018 3:55 pm
DaveL17 offline
User avatar
Posts: 3760
Joined: Aug 20, 2013

Re: WUnderground UV Index?

With 'autoip' you should still be able to use the 'locationCity', 'neighborhood' and 'stationID' states to determine where the data come from. I just did a test on the train with my cell phone using 'autoip' and it picked up a nearby station that reported all three states and a UV value of 1.

Whether WU provides data from only one station when 'auotip' is queried I don't know; but I suspect that it is.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest