UV Calculation: Where and how?

159 views
Skip to first unread message

Nick Kavanagh

unread,
Jun 17, 2021, 9:40:48 AM6/17/21
to weewx...@googlegroups.com
I am trying to set up a UV sensor on an ESP8266, reporting to Weewx via mqttSubscribe. The number being transmitted from the ESP8266 is a string representation of an integer (no decimal value is allowed for in the calculation of index). The number represented by the UV Index level (in the Belchertown skin, but using the weewxdb value held in uv index), is a float. The actual index values are integers, 0-11.

My actual question then, is where and how does weewx calculate the uv index value? Should my sensor be making the UV Index calculation and sending that value, or should it be sending the raw UV level to weewx, with weewx calculationg the index value?

Nick Kavanagh
Very new python hobbyist.

Greg Troxel

unread,
Jun 17, 2021, 6:37:59 PM6/17/21
to Nick Kavanagh, weewx...@googlegroups.com
You could look at StdCalculate, but weewx is quite comfortable getting a
UV index from a hardware weather station, and getting it via
MQTTSubscribe instead seems straightforward.

If you can have the ESP8266 emit json with both some radiometric UV
values and index in a dictionary, and then choose later, I'd do that.
signature.asc
Reply all
Reply to author
Forward
0 new messages