This is exactly what XTypes <https://github.com/weewx/weewx/wiki/xtypes> are for.
For an example of using XTypes in an energy monitoring context, see weewx-brultech <https://github.com/tkeffer/weewx-brultech>. On Fri, Jan 10, 2025 at 2:19 PM 'Peter Fletcher' via weewx-development < [email protected]> wrote: > I am working on a service which will take current energy production data > from my PV solar monitoring system and store it in the weewx database, to > be reported to a modified version of the (pre-4.2) Seasons skin. The data I > want to store is already being written at 5 min intervals to a transient > file on the Raspberry Pi on which I am running weewx, so so far, so easy. I > would also like to *display*, in 'Current Conditions', but not store, > current totals for various periods (e.g. Today, this month, this utility > billing period, this year). I assume that the Report generator could > compute these from the archived energy generation values, but accurate > values for all these totals are already available in the same file that > contains the current production data, and it seems stupid, as well as > potentially error-prone, to recalculate them. Is it possible just to make > such values available to the report generator - e.g. by inserting > appropriate tuples in Loop or Archive records within the Service? > > -- > You received this message because you are subscribed to the Google Groups > "weewx-development" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion visit > https://groups.google.com/d/msgid/weewx-development/c51f55d7-340f-4ed4-a295-0e559f4ced03n%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-development/c51f55d7-340f-4ed4-a295-0e559f4ced03n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "weewx-development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/weewx-development/CAPq0zEAGm0ODNOq4GDurJwMWekhR9TSFvFtzRZBnzPSNYP6Z5g%40mail.gmail.com.
