Hi, The answer really depends on what you want to display, a standard weeWX install should be able to display 'some' cloudbase data in a weeWX generated report. To understand what can and cannot be included in a report (ie what is 'some') requires the understanding of a few issues or concepts.
To display data in a weeWX generated report using a tag <http://weewx.com/docs/customizing.htm#Tags> (eg $current.outTemp or $year.dewpoint.max) requires that the underlying observation (in the case of the examples outTemp and dewpoint) must appear as fields in either the archive records or loop packets produced by weeWX/the driver. The fields included in the archive record and loop packet vary from station to station and also depending on how you configure weeWX, typically the fields will comprise those observations emitted by the driver for your station and a number of derived observations calculated by weeWX. Station/driver emitted fields can be found in the Hardware Guide <http://weewx.com/docs/hardware.htm> under *Station data* for your station. The derived fields are calculated by weeWX using the StdWXCalculate service <http://weewx.com/docs/usersguide.htm#StdWXCalculate>. You can see what fields are included in archive records and loop packets for your setup by running weeWX directly <http://weewx.com/docs/usersguide.htm#Running_directly>; REC: output indicates an archive record and LOOP: indicates a loop packet. When weeWX generates an archive record some or all of the data is stored in the weeWX database. Only fields that are common to the archive record and the archive table schema are saved. You can find details on the default archive table schema used by weeWX in the Archive types appendix <http://weewx.com/docs/customizing.htm#archive_types> to the Customization Guide. So if your station emits fields outTemp and windLinkStatus fields then under a default install field outTemp would be saved to database but field windLinkStatus would not. So now that we understand what data is being produced and stored by our system we can consider what tags are available. The $current tag can be used to display the value of any field in the current archive record, irrespective of whether the field is being saved to database. If you wish to display any historical values or aggregates, eg $trend, $span, $month or $year, then the observation concerned must be being saved to database. If we consider the cloudbase field; a standard weeWX install will use the StdWXCalculate service to calculate cloudbase and add it to each archive record. Therefore the $current.cloudbase tag is available for use in reports. The default archive table schema does not include cloudbase, so even though cloudbase appears in the archive record it is not saved to database, therefore we cannot use historical or aggregate tags such as $day.cloudbase.min or $trend.cloudbase. If you want to use cloudbase with these historical or aggregate tags then you would need to customize your archive table schema by adding a cloudbase field. Customizing the schema is a straightforward task and is described Adding a new type to the archive database <http://weewx.com/docs/customizing.htm#add_archive_type> in the Customization Guide. There are other ways to include tag like data in a report, you can use some in-line python code in your template to calculate a value, assign it to a variable and then use the variable anywhere in your report. For more complex cases you might create a Search List Extension to calculate a value and add it to the report searchlist <http://weewx.com/docs/customizing.htm#extending_the_list>. Both of these approaches require some python skills. Just to round of the subject, if you wish to plot an observation using the weeWX plot engine then that observation must be being saved to database. So in the case of cloudbase you would need to alter the archive table schema to include cloudbase. Gary On Wednesday, 28 March 2018 20:48:27 UTC+10, [email protected] wrote: > > Some idea -- 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]. For more options, visit https://groups.google.com/d/optout.
