Hi Gary,

Thank you for you clear and complete explanation, I now have the plots
being generated as I like in Seasons (haven't dared venture into
Belchertown), and am quite happy.

On Mon, 6 Jun 2022 at 14:07, gjr80 <[email protected]> wrote:

> The first requirement for plotting observation data from a driver/station
> is that the data to be plotted must be saved to database, simply put if
> it's not in the database you cannot plot it. Following on from this
> requirement is that WeeWX will only save a field to database if (1) the
> field exists in the current archive table schema (aka 'the database
> schema') and (2) the field exists in the archive record generated by WeeWX
> (software record generation) or the driver (hardware record generation). If
> these two conditions are met the field will be automatically saved to
> database by WeeWX.
>
> As you say, all of the required data is present in loop packets. The WH41
> PM2.5 data appears in WeeWX loop packet field pm2_5 and the WH45 PM2.5
> and PM10 data appears in WeeWX loop packet fields pm2_55 and pm10 (refer
> to the Field Map page
> <https://github.com/gjr80/weewx-gw1000/wiki/Field-map#tabulated-default-field-map>
> in the Ecowitt Gateway driver wiki). If you are using the default
> wview_extended schema your archive table will contain the pm2_5 and pm10
> fields but not pm2_55. To get the WH45 PM2.5 data saved to database you
> will either need to add field pm2_55 to your database schema or you will
> need to re-purpose an existing unused database field in which to store the
> pm2_55 data. I would suggest the former, just follow the instructions
> under in Adding a new type to an existing database
> <http://weewx.com/docs/customizing.htm#add_archive_type> in the
> Customization Guide. Once you have added the new field to the database you
> will need to tell WeeWX what units the new field uses, this is covered
> under Assigning a unit group
> <http://weewx.com/docs/customizing.htm#Assigning_a_unit_group> in the
> Customization Guide, but in your case the code required is:
>
> import weewx.units
> weewx.units.obs_group_dict['pm2_55'] = 'group_concentration'
>
> and you should add this code to /usr/share/weewx/user/extensions.py or
> /home/weewx/bin/user/extensions.py (as applicable).
>
> If you want to save the WH45 PM2.5 data in a (new) database field of your
> own choosing, for example say indoor_pm2_5, then you will need to add a
> field map extensions entry under [GW1000] in weewx.conf to map the WH45
> PM2.5 data to WeeWX field indoor_pm2_5, something like:
>
> [GW1000]
>     ....
>     [[field_map_extensions]]
>         indoor_pm2_5 = pm2_55
>
> you would then need to follow the earlier instructions for adding a field
> to the database but use indoor_pm2_5 as the field name instead of pm2_55.
>
> Once you restart WeeWX you should have WH41 PM2.5, WH45 PM2.5 and WH45
> PM10 data being saved to database. You can now make the necessary changes
> to the Season skin to create/display the desired plots.
>
> I'm not quite sure what you mean by "I'd like to map the indoor pm2.5 (and
> pm10) separately from the outdoor pm2.5". These three fields are already
> mapped separately, do you mean plotted instead of mapped?
>
> Assuming you are using the 'new' parameterised Season skin introduced in
> WeeWX v4.6.0 you will need to make a few changes to skin.conf to generate
> and display the plots you desire. There is already a plot that displays
> PM2.5 and PM10, you can add the WH45 PM2.5 data to the plot by adding
> [[[[pm2_55]]]] to [[[daypm]]] under [ImageGenerator] [[day_images]], ie:
>
> [ImageGenerator]
>     ....
>     [[day_plots]]
>         ....
>         [[[daypm]]]
>             [[[[pm1_0]]]]
>             [[[[pm2_5]]]]
>             [[[[pm10]]]]
>             [[[[pm2_55]]]]
>
> You will need to make similar changes to [[[weekpm]]], [[[monthpm]]] and
> [[[yearpm]]]. This will result in the plots being likely being labelled
> 'pm2_5 pm10 pm2_55', you can change this to something more appealing by
> using the label option for each series, eg:
>
> [[[daypm]]]
>     [[[[pm1_0]]]]
>     [[[[pm2_5]]]]
>         label = Outdoor PM2.5
>     [[[[pm10]]]]
>         label = Indoor PM10
>     [[[[pm2_55]]]]
>         label = Indoor PM2.5
>
> Note that this needs to be applied to each plot ie [[[daypm]]],
> [[[weekpm]]], [[[monthpm]]] and [[[yearpm]]]. Or you could add some
> suitable labels under [StdReport] [[Defaults]] [[[Labels]]]
> [[[[Generic]]]] in weewx.conf, eg:
>
>
> [StdReport]
>     ....
>     [[Defaults]]
>         ....
>         [[[Labels]]]
>             ....
>             [[[[Generic]]]]
>                 ....
>                 pm2_5 = Outdoor PM2.5
>                 pm10 = Indoor PM10
>                 pm2_55 = Indoor PM2.5
>
> If you want to have separate indoor and outdoor plots for PM2.5/PM10 then
> you would need to:
> 1. modify [[[daypm]]] and friends under [ImageGenerator] to plot either
> indoor or outdoor only
> 2. create a new plot, say [[[dayoutdoorpm]]] (and friends)
> 3. modify plot_groups under [DisplayOptions] in skin.conf to display the
> new plot
>
> I see you have two rain gauges, if you want to plot the WS90 rain data
> (the p_* fields) then you will need to go through a similar process as
> you will with pm2_55.
>
> Gary
>
> On Monday, 6 June 2022 at 08:53:17 UTC+10 [email protected] wrote:
>
>> Hi all,
>>
>> I have the WH90,
>> WH40 (bucket-style rainfall)
>> WH41 (outdoor PM2.5 sensor)
>> WH45 (indoor PM2.5/PM10/CO2/Temp/Humidity)
>> WH57 (lightning).
>>
>> On the GW2000's webpage
>> on my ecowitt.net webpages, I can see all of these. Running the weewx
>> driver in debug mode (0.50b4) I see all of the sensors (output below). I'm
>> having some difficulty getting a graph on the Seasons skin for CO2, and I'd
>> like to map the indoor pm2.5 (and pm10) separately from the outdoor pm2.5.
>> I guess it's a matter of paying attention to the mapping section of
>> weew.conf and/or creating some additional DB fields?
>>
>> root@weather:/etc/weewx# PYTHONPATH=/usr/share/weewx python3 -m
>> user.gw1000 --live-data --ip-address=202.12.111.10
>>
>> Using configuration file /etc/weewx/weewx.conf
>>
>>
>> Interrogating GW2000 at 202.12.111.10:45000
>>
>>
>> GW2000 live sensor data (2022-06-06 08:52:21 AEST (1654469541)):
>> 'absbarometer': '931.800000', 'annual_reset': '0.000000', 'co2':
>> '518.000000', 'co2_24h_avg': '485.000000', 'day_reset': '0.000000',
>> 'daymaxwind': '67.320000', 'gain0': '1.000000', 'gain1': '1.000000',
>> 'gain2': '1.000000', 'gain3': '1.000000', 'gain4': '1.000000', 'gain5':
>> '1.000000', 'gain6': '1.000000', 'gain7': '1.000000', 'gain8': '1.000000',
>> 'gain9': '1.000000', 'gustspeed': '55.080000', 'humid17': '45.000000',
>> 'inhumid': '43.000000', 'intemp': '18.900000', 'light': '14150.000000',
>> 'lightningcount': '0.000000', 'lightningdettime': 'None', 'lightningdist':
>> 'None', 'outhumid': '87.000000', 'outtemp': '4.900000', 'p_rainday':
>> '1.730000', 'p_rainevent': '1.860000', 'p_rainmonth': '2.230000',
>> 'p_rainrate': '0.000000', 'p_rainweek': '1.950000', 'p_rainyear':
>> '28.080000', 'pm10': '2.200000', 'pm10_24h_avg': '2.700000', 'pm251':
>> '1.000000', 'pm251_24h_avg': '1.900000', 'pm255': '1.300000',
>> 'pm255_24h_avg': '1.500000', 'relbarometer': '932.800000', 't_rainday':
>> '0.930000', 't_rainevent': '1.130000', 't_rainhour': '1.000000',
>> 't_rainmonth': '1.480000', 't_rainrate': '0.000000', 't_rainweek':
>> '1.160000', 't_rainyear': '13.850000', 'temp17': '21.500000', 'uv':
>> '9.900000', 'uvi': '1.000000', 'week_reset': '0.000000', 'wh40_batt':
>> '1.60', 'wh40_sig': '4.000000', 'wh41_ch1_batt': '5.000000',
>> 'wh41_ch1_sig': '4.000000', 'wh45_batt': '6.000000', 'wh45_sig':
>> '4.000000', 'wh57_batt': '5.000000', 'wh57_sig': '4.000000', 'winddir':
>> '283.000000', 'windspeed': '15.840000', 'ws90_batt': '3.14', 'ws90_sig':
>> '4.000000'
>>
>>
>> And some packet capture
>>
>> 2022-06-06 08:46:30 AEST (1654469190): 'co2': '520', 'co2_24h_avg':
>> '485', 'dateTime': '1654469190', 'daymaxwind': '18.7', 'dayRain': '9.3',
>> 'extraHumid17': '46', 'extraTemp17': '21.4', 'hourRain': '10.0',
>> 'inHumidity': '43', 'inTemp': '18.8', 'lightning_distance': 'None',
>> 'lightning_last_det_time': 'None', 'lightning_strike_count': '0',
>> 'lightningcount': '0', 'luminosity': '14300.0', 'monthRain': '14.8',
>> 'outHumidity': '88', 'outTemp': '4.6', 'p_dayRain': '17.3', 'p_monthRain':
>> '22.3', 'p_rain': '0.0', 'p_rainRate': '0.0', 'p_stormRain': '18.6',
>> 'p_weekRain': '19.5', 'p_yearRain': '280.8', 'pm2_5': '1.0',
>> 'pm2_51_24h_avg': '1.9', 'pm2_55': '1.2', 'pm2_55_24h_avg': '1.5', 'pm10':
>> '2.0', 'pm10_24h_avg': '2.7', 'pressure': '931.7', 'rain': '0.0',
>> 'rainRate': '0.0', 'relbarometer': '932.7', 'stormRain': '11.3', 'usUnits':
>> '17', 'UV': '1', 'uvradiation': '9.9', 'weekRain': '11.6', 'wh40_batt':
>> '1.6', 'wh40_sig': '4', 'wh41_ch1_batt': '5', 'wh41_ch1_sig': '4',
>> 'wh45_batt': '6', 'wh45_sig': '4', 'wh57_batt': '5', 'wh57_sig': '4',
>> 'windDir': '286', 'windGust': '13.2', 'windSpeed': '6.0', 'ws90_batt':
>> '3.14', 'ws90_sig': '4', 'yearRain': '138.5'
>>
>> 2022-06-06 08:46:50 AEST (1654469210): 'co2': '519', 'co2_24h_avg':
>> '485', 'dateTime': '1654469210', 'daymaxwind': '18.7', 'dayRain': '9.3',
>> 'extraHumid17': '46', 'extraTemp17': '21.4', 'hourRain': '10.0',
>> 'inHumidity': '43', 'inTemp': '18.8', 'lightning_distance': 'None',
>> 'lightning_last_det_time': 'None', 'lightning_strike_count': '0',
>> 'lightningcount': '0', 'luminosity': '12460.0', 'monthRain': '14.8',
>> 'outHumidity': '88', 'outTemp': '4.6', 'p_dayRain': '17.3', 'p_monthRain':
>> '22.3', 'p_rain': '0.0', 'p_rainRate': '0.0', 'p_stormRain': '18.6',
>> 'p_weekRain': '19.5', 'p_yearRain': '280.8', 'pm2_5': '1.0',
>> 'pm2_51_24h_avg': '1.9', 'pm2_55': '1.3', 'pm2_55_24h_avg': '1.5', 'pm10':
>> '2.3', 'pm10_24h_avg': '2.7', 'pressure': '931.7', 'rain': '0.0',
>> 'rainRate': '0.0', 'relbarometer': '932.7', 'stormRain': '11.3', 'usUnits':
>> '17', 'UV': '0', 'uvradiation': '0.0', 'weekRain': '11.6', 'wh40_batt':
>> '1.6', 'wh40_sig': '4', 'wh41_ch1_batt': '5', 'wh41_ch1_sig': '4',
>> 'wh45_batt': '6', 'wh45_sig': '4', 'wh57_batt': '5', 'wh57_sig': '4',
>> 'windDir': '310', 'windGust': '8.9', 'windSpeed': '8.9', 'ws90_batt':
>> '3.14', 'ws90_sig': '4', 'yearRain': '138.5'
>>
>>
>>
>>
>>
>> --
>>
>>   "I and the public know
>>   what all schoolchildren learn
>>   Those to whom evil is done
>>   Do evil in return"         W.H. Auden, "September 1, 1939"
>>
>>
>> --
> 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/27f35665-ff5f-429e-ba94-be135189e4a3n%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/27f35665-ff5f-429e-ba94-be135189e4a3n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 

  "I and the public know
  what all schoolchildren learn
  Those to whom evil is done
  Do evil in return"            W.H. Auden, "September 1, 1939"

-- 
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/CA%2BxzKjD6wv4kEsrcnmMfHC5qgGvOT-06tyvhnUaWB6icveFidw%40mail.gmail.com.

Reply via email to