hi i have a acurite atlas that report lux, and user weewx-sdr and map it to luminosity = lux.494.AcuriteAtlasPacket. to get the units/labels i added to user/extensions.py import weewx.units weewx.units.obs_group_dict['luminosity'] = 'group_illuminance'.
hope this helps On Wednesday, December 14, 2022 at 4:26:09 PM UTC-6 [email protected] wrote: > Hi Greg, > > Thanks for taking the time to respond. > > The WH65B reports values for 'UV', 'UVI' and 'Light' as you can see in the > data coming through (shown below) when running rtl-433 from the command > line. > *_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _* > > time : *2022-12-14 22:05:08* > > model : *Fineoffset-WH65B* ID : *133* > > Battery : *1* Temperature: *22.4 C* Humidity : *59 %* > Wind direction: *205* Wind speed: *0.0 m/s* Gust > speed: *0.0 m/s* Rainfall : *13.2 mm* UV : *83* > UVI : *0* Light : *10922.0 lux* Integrity : > *CRC* > In my SDR device sensor map I am mapping the UV value to radiation, the > UVI value to UV. Those values seem to be landing in the 'intended' columns > and display nicely in repots with correct values assigned. > > radiation = uv.133.FOWH65BAltPacket > > UV = uv_index.133.FOWH65BAltPacket > > luminosity = light.133.FOWH65BAltPacket > It is the value being reported as 'light' from the sensor that I'm > struggling with. It's currently I'm mapping that value to field I can > physically see in the database called luminosity. That stores data in the > database but the display shows no units and presents with 6 decimal > places. > > After some searching through this group, I found the post referenced where > it sounded like there 'should' be a column called 'illuminance' which is > mapped to a group with the same name which uses lux as units. When I make > that mapping, weewx refuses to start - not surprisingly. > > So that leaves me with 2 options - assume my database is 'incorrect' and > add a column (wee_database --add-column) called illuminance and remap the > light values to that column. The alternative is to add the existing column > to the illuminance group so it uses the correct unit and I can apply some > formatting. I guess I'm wondering if there are other options, and if not, > which of the methods is the "safest" in terms of playing nice with future > upgrades. > > I'm just now looking up the command syntax to add a column and I notice > this example from the section on renaming columns - 'wee_database > --rename-column=luminosity --to-name=illuminance'. Maybe not a coincidence > that example is used? That's starting to lok like my third (and best?) > option. > > Appreciate any guidance on what the intended design is here. > > Thanks, > David > > > On Tuesday, December 13, 2022 at 11:09:32 PM UTC+10 Greg Troxel wrote: > >> >> David Schulz <[email protected]> writes: >> >> > I recently upgrade my venerable WH1080 sensor to the WH65B sensor >> array. >> > I'm grabbing data directly using the SDR driver. Just having trouble >> > nailing down the correct sensor mapping for the lux values being >> reported. >> > >> > I'm looking at this post - >> > https://groups.google.com/g/weewx-user/c/7ouux0bviRE/m/u46MyYN5BQAJ, >> which >> > lead me to believe there should be a field called illuminance which >> maps to >> > the illuminance group which sets the units to be lux. It sounds like >> there >> > might have been a column called luminosity in the schema at one point >> but >> > it was replaced with illuminance? >> >> First, read this: >> >> https://github.com/weewx/weewx/wiki/Watts-and-lux >> >> > My database is using the extended schema but is still showing only a >> > luminosity column and has no illuminance column. I've just run a clean >> > install on a spare Pi and I'm seeing the same column names as my main >> > system. >> > >> > Contemplating whether I add a new column called illuminance or assign >> the >> > existing luminosity column to the illuminance group so that correct >> units >> > get applied. I'd appreciate any recommendations on which is the safer >> path >> > regarding things working cleanly with future upgrades. >> >> I am not at all clear on the details of those sensors. >> >> illuminance has units lux; it is human-perceived light falling per area. >> >> Luminosity is a radiometric unit (power) rather than photometric (human >> perception). And, it's total power from a source, which doesn't make >> any sense for a weather station: >> >> https://en.wikipedia.org/wiki/Luminosity >> >> The two things weather stations often measure are: >> >> illuminance in lux, super roughly 200 000 in full sun >> irradiance in W/m^2, roughly 1000 in full sun >> >> So the big questions are >> >> What is the measurement showing up in your luminosity column? What >> is being measured, with what units? What kinds of numbers do you see >> when the sun shines directly on the weather station, blue sky? >> >> Is something continuing to put data in that column? Why? >> >> Is "luminosity" being used in some code as a synonym (incorrectly) for >> "irradiance"? >> >> and then when you understand those answers you can figure out what to >> do, or post back with them. >> >> -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/7478e17e-e50b-4756-9fd4-1ed97602f4f3n%40googlegroups.com.
