Probably the simplest (always a good idea) is to just give the inverter its
own instance of weewx and its own database. In the driver, you can
implement genArchiveRecords() to get batches of data in a catch up.

Then combine the two databases when it comes time to do a report.

There are other possibilities, but they would be way more complicated.



On Tue, Dec 1, 2020 at 12:52 PM [email protected] <
[email protected]> wrote:

> I've created an extension to read data from my photovoltaic inverter. The
> inverter has a 5-min interval which perfectly works together with my 300s
> interval, every archive interval I fire a REST call to the inverter to get
> the most current values. It works as expected, but querying the inverters
> REST interface is slow. One request takes about 2 -4 seconds, which isn't
> too much of a big deal every archive_interval.
>
> But it's a big deal when it comes to backfilling data. But there's a
> possibility to speed things up: it's really the REST call, which is slow,
> there is not much difference in time consumption if I ask the inverter a
> single 5-minute-reading or some hundred readings.
>
> The idea is to query the inverter between now, and latest entry in
> archive. This would be one entry, if everything is up an running, but 12
> entries, for instance, if there is a need to backfill an hour of console
> values. The values read from the inverter I want to store in a static
> cache. The current dateTime in every archive interval to be stored would be
> the key to this data structure, if an entry was stored to archive, the
> caches' entry in memory will be deleted.
>
> So, it's more a python than a weewx question. The extensions code cam be
> found at:
> https://github.com/mKainzbauer/weewx_extensions/blob/master/fronius.py
>
> --
> 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 on the web visit
> https://groups.google.com/d/msgid/weewx-development/eaf73818-3c1a-4712-90e9-f5347f463e6bn%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-development/eaf73818-3c1a-4712-90e9-f5347f463e6bn%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 on the web visit 
https://groups.google.com/d/msgid/weewx-development/CAPq0zEAt7j1P%3Dv2N6vjziNXV3eE5r3tdRVMEvZtzqZ1ttPPoYg%40mail.gmail.com.

Reply via email to