Re: [weewx-user] Re: Chill Hours Extension

2022-01-21 Thread Seth Ratner
[[[daychill]]] plot_type = bar chillHours aggregate_type = cumulative aggregate_interval = hour That's what I have in the Seasons skin.conf. The way WeeWX is passing that to my xType is calling get_aggregate for one hour

Re: [weewx-user] Re: Storing Text as a record, wee_import and mysql UPDATE

2022-01-21 Thread Glenn McKechnie
Thanks Gary, I'll give it a test drive as soon as I get a moment or three. On a related note (ie:- related to using TEXT fields in the database) I went and checked out wee_database and found that it baulked at the TEXT field in the database. Details are in the attached file, which should keep

Re: [weewx-user] Re: Storing Text as a record, wee_import and mysql UPDATE

2022-01-21 Thread gjr80
Glenn, I have created a new branch wee_import_text off development for this and have modified the wee_import code to import text to a WeeWX TEXT field. There are a dew conditions: 1. text import only works with CSV imports 2. import source fields that are to be imported as text must use

Re: [weewx-user] Re: Chill Hours Extension

2022-01-21 Thread Tom Keffer
On Fri, Jan 21, 2022 at 4:27 PM Seth Ratner wrote: > Also, the "one hour apart" thing was because a chart was pulling chill > hour accumulation for a day on an hourly interval. The Utah method can > actually subtract chill hours, so hourly changes wont necessarily be in > hour increments. I

Re: [weewx-user] Re: Chill Hours Extension

2022-01-21 Thread Tom Keffer
I don't think you'll need genSql(). If you were trying to calculate an aggregate that required seeing every record and doing some complex calculation in Python, then, yes. But, your aggregate is simple enough that you can actually do the whole thing in an SQL query, so getSql() should suffice.

Re: [weewx-user] Re: Chill Hours Extension

2022-01-21 Thread Seth Ratner
Also, the "one hour apart" thing was because a chart was pulling chill hour accumulation for a day on an hourly interval. The Utah method can actually subtract chill hours, so hourly changes wont necessarily be in hour increments. More to follow On Friday, January 21, 2022 at 6:07:28 PM

Re: [weewx-user] Re: Chill Hours Extension

2022-01-21 Thread Seth Ratner
Ok thanks. So I just learned what a python generator is. Cleared up a lot. Dude, I am seriously floored by how much you put into programming this. I'm back-tracking my way through the code for answers, and the detail is mind-blowing. Do you have a donations link? I'll reply once I have a

Re: [weewx-user] Re: Chill Hours Extension

2022-01-21 Thread gjr80
Try using genSql() instead of getSql(). genSql() is a generator that will allow you to iterate over all rows. getSql() returns a single row. So you would have something like: for row in db_manager.genSql(sql_stmt): I would also be wary of using BETWEEN. As I understand it BETWEEN is

Re: [weewx-user] Re: Chill Hours Extension

2022-01-21 Thread Tom Keffer
Not sure why you would want to do this for times only one hour apart. Try something like this (NOT TESTED, and highly schematic): def get_aggregate(obs_type, timespan, aggregate_type, db_manager, **option_dict): if obs_type != 'chillHours': raise

Re: [weewx-user] Re: Chill Hours Extension

2022-01-21 Thread Seth Ratner
Step by step by step... I think what I want is genBatchRecords from the manager. But I have no idea what the dictionary it yields looks like, so I don't know how to work with it. I've been unsuccessful getting the dictionary to print in the logs so I can look at it. I managed to get get

Re: [weewx-user] When did the blast wave of the eruption "hit" your station? - extract your data

2022-01-21 Thread Ted Frohling
Thanks very much for the new python script.  It works. The other three files looked great as well. They were all for Tucson, AZ, USA ted On 1/20/22 6:12 PM, 'Cameron D' via weewx-user wrote: yes, definitely looks like there is no data. I have attached another version of mine, in which the

Re: [weewx-user] Re: Chill Hours Extension

2022-01-21 Thread Seth Ratner
Closer and Closer, lol row = db_manager.getSql(sql_stmt) Using: SELECT outTemp FROM archive WHERE dateTime BETWEEN 1642744800 AND 1642748400 Is returning a single outTemp. I am not sure how to return multiple rows then iterate through them to check for == chilhour and add them together. I

Re: [weewx-user] Re: Chill Hours Extension

2022-01-21 Thread Tom Keffer
Oooh. That's a perfect example! Thanks, John. On Fri, Jan 21, 2022 at 2:29 PM 'John Kline' via weewx-user < weewx-user@googlegroups.com> wrote: > Another example: > > > https://github.com/chaunceygardiner/weewx-purple/blob/e7f214539b63281d74af9e90810045dd8d1b7b80/bin/user/purple.py#L538 > > On

Re: [weewx-user] Re: Chill Hours Extension

2022-01-21 Thread 'John Kline' via weewx-user
Another example: https://github.com/chaunceygardiner/weewx-purple/blob/e7f214539b63281d74af9e90810045dd8d1b7b80/bin/user/purple.py#L538 > On Jan 21, 2022, at 2:01 PM, Seth Ratner wrote: > > It looks like there is an example in the weewx-xaggs repository. I'm about > to dive in, but from a

Re: [weewx-user] Re: Chill Hours Extension

2022-01-21 Thread Seth Ratner
It looks like there is an example in the weewx-xaggs repository. I'm about to dive in, but from a cursory look, unlike with the scalar, I'm going to have to figure out how to use dbmanager to pull the outtemps from the database then iterate through

Re: [weewx-user] Re: Chill Hours Extension

2022-01-21 Thread Tom Keffer
Let me see if I can come up with something. Give me some time. On Fri, Jan 21, 2022 at 1:37 PM Seth Ratner wrote: > Oh boy... > > I cant find any examples for that. If one exists, it will greatly reduce > the number of questions I have... > > On Friday, January 21, 2022 at 3:24:07 PM UTC-6

Re: [weewx-user] Re: Chill Hours Extension

2022-01-21 Thread Seth Ratner
Oh boy... I cant find any examples for that. If one exists, it will greatly reduce the number of questions I have... On Friday, January 21, 2022 at 3:24:07 PM UTC-6 tke...@gmail.com wrote: > You're getting close! > > You're going to have to implement get_aggregate(), as well as get_scalar(). >

Re: [weewx-user] Re: Chill Hours Extension

2022-01-21 Thread Tom Keffer
You're getting close! You're going to have to implement get_aggregate(), as well as get_scalar(). The xtypes framework has no way of taking the calculation for get_scalar() and using it to calculate an aggregate. You're going to have to do it. The good news is that once you've done it, then the

Re: [weewx-user] Re: Chill Hours Extension

2022-01-21 Thread Seth Ratner
Getting Closer, but still getting errors. I can now see the result in the archive loop (gets sent over MQTT). But with the seasons skin attempts to make a chart with it, I get: Jan 21 14:40:39 Ratner-Orchard weewx[3122] ERROR weewx.reportengine: Caught unrecoverable exception in generator

Re: [weewx-user] Re: Chill Hours Extension

2022-01-21 Thread Seth Ratner
Nevermind. Apparently all I needed to do was move the last line from the vapor pressure example "weewx.units.obs_group_dict['chillHours'] = "group_elapsed"" from the end of the file to the beginning, just under the import statements. The customization guide has it correctly, the vapor

Re: [weewx-user] Re: Chill Hours Extension

2022-01-21 Thread Seth Ratner
I'm close, I think, except now I'm getting this every loop or report generation. DEBUG weewx.wxservices: Unknown extensible type 'chillHours' There are a couple things I'm unsure of that might be causing this - I used the group type group_elapsed because it seemed like the best fit - The last

Re: [weewx-user] When did the blast wave of the eruption "hit" your station? - extract your data

2022-01-21 Thread paul.ba...@gmail.com
Hello, I did a little experience using LOWESS (also called LOESS in some places) with success I think. In my experience it is the best method I tried over the years. This non parametric local smoothing exists for many lingages including Fortran (which I used...), C, Python, R etc. It use three

Re: [weewx-user] When did the blast wave of the eruption "hit" your station? - extract your data

2022-01-21 Thread bgra...@umw.edu
Thanks all, bad copy of weewx.sdb. All is well. On Thursday, January 20, 2022 at 5:25:50 PM UTC-5 morr...@gmail.com wrote: > It looks like you retrieved no data. It calculated decent looking arrival > times, so no problem with the change you made? > > Try just a query for data spanning the

Re: [weewx-user] Skin with webcam?

2022-01-21 Thread DaveStLou
Turns out it was these two lines: mqtt_websockets_username = "" mqtt_websockets_password = "" I do not need either of these and thought leaving them blank caused them to be ignored but found out I had to comment them out. All is well. On Thursday, January 20, 2022 at 9:18:54 AM UTC-6

Re: [weewx-user] Re: Weatherflow UDP driver, Tempest battery reports 'LOW'

2022-01-21 Thread andy gavras
i just wanted to say Thank You 'jhn.p...@gmail.com' for starting this thread and vince for getting it rolling. I'm an aged 50+ closet nerd with great google skills and who learned B.A.S.I.C on an Atari... Here's what they said in the above messages in a way that worked for me. Maybe next