Re: [weewx-development] Re: How to Access summaries in a restful driver

2020-11-01 Thread Karen K
I was curious about the XTypes. So I could not wait and tried them for some values I had not included by now. It works great. Some time spans are not to be aligned at boundaries. For them I tried: from weeutil.weeutil import TimeSpan h3timespan = TimeSpan(_time_ts-10800,_time_ts) I hope that wo

Re: [weewx-development] Re: How to Access summaries in a restful driver

2020-10-31 Thread Karen K
Thank you all for your support. What Tom Keffer suggested sounds short and simple. I did not test it by now, because it already worked, but I think, I will try that solution at a later time. I uploaded a first version of the driver to github: https://github.com/roe-dl/weewx-wns -- You receiv

Re: [weewx-development] Re: How to Access summaries in a restful driver

2020-10-30 Thread Tom Keffer
There is an API for calculating these things: XTypes . It will automatically calculate using the daily summaries if it can. No need to do the SQL queries directly. It would look something like this. (NOT TESTED; highly schematic, par

[weewx-development] Re: How to Access summaries in a restful driver

2020-10-30 Thread Vince Skahan
On Friday, October 30, 2020 at 7:46:14 AM UTC-7, Karen K wrote: > I only wonder why those summeries are calculated, then. To no purpose? I > don't know. > > Pre-calculated info you can query much faster than aggregating the low-level archive data. Think of the NOAA reports. If you wanted to lo

[weewx-development] Re: How to Access summaries in a restful driver

2020-10-30 Thread Karen K
Hi Gary, thank you very much for your reply. I did as you suggested, and it worked. I only wonder why those summeries are calculated, then. To no purpose? I don't know. Karen gjr80 schrieb am Donnerstag, 29. Oktober 2020 um 12:12:59 UTC+1: > Hi, > > You are on the right track but making thing

[weewx-development] Re: How to Access summaries in a restful driver

2020-10-29 Thread gjr80
Hi, You are on the right track but making things difficult for yourself by trying to use the daily summaries to obtain day max/min aggregates. Whilst it’s true that the day max/min values can be found in the daily summaries they are also available by querying the archive table. In this case qu