[field_map_extensions]]

160 views
Skip to first unread message

Harry van de Laar

unread,
Feb 2, 2025, 4:18:53 PM2/2/25
to weewx-user
Running WS90/WS3800/WEEWX: when adding this to weewx.conf:

[[field_map_extensions]]
              
        radiation = uvradiation
        ws_90 = ws90_sig
        consBatteryVoltage = ws90_batt
        signal1 = ws90_sig]
        
I get the following data:

2025-02-02 20:22:46 WET (1738527766): 'consBatteryVoltage': '2.68', 'dateTime': '1738527766', 'daymaxwind': '10.8', 'heap_free': '100928', 'inHumidity': '59', 'inTemp': '18.8', 'luminosity': '0.0', 'outHumidity': '68', 'outTemp': '12.4', 'p_dayRain': '0.7', 'p_monthRain': '1.1', 'p_rainRate': '0.0', 'p_stormRain': '0.0', 'p_weekRain': '29.2', 'p_yearRain': '35.2', 'pressure': '1021.7', 'rain': 'None', 'relbarometer': '1021.7', 'signal1': '4', 'usUnits': '17', 'UV': '0', 'uvradiation': '0.0', 'windDir': '338', 'windGust': '4.4', 'windSpeed': '3.2', 'ws_90': '4'

In short the fieldmapping works fine except for the field: radiation = uvradiation

I want to populate the "radiation" field in the database to facilitate the ET and Radiation graphs.

What do I do wrong

gjr80

unread,
Feb 2, 2025, 5:07:08 PM2/2/25
to weewx-user
Impossible to say much without some more information. I suggest you edit weewx.conf, set debug = 1, save weewx.conf and restart WeeWX.  Let WeeWX run for a couple of archive periods and then take a log extract from WeeWX startup through until the couple of archive periods have ended. Post the unmodified extract here, it is important to capture the full WeeWX startup as it contains details on the WeeWX/driver config. the Help! Posting to weewx user wiki page gives some tips for getting a good log extract.

Would also be useful to see a weectl debug report as well. Before posting the weectl debug output just check it for sensitive info, weectl debug should obfuscate such info but it is not perfect.

Gary

gjr80

unread,
Feb 2, 2025, 7:03:24 PM2/2/25
to weewx-user
Certainly, have. look through the wiki page I linked in my reply - Help! Posting to weewx user wiki page - the section Include the log! has a link that details how to view the log and take an extract. 
Gary

On 3 Feb 2025, at 08:40, van...@gmail.com wrote:
"take a log extract from WeeWX startup"  I could not find out how to do this in the documentation?  Can you provide some guidance?


Op zondag 2 februari 2025 om 22:07:08 UTC schreef gjr80:

gjr80

unread,
Feb 3, 2025, 4:19:02 PM2/3/25
to weewx-user
Reply received via email - for future replies to weewx-user posts could you please use the 'Reply all' button rather than 'Reply to author'. 'Reply all' posts publicly on weewx-user avoiding my spam filter discarding your 'post', let's someone else chime in if needed and most importantly maintains a public record of the issue to aid others in the future.

Unfortunately your log extract truncated the entire WeeWX startup so there is no detail on the WeeWX configuration. Please try again, if you are following the instructions previously linked make sure you start the capture of the log before you restart WeeWX otherwise you will miss the WeeWX startup.

The debug report looks fine. There are a few extractor entries under [Accumulator] in weewx.conf that don't appear to make much sense (uvradiation, rrain_piezo, erain_piezo, hrain_piezo, drain_piezo, wrain_piezo, mrain_piezo, yrain_piezo), but they will not be the cause of the problem.

That being said I suspect that you do not actually want to use the uvradiation field. I note in your original post you want to facilitate plotting of radiation and ET. In that case I suspect you will be wanting to use the light value from the gateway device to approximate solar radiance rather than the uvradiation field. You will find further background on this in the Ecowitt gateway device driver wiki FAQ page under 'My Ecowitt station has a light sensor on my station, but I don't see WeeWX field radiation. Where is it?' The linked page Understanding Ecowitt LAN Wi Fi Gateway API radiation fields also provides further background and instructions for approximating solar irradiance.

Gary

Harry van de Laar

unread,
Feb 3, 2025, 5:12:23 PM2/3/25
to weewx-user
Regarding the 'uvradiation'field: I noted that in gw1000.py, the 'uv' field is mapped to 'uvradiation' . I can imagine this would be overwriting/blocking the fieldmap extension in weewx.conf.   Anyway, changing the mapping in gw1000.py, results in a radiation values in the data base. 
Indeed my question is, is it the correct radiation. Thanks for the suggestions you made, I will go in to the details.
Thanks
Harry

Op maandag 3 februari 2025 om 21:19:02 UTC schreef gjr80:

gjr80

unread,
Feb 3, 2025, 5:45:48 PM2/3/25
to weewx-user
Any field mapping in the driver is considered the default or starting point - it should provide something that works for most users. Any [[field_map]] entries in the [GW1000] stanza overwrite/replace the default map contained in the driver. Any [[field_map_extensions]] entries are used to alter the default field map in use (whether that be the default field map from the driver or the field map specified in the [field_map] stanza). So any field mapping in the driver should not be overwriting any field mapping in weewx.conf.

Hopefully the linked driver wiki pages make sense of the Ecowitt solar radiation related fields available via the API and driver. When I wrote the driver my aim was to map data from the Ecowitt API to equivalent field in the WeeWX schema where they exist. The only direct equivalent was the Ecowitt 'uvi' value which is mapped to the WeeWX UV field (UV index). The Ecowitt API also provides a value referred to as 'uv' with a range of values from 0 to 65535 microwatts per square metre. This is clearly not solar irradiance as solar irradiance typically ranges from 0 to 1500 odd watts per square metre whereas the 'uv' value ranges from 0 to jut 0.065535 watts per square metre. So 'uv' was passed through by the driver as 'uvradiation' (could not use 'uv' as that would be confused with the existing WeeWX UV field). The final field provided by the API is referred to as 'light' in the API documentation and is measured in Lux. There is a commonly used approximation for solar irradiance given a light value in Lux, but it is not the place of a driver to calculate such derived parameters. That is handled better elsewhere in WeeWX, hence in the linked wiki page you will see reference to adding a calculation for WeeWX field radiation in the [StdWxCalculate] section of weewx.conf.

It's messy and not really intuitive, but there is no simple solution here..

Gary

Harry van de Laar

unread,
Feb 4, 2025, 7:46:58 AM2/4/25
to weewx-user
Thank you for the support, fully understand now how this works. Once you know it, it's simple (free after Johan Cruyff)

Op maandag 3 februari 2025 om 22:45:48 UTC schreef gjr80:
Reply all
Reply to author
Forward
0 new messages