Page 1 of 1

WUnderground UV Index?

PostPosted: Wed Apr 11, 2018 5:59 am
by McJohn
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?

Re: WUnderground UV Index?

PostPosted: Wed Apr 11, 2018 6:08 am
by DaveL17
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 699 times

Re: WUnderground UV Index?

PostPosted: Wed Apr 11, 2018 7:43 am
by McJohn
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)

Re: WUnderground UV Index?

PostPosted: Wed Apr 11, 2018 8:17 am
by DaveL17
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.

Re: WUnderground UV Index?

PostPosted: Wed Apr 11, 2018 8:34 am
by McJohn
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?

Re: WUnderground UV Index?

PostPosted: Wed Apr 11, 2018 3:55 pm
by DaveL17
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.