Re: [weewx-development] Testing StdQC spike detection - how to write a unit test?

2017-01-21 Thread Thomas Keffer
I like the way you're thinking, but it's important that the tests be deterministic and repeatable. Otherwise, you're left judging what is "out of regular." Make sure whatever Poisson generator you use can put out repeatable values. However, we've closed V3.7 to new features. We're trying to

Re: [weewx-development] time stamps as DB keys in local time or UTC?

2017-01-24 Thread Thomas Keffer
Weewx uses Unix Epoch Time , which is basically UTC. The fields dateTime in the databases are also in Unix Epoch Time. However, most of the plots and reports are done in local time. This means there is a lot of code dedicated to switching back and forth

Re: [weewx-development] multiple source reporting problem

2017-01-18 Thread Thomas Keffer
No problem. The reason I ask, is that the upcoming V3.7 treats the current record differently. Let me make sure I understand the setup you have. You have one MySQL database, with two archive tables. The default 'archive', and another one 'archive_wmr'. The former is the traditional table, and

Re: [weewx-development] Dynamic History Plots using D3

2016-09-10 Thread Thomas Keffer
On Sat, Sep 10, 2016 at 11:06 AM, Chris Matteri wrote: > > I would certainly be open to real-time updates, but that would probably > work better with WeeRT as a backend, because there's no way to get the data > between the last archive record and the time the webpage

Re: [weewx-development] Tracking down a long standing memory leak

2016-11-06 Thread Thomas Keffer
I certainly don't have any explanation either. I don't see why the template name would make any difference. Have you been able to replicate the problem on another machine? -tk On Sat, Nov 5, 2016 at 6:55 PM, gjr80 wrote: > I have had a long running memory leak on my

Re: [weewx-development] Template iteration every archive period

2016-11-28 Thread Thomas Keffer
Well, the good news is that the Cheetah generator looks to see if the file has already been generated. If it has, then, unless it's for the current date, it skips it. So, you'd have to generate all those (hundreds?, thousands?) of files only once. -tk On Mon, Nov 28, 2016 at 9:07 AM, Louis De

Re: [weewx-development] Template iteration every archive period

2016-11-28 Thread Thomas Keffer
/weewx/commit/5ce08946d9e43482334eb65bcecc92e6dfc503fc> . -tk On Mon, Nov 28, 2016 at 9:29 AM, Thomas Keffer <tkef...@gmail.com> wrote: > BTW, if your problem is just a simple matter of getting the filename > right, you could write a sed script that runs through skin.conf, changing a > file name to today's

Re: [weewx-development] Re: candidate for Standard skin replacement

2016-11-12 Thread Thomas Keffer
Now I get Nov 12 18:22:57 nuc wee_reports[6146]: cheetahgenerator: Generate failed with exception '' Nov 12 18:22:57 nuc wee_reports[6146]: cheetahgenerator: Ignoring template /home/weewx/skins/Standard/index.html.tmpl Nov 12 18:22:57 nuc wee_reports[6146]: cheetahgenerator: Reason:

Re: [weewx-development] Using weewx imports in a template

2016-10-31 Thread Thomas Keffer
It's certainly a valid technique, but it does have a number of disadvantages: 1. As you say, lack of code reuse. 2. Maintenance is harder. If you discover a bug, it must be hand patched in all the different templates by the user, as opposed to you fixing it in one place in the SLE.

Re: [weewx-development] Bug in uwxutils.py

2017-01-11 Thread Thomas Keffer
Gack! That's been in there since the original translation from Pascal, now 4 years ago! Fixed in commit 2cd9344f . Thank you for your sharp eyes! -tk On Wed, Jan 11, 2017 at 4:31 PM, Gone Bush

Re: [weewx-development] How to interpret Vantage sunrise/sunset loop packet epochs?

2016-12-01 Thread Thomas Keffer
y to get access to this (and the other > almanac data) from within a service rather than calculating it multiple > times on the fly for a weewx downstream service? > > Graham > > On 1 December 2016 at 10:48:52, Thomas Keffer (tkef...@gmail.com) wrote: > > I missed that.

Re: [weewx-development] Dynamic History Plots using D3

2017-01-07 Thread Thomas Keffer
react too heavyweight? Wow! Remind me never to go backpacking with you. :-) -tk On Sat, Jan 7, 2017 at 10:13 AM, mwall wrote: > chris, > > angular (1 or 2) has way too much overhead > > react is more heavyweight than i would like as well > > i lean toward riot: > >

Re: [weewx-development] Dynamic History Plots using D3

2017-01-07 Thread Thomas Keffer
ably not worth the increased complexity, so I > agree that SVG should be used. > > On Sat, Jan 7, 2017 at 2:09 PM, Thomas Keffer <tkef...@gmail.com> wrote: > >> react too heavyweight? Wow! Remind me never to go backpacking with you. >> :-) >> >> -tk >> &

Re: [weewx-development] Dynamic History Plots using D3

2017-01-07 Thread Thomas Keffer
lar 2 (which is > different enough from Angular 1 that people are calling it a new framework > rather than an upgrade), Angular 1 is on track to become less relevant. If > you're interested in React, I would be happy to help port the client to it. > > -Chris > > On Sat, Sep

Re: [weewx-development] Dynamic History Plots using D3

2017-01-09 Thread Thomas Keffer
> browsers that support it (http://caniuse.com/#search=es6). I used ES6 > liberally in WXPlot. There were a few features that didn't work without > Babel in Firefox and Safari, but Babel works well and is necessary anyways > if we use React with JSX. > -Chris > > On Sat, Jan

Re: [weewx-development] Json data for Graphing

2017-01-08 Thread Thomas Keffer
Agree completely. Another idea is to adapt the existing cheetahgenerator to put out JSON format: $current.json or $month.outTemp.json Other formats could be requested in a similar manner: $month.outTemp.csv(delimiter=',') I would start by figuring out the various use cases. If what

Re: [weewx-development] using weewx development branch on ubuntu

2017-03-22 Thread Thomas Keffer
Just checkout the development branch in your local git repository and run it from there, using the configuration file that the debian package uses. For example, cd ~/git/weewx git checkout development​ ./bin/weewxd /etc/weewx/weewx.conf -tk On Wed, Mar 22, 2017 at 6:27 AM, Paolo Benvenuto

Re: [weewx-development] Re: Advice on a new driver and how to make it available

2017-03-21 Thread Thomas Keffer
You need to store it somewhere, or host the repository on GitHub. Then make a wiki entry that points to its location. There are extensions that use both approaches on the wiki. For example, here's one that's hosted externally , and here's one hosted on GitHub

Re: [weewx-development] Pressure resolution and BMP280

2017-04-01 Thread Thomas Keffer
The only thing that matters is that the packet yielded by the driver use a consistent unit system. Doesn't matter what that unit system is, but all measurements in the packet have to use it. See the Appendix *Units * for the definitions of the three unit systems, US, METRIC, and METRICWX. -tk

Re: [weewx-development] Standard Profile in Spanish

2017-03-04 Thread Thomas Keffer
I take it back. The French translation is not packaged as an extension. Take a look at some of the other extensions, as well as the section on Extensions <http://weewx.com/docs/customizing.htm#extensions> in the Customizing Guide. -tk On Sat, Mar 4, 2017 at 11:32 AM, Thomas Keffer

Re: [weewx-development] Pressure resolution and BMP280

2017-04-01 Thread Thomas Keffer
Weewx doesn't round anything. It just passes values on to the database. How the database handles it depends on the type of database, driver, and how it's configured. -tk On Sat, Apr 1, 2017 at 11:03 AM, Craig Thom wrote: > I'm working an a RPi SPI service to read a

Re: [weewx-development] python 2 EOL approaching

2017-08-03 Thread Thomas Keffer
No. The problem is that a lot of the utilities that weewx depends on have not been ported to Python 3 (Cheetah, in particular). I actually tried a port to P3 a few months ago. Very frustrating. I'm not particularly concerned. Python 2 will be around for the next 20 years. -tk On Thu, Aug 3,

Re: [weewx-development] Bloomsky support

2017-06-27 Thread Thomas Keffer
Hi, Gary A couple of things to keep in mind: 1. Generally, I think you're better off with one instance for each device. Yes, people have written services that can poll additional devices, but this is a bit of a kludge. The one-instance/one-device pattern makes startup simpler, allows

Re: [weewx-development] Re: retrieving total rain in a custom service

2017-04-25 Thread Thomas Keffer
1. No idea about the WS1080. You'd have to ask Matthew, our FO expert. 2. In weewx, 'rain' is the amount of rain *that fell during an interval*. You have to sum it up to get total rain. 3. The query returns a tuple, where each element corresponds to an element in the SELECT statement. You're

Re: [weewx-development] weeWx on a Raspberry Pi giving 'Broken Pipe' errors

2017-08-07 Thread Thomas Keffer
I'm not familiar with what you're doing, so this may be a stupid question. Why not use the SIG_DFL handler, then just catch the resultant IOError exception and retry? -tk On Wed, Aug 2, 2017 at 8:53 PM, wrote: > This relates to the latest update of my HP1000 (and clone)

Re: [weewx-development] Sooooooo Confused

2017-09-16 Thread Thomas Keffer
(as an aside, you should be directing this query to weewx-user, not weewx-development) Take a look at the section in the manual, *WeeWX generates HTML pages, but it does not update them .* -tk On Sat, Sep 16, 2017 at 11:56 AM,

Re: [weewx-development] Correct handling exceptions in driver during connection lost to PWS

2017-10-05 Thread Thomas Keffer
Any number of errors will cause WeeWX to "start from the top," that is, essentially, reboot the internal engine. One such error is a database error. Part of the rebooting process is to kill the reporting thread. So, my guess is that your MySQL database went offline for some reason. This caused

Re: [weewx-development] Review request: Duplicate database using, weewx.NEW_ARCHIVE_RECORD.

2017-10-13 Thread Thomas Keffer
Assuming you've got an appropriate entry in [DataBindings] for your binding 'sqlitedup_binding', yes, you've got the idea. If you don't want the daily summaries, in the [DataBindings] section, option manager, substitute Manager for WXDaySummaryManager. (Although, I must admit, I've never actually

Re: [weewx-development] Correct handling exceptions in driver during connection lost to PWS

2017-10-07 Thread Thomas Keffer
I think I understand what's happening. Your MySQL server is raising error #2006 ("MySQL server has gone away"), which is *not* recoverable in the present version of weewx. Last May, PR #246 was created to fix this problem, but it has not been released

Re: [weewx-development] NMEA Support - Raspberry PI

2017-12-02 Thread Thomas Keffer
Take a look at this driver for the Airmar 150WX , which uses NMEA. It's a bit of a hack, but it might get you started. -tk On Sat, Dec 2, 2017 at 2:32 AM, Adam Lewis wrote: > I've searched the User Guide and the

Re: [weewx-development] Query against archive_day_outTemp

2017-11-19 Thread Thomas Keffer
to finish each 5 minute “process”. >>> I’ve done some pretty simple tuning in Maria (which I’ll document in a post >>> soon) and have gotten that down to under a minute now. >>> >>> >>> >>> Any thoughts on where to look? And out o

Re: [weewx-development] weewx service for end of day, end of month and end of year?

2017-12-31 Thread Thomas Keffer
It would be nice to have a totally asynchronous engine that can handle events from a random timer, but we don't. The price we pay for a super-simple, easy-to-understand engine. Still, the option report_timing may do what you want. It

Re: [weewx-development] NMEA Support - Raspberry PI

2018-01-15 Thread Thomas Keffer
1. It's weewx.drivers, not weewx.driver. 2. You did not provide any context on the error. Assuming you meant to type weewx.drivers, the problem is likely to be a PYTHONPATH problem. -tk On Mon, Jan 15, 2018 at 1:43 PM, Thomas Boström wrote: > Trying to run the

Re: [weewx-development] multi axis graphs

2018-01-14 Thread Thomas Keffer
You would have to modify / replace class weeplot.genplot.GeneralPlot, adding a mechanism to separate the lines scaled by the left axis, from the lines scaled by the right axis. Alternatively, use one of the many fine Javascript plotting packages out there, and include it in the client. Have it

Re: [weewx-development] Custom driver and skin.conf: NoColumnError: no such column: extraHumid3

2018-02-02 Thread Thomas Keffer
Yes. The default "wview " schema includes only extraHumid1 and extraHumid2. You would have to add extraHumid3. See the section *Customizing the database * for how to do this.

Re: [weewx-development] Re: Instaling alarm.py from examples

2018-02-12 Thread Thomas Keffer
I am not following you when you say "a new syslog message just 2 code lines after the evaluated True messages." Does that mean you have something like this: # Log it syslog.syslog(syslog.LOG_INFO, "alarm: Alarm expression \"%s\" evaluated True at %s" % (self.expression,

Re: [weewx-development] Instaling alarm.py from examples

2018-02-11 Thread Thomas Keffer
It's possible some other exception occurred after the alarm was triggered, but before the email would have been sent out. Because the alarm is sent in a separate thread, the exception would have been quietly swallowed without a log message. Try this version of alarm.py. It will catch any

Re: [weewx-development] generic 'wee_upload' tool to replace wunderfixer

2018-01-01 Thread Thomas Keffer
The heart of Wunderfixer is figuring out what records are missing on the WU, then selectively uploading only them. Figuring that out is highly service-specific if, indeed, it's possible at all. The rest of the logic is pretty simple. I can imagine rewriting it so that it explicitly recognizes

Re: [weewx-development] Re: WeeRT - realtime interface to weeWX

2018-08-08 Thread Thomas Keffer
Just discovered an error that causes wind direction to be N/A in the wind compass, when assembling a packet from partial packets. Pull, rebuild the client, redeploy. -tk On Mon, Jul 2, 2018 at 6:34 PM Thomas Keffer wrote: > Good. > > I guess we don't need connectNull a

Re: [weewx-development] Observation unit label without the observation value in Cheetah

2018-08-13 Thread Thomas Keffer
Would the $unit tag work for you? -tk On Sun, Aug 12, 2018 at 7:31 PM Pat O'Brien wrote: > Google Groups seems to be having a hard time tonight. Sorry if this is the > 3rd post. This is my 3rd attempt at asking the question... >

Re: [weewx-development] Differences after database cleanup

2018-08-14 Thread Thomas Keffer
Hello, Cyril While WeeWX is running, it records the max and min values seen in the LOOP packets --- the raw packets that come off your weather station. These go into the daily summaries. However, if the daily summaries get damaged and must be rebuilt, WeeWX has only the archive data available.

Re: [weewx-development] Re: WeeRT - realtime interface to weeWX

2018-08-08 Thread Thomas Keffer
First time I've heard of Node-RED. Looks interesting. For years people have been trying to create effective "visual programming" tools. Perhaps IBM has finally succeeded! -tk On Wed, Aug 8, 2018 at 6:14 AM Cyril D wrote: > > I have been also interested in having a real time display of the >

Re: [weewx-development] Node newbie: Weert client and server as separate processes

2018-08-29 Thread Thomas Keffer
Hello, Tom In your context, I'm not sure what you are referring to as the "client." Do you mean the WeeRT server? The client is generally the browser. -tk On Sun, Aug 26, 2018 at 3:54 AM Tom Mitchell wrote: > Really excited about this weert-js! Following the instructions in the > README, I

Re: [weewx-development] Re: wee_extension --uninstall does not remove multiple SKIN_ROOT skin directories

2018-09-06 Thread Thomas Keffer
That sounds like a reasonable analysis. This is an obscure problem. Can we just use a workaround and call the two skins "Belchertown" and "Highcharts_Belchertown," or something similar? BTW, Pat, how are you enjoying your new life as a maintainer of open source code? :-) -tk On Thu, Sep 6,

Re: [weewx-development] Re: wee_extension --uninstall does not remove multiple SKIN_ROOT skin directories

2018-09-06 Thread Thomas Keffer
It's a Wiki! Anyone can edit. Go at it! On Thu, Sep 6, 2018 at 10:21 AM Pat O'Brien wrote: > hah! > > Tom, I see I can edit the weewx wiki on GitHub. Is it OK to edit and add > the link to the Belchertown skin - or would you rather control that update? > > > On Thursday, September 6, 2018 at

Re: [weewx-development] Re: Getting full HTML_ROOT path

2018-08-29 Thread Thomas Keffer
The simplest is to just join the two paths, then normalize, but it looks like you've already figured that out! -tk On Tue, Aug 28, 2018 at 2:15 PM Pat O'Brien wrote: > Here's the GitHub repo > , > but this

Re: [weewx-development] MacOS (10.11.6) wview user converting to weewx, python errors

2018-03-07 Thread Thomas Keffer
18 at 7:52 AM, Thomas Keffer <tkef...@gmail.com> wrote: > Well, I'm sorry to hear that the Mac prefers easy_install. These days, > it's pretty old school, having been replaced by pip. But, be that as it > may.. > > I don't know why easy_install is trying to install pysqlite

Re: [weewx-development] Re: Instaling alarm.py from examples

2018-04-06 Thread Thomas Keffer
You should use the version of alarm.py that comes with weeWX. It's in the directory 'examples'. It can also be downloaded here . -tk On Fri, Apr 6, 2018 at 11:34 AM, Jesper wrote: > > > Den

[weewx-development] WeeRT - realtime interface to weeWX

2018-04-05 Thread Thomas Keffer
This is something I've been fiddling with for quite a while: a realtime display for weeWX. Live demo . Github repository . It consists of a Node server running Express, an InfluxDB database, and

Re: [weewx-development] WeeRT - realtime interface to weeWX

2018-04-22 Thread Thomas Keffer
Right you are! Good sleuthing! Fixed in commit a0045078cc . I also have limited experience with Node, React, etc., but it has been a great learning experience playing with them. What kind of weather station do

Re: [weewx-development] ubuntu 18.04 coming breaking change vs. weewx package

2018-04-02 Thread Thomas Keffer
Even more destructive, looking through the release notes , I see that Python 2 is no longer installed by default. -tk On Mon, Apr 2, 2018 at 11:32 AM, Vince Skahan wrote: > Matthew - just a heads up - ubuntu 18.04

Re: [weewx-development] Trouble making a weewx extension

2018-03-22 Thread Thomas Keffer
Hi, John If you have a separate skin for the app, you can set the unit system for just that skin. This way, you would not have to read the units used by the Standard skin. There's an example of how to do that with Gary's Stell Series installer

Re: [weewx-development] Trouble making a weewx extension

2018-03-22 Thread Thomas Keffer
You would only "force" metric units for your skin. The "Standard" skin would be unchanged. Look at Gary's installer for Steel Series, in particular lines 55-64. Note how it enforces the US system for the skin 'ss', but does

Re: [weewx-development] MacOS (10.11.6) wview user converting to weewx, python errors

2018-03-03 Thread Thomas Keffer
This seems to be a problem with the Pillow install, and not with WeeWX. First, are you sure you need to install Pillow? Most Python installations come with a version of PIL or Pillow. Second, I have generally had better luck installing things with pip, rather than BSD install or easy_install.

Re: [weewx-development] MacOS (10.11.6) wview user converting to weewx, python errors

2018-03-03 Thread Thomas Keffer
<kdba...@gmail.com> wrote: > > On Mar 3, 2018, at 2:00 PM, Thomas Keffer <tkef...@gmail.com> wrote: > > The Mac is an "unsupported platform," but I'm sure we can get it working. > > First, see if you already have a copy of PIL or Pillow. From the command > line: &

Re: [weewx-development] MacOS (10.11.6) wview user converting to weewx, python errors

2018-03-03 Thread Thomas Keffer
ebsite. At this point > it fails to launch. > > What I read on the Wview mailing list was that this was a good replacement > and was actively developed and maintained, unlike wview. > > I guess I just need to know what to do ‘next’. Is there an un-install I > can try to reset, and then try

Re: [weewx-development] MacOS (10.11.6) wview user converting to weewx, python errors

2018-03-04 Thread Thomas Keffer
ared/weewx/bin/weewx/engine.py", line 89, in setupStation > driver = config_dict[stationType]['driver'] > File "build/bdist.macosx-10.11-intel/egg/configobj.py", line 554, in > __getitem__ > KeyError: 'unspecified' > > David > > On Mar 3, 2018, at 3:42 PM,

Re: [weewx-development] MacOS (10.11.6) wview user converting to weewx, python errors

2018-03-04 Thread Thomas Keffer
Looking through the MacOS instructions, I can see this is an easy mistake to make. I'll correct the instructions. -tk On Sun, Mar 4, 2018 at 9:03 AM, Thomas Keffer <tkef...@gmail.com> wrote: > The problem is that you are in the wrong subdirectory and, as a result, > are using

Re: [weewx-development] MacOS (10.11.6) wview user converting to weewx, python errors

2018-03-04 Thread Thomas Keffer
/pool.py", line 366, in _handle_tasks > debug('task handler got sentinel') > TypeError: 'NoneType' object is not callable > > TypeError("'NoneType' object does not support item deletion",) in > ignored > > David > > > On Mar 4, 2018, at 8:42 AM, David &

Re: [weewx-development] MacOS (10.11.6) wview user converting to weewx, python errors

2018-03-05 Thread Thomas Keffer
m not the first > person to try to install weewx on a MacOS based system. If I am blazing a > trail, then it is all on me. 8^) > > David > > > On Mar 4, 2018, at 12:02 PM, Thomas Keffer <tkef...@gmail.com> wrote: > > I think you are making this more complicated than

Re: [weewx-development] Reading weewx.conf, including an MQTT "#" wildcard

2018-10-19 Thread Thomas Keffer
Just include it in quotes: topic = "wx/net13/#" -tk On Fri, Oct 19, 2018 at 7:01 AM Bill Morrow wrote: > The configuration of my wxMesh driver includes the MQTT topic to subscribe > to for readings. > > I would like to set it to something like > > wxMesh] > driver = user.wxMesh > > #

Re: [weewx-development] Issue with all time and rain results?

2018-11-12 Thread Thomas Keffer
Take a look at this post from last spring and see if it explains why you are getting so many values: https://groups.google.com/d/msg/weewx-user/JQSSKweeam8/2mIWO96PBgAJ You may want to restructure your code to use a later binding. The function get_extension_list() is where you stage things, but

Re: [weewx-development] Issue with all time and rain results?

2018-11-13 Thread Thomas Keffer
> > Are you suggesting that every time an $alltime tag is called (even if in > the same template?), the entirety of $alltime is re-generated? I guess > that makes sense, but I don't have a grasp on why the values would change. > Unless it has something to do with the Timebinder changing it's time

Re: [weewx-development] Issue with all time and rain results?

2018-11-13 Thread Thomas Keffer
The alltime example uses late binding, as do all the "regular" tags. The way you are doing things now, queries like "rainiest day," are being done for every template whether or not it actually needs and uses rainiest day. Off the top of my head, one approach would be to have your SLE return an

Re: [weewx-development] Re: WeeRT - realtime interface to weeWX

2018-11-13 Thread Thomas Keffer
I suspect that either you did not build the client, or you had an error while building it. Take a look in the directory weert-js/client/dist and make sure it includes files index.html and and main.js. Both are created as part of the build process. For instructions on building the client, see the

Re: [weewx-development] Re: WeeRT - realtime interface to weeWX

2018-11-13 Thread Thomas Keffer
That's a pretty cryptic error message. Doesn't tell us much of anything. I wonder if webpack was installed? Take a look in / home/maarten/git/weert-js/client/node_modules/.bin and see if there is a link to webpack. Mine looks like: *ls -al weert-js/client/node_modules/.bin* total 40 drwxrwxr-x

Re: [weewx-development] Issue with all time and rain results?

2018-11-13 Thread Thomas Keffer
There are lots of choices, but one thing I've learned: caches are tricky. I try to avoid them. Better to just do the database query multiple times, and let the database handle the cache. That's what they are good at. -tk On Tue, Nov 13, 2018 at 3:55 PM gjr80 wrote: > I ask this without having

Re: [weewx-development] Re: WeeRT - realtime interface to weeWX

2018-11-14 Thread Thomas Keffer
Apparently, this is a known problem with webpack . The cure is to upgrade webpack-cli. Try the following steps. Note that in the following we are changing the required version in the file weert-js/client/package.json (which is for the client). Do

Re: [weewx-development] Issue with all time and rain results?

2018-11-12 Thread Thomas Keffer
Hi, Pat I'd have to see the exact instrumented code to comment. Could you post? -tk On Mon, Nov 12, 2018 at 6:04 AM Pat O'Brien wrote: > Hi there, I'm using the all_stats code found in the Customization Guide > and noticed > a

Re: [weewx-development] Python 3 migration?

2018-10-04 Thread Thomas Keffer
Ack indeed. But, inevitable. Strategy document. -tk On Thu, Oct 4, 2018 at 9:40 AM Bill Morrow wrote: > > > On Tuesday, 2 October 2018 08:40:02 UTC-3, Tom Keffer wrote: >> >> ... >> > It is our plan to migrate to Python 3 over the next

Re: [weewx-development] [RFC] RainMachine upload extension

2018-10-02 Thread Thomas Keffer
A few things that stand out: 1. Line 25: Typo 2. You can save yourself a database access if you combine _get_day_max_temp() and _get_day_min_temp() into a function with a single SELECT statement. 3. The file restx.py has a function to do what you're doing in lines 77 to 86. These lines become:

Re: [weewx-development] Acurite USB passthrough

2018-09-30 Thread Thomas Keffer
No idea. Acurite, along with other USB devices, are addressed by manufacturer and device ID on the USB bus, not by a /dev port. It sounds like this may be a Docker issue, not a WeeWX / Acurite issue. You may have more satisfaction on their support forum. -tk On Sun, Sep 30, 2018 at 2:22 PM Ryan

Re: [weewx-development] stuck with new driver

2019-01-23 Thread Thomas Keffer
You're having a more fundamental problem than that: the option 'driver' seems to be missing completely from your driver stanza. It should look something like this (from the Vantage driver stanza): [Vantage] # This section is for the Davis Vantage series of weather stations. # Connection

Re: [weewx-development] SummaryByYear and SummaryByMonth

2018-12-27 Thread Thomas Keffer
Little confused here. Is the problem in the Standard skin, or Sofaskin? Or, are you using both? A $SummaryByMonth populated in one skin cannot be used in another skin. Finally, as you've noted, the ordering of the stanzas in skin.conf matters. The stanzas [SummaryByMonth] and [SummaryByYear]

Re: [weewx-development] SummaryByYear and SummaryByMonth

2018-12-27 Thread Thomas Keffer
That looks correct. Sorry, but I don't know anything about Sofaskin. Have you tried the author? -tk On Thu, Dec 27, 2018 at 5:55 AM wrote: > > > Am Donnerstag, 27. Dezember 2018 14:24:37 UTC+1 schrieb Tom Keffer: >> >> Little confused here. Is the problem in the Standard skin, or Sofaskin? >>

Re: [weewx-development] Created a Driver for Davis Weather Monitor II

2018-11-24 Thread Thomas Keffer
Well done! Be sure to include a link off the main Wiki page (section "Drivers") so people can find your driver. -tk On Sat, Nov 24, 2018 at 2:11 PM wrote: > I inherited an old Davis Weather Monitor II station when I bought my house > a few years ago.

Re: [weewx-development] Re: Time formatting in skins

2018-12-28 Thread Thomas Keffer
Yes. Take a look at https://github.com/tkeffer/weert-js/blob/master/client/config/unitConfig.js and https://github.com/tkeffer/weert-js/blob/master/client/src/units.js (See an email exchange between us on 3 December) -tk On Fri, Dec 28, 2018 at 4:36 PM Pat O'Brien wrote: > Excellent,

Re: [weewx-development] wrong date

2018-12-28 Thread Thomas Keffer
What kind of instrument? What do you mean by "year 2022 in my URL"? What URL? Also, it would help to run with debug=1 and post the log from that. It would give details about report generation. -tk On Fri, Dec 28, 2018 at 12:04 PM Hector Valenzuela wrote: > Hi, i have a raspberry pi 3 and

Re: [weewx-development] Re: Time formatting in skins

2018-12-28 Thread Thomas Keffer
1. If no context is specified, then the default is "current", which is not what you'd want for $alltime. Something like "year" would be more appropriate. So, the TimespanBinder in example "stats.py" should probably be written as all_stats = TimespanBinder(timespan,

Re: [weewx-development] Re: Time formatting in skins

2018-12-28 Thread Thomas Keffer
I think you're making things harder for yourself than you need to. For something like $year.outTemp.maxtime WeeWX will automatically format the time in something appropriate for a "year" context. The default format is specified in the [[TimeFormats]]. Yes, you can override it by using the

Re: [weewx-development] Re: Time formatting in skins

2018-12-28 Thread Thomas Keffer
OK, I think I see what you're trying to do. You are returning formatted strings, when you should be returning ValueHelpers. Take the value "eqtime": this would look something like this (NOT TESTED): # Assuming eqtime is in Unix Epoch Time...? eqtime = eqdata["features"][0]["properties"]["time"]

Re: [weewx-development] Database access from driver

2019-03-25 Thread Thomas Keffer
This is a common problem. For example, on the Vantage, the transmitter battery status only appears in LOOP packets, not archive records. The solution is to let WeeWX accumulate the packets, then extract a value at the end of the archive interval. You can extract the average value (which is what

Re: [weewx-development] Re: windGust is always an even number ?

2019-03-22 Thread Thomas Keffer
I have no idea. Have you tried a SELECT statement on your database to confirm? -tk On Fri, Mar 22, 2019 at 10:05 AM Pat wrote: > I should clarify my question. The windGust is always a *whole *number, > even when windSpeed in the loop is (usually) not. > > On Friday, March 22, 2019 at 12:36:19

Re: [weewx-development] Database access from driver

2019-03-24 Thread Thomas Keffer
If you implement the method genArchiveRecords() there should be no reason to do this. It will pass in as its only argument the last timestamp in the database. So, do your retrieval since that timestamp. It should be a generator function, yielding records. -tk On Sun, Mar 24, 2019 at 8:21 AM

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-25 Thread Thomas Keffer
Luc, You are very close to having a code base that will run under both Python 2 and 3. Suggestions: 1. Put this at the top to cover your use of multiple arguments to "print": from __future__ import print_function 2. For a queue, do this: try: # Python 2 from Queue import Queue except

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-04-03 Thread Thomas Keffer
Thanks, Luc Make sure you forward them on to the respective authors. On Wed, Apr 3, 2019 at 6:04 PM wrote: > Tom, > > Improved versions for meteotemplate.py, wcloud.py and weather365.py. > The should run on both Python 2 and Python 3. > > Luc >

Re: [weewx-development] Developing a WeeWX-Driver for custom weather station hardware (adding custom sensors)

2019-03-29 Thread Thomas Keffer
You get a "duplicate key" error from the database, which is logged, but ignored. On Thu, Mar 28, 2019 at 7:32 PM Henry Denston wrote: > Tom, can you tell me what WeeWX will do in case it gets a package with the > same unix timestamp a package already had before? > As dateTime is a unique key

Re: [weewx-development] Python 3 version and NoneType and int

2019-04-07 Thread Thomas Keffer
As far as I can tell, trends do not use the less than ('<') operator. Do you know what expression is triggering the exception? What is the template indexOWFS.html.tmpl? On Sun, Apr 7, 2019 at 3:50 AM Hartmut Schweidler wrote: > Hallo > I use the WeewWx-Version 4 from the development since

Re: [weewx-development] Python 3 version and NoneType and int

2019-04-08 Thread Thomas Keffer
The ".raw" suffix means you will get the actual value, which could be a float, or it can be Python 'None'. If you are going to do a comparison, you must check to see if the value might be None. Your template code should look something like this: #if $trend.extraTemp9.raw is None Unknown

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-25 Thread Thomas Keffer
at 12:53 PM Thomas Keffer wrote: > I can't speak to the logic of the code, but it looks like it should work > under Python 2 and 3. A couple things to think about: > >1. You cannot count on the user having the shim 'six', although it is >becoming increasingly comm

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-25 Thread Thomas Keffer
I can't speak to the logic of the code, but it looks like it should work under Python 2 and 3. A couple things to think about: 1. You cannot count on the user having the shim 'six', although it is becoming increasingly common. Many python installations include it by default. In any case,

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-02 Thread Thomas Keffer
Thanks, Hartmut! I think the problem is that the file that is to be FTP'd, was being opened in text mode instead of binary. So, it was trying to decode it into Unicode. Fixed in commit 5167069 Do a pull on the

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-02 Thread Thomas Keffer
Thanks again! Fixed in commit 6c24156 Do a pull, and try again. On Sat, Mar 2, 2019 at 11:18 AM Hartmut Schweidler wrote: > I uploaded the "public_html" via fileZilla for testing > > the site on

Re: [weewx-development] Re: Python 3 version available for limited testing

2019-03-02 Thread Thomas Keffer
Yes, this is a limitation in the way database bindings are presently implemented. It is very hard for a search list extension (in this case, $alltime) to use a custom binding. Thank you for reminding me. Version 4 would be a good time to introduce these kinds of changes, as they may break

[weewx-development] Python 3 version available for limited testing

2019-02-20 Thread Thomas Keffer
It's alive, and it works reliably with the Vantage driver! But it's untested for any other drivers. I would greatly appreciate it if others took it for a spin with other drivers! To install, it's probably best to just run out of a git repository, with the python3 branch, but using your existing

Re: [weewx-development] windRun unit label is in miles only

2019-03-12 Thread Thomas Keffer
You can. In fact, if you take a look at Seasons, that's basically what's been done. However, it will only work with V3.9, not older versions. -tk On Tue, Mar 12, 2019 at 5:36 PM Pat wrote: > I knew it was a lowercase R, not sure why I decided to camelCase it here. > > Thanks for the update and

Re: [weewx-development] windRun unit label is in miles only

2019-03-12 Thread Thomas Keffer
Oops. That was a typo. I mean 'km' On Tue, Mar 12, 2019 at 5:44 PM Pat wrote: > Also Tom, while testing, looks like the valid input for group_distance is > either "mile" or "km" (no _per_hour). > > > On Tuesday, March 12, 2019 at 8:33:26 PM UTC-4, Tom Keffer wrote: >> >> The type 'windrun'

Re: [weewx-development] windRun unit label is in miles only

2019-03-12 Thread Thomas Keffer
The type 'windrun' (note the lower-case 'r') is part of group_distance, which was inadvertently left out of the set of groups that get switched when the user selects metric or US (it doesn't appear in any of the skins that are part of WeeWX). It is easily added. Go into weewx.conf, section

Re: [weewx-development] Developing a WeeWX-Driver for custom weather station hardware (adding custom sensors)

2019-03-22 Thread Thomas Keffer
That's right. On Thu, Mar 21, 2019 at 8:55 PM Henry Denston wrote: > Thank you for the clarification tom. > So I assume there are not going to be more tables added (e.g. for week, > month etc) but only the daily hi/lows, right? > > Regards, henry. > > On Friday, March 22, 2019 at 12:45:41 AM

Re: [weewx-development] Re: Almanac time format in 3.9.0 beta

2019-02-07 Thread Thomas Keffer
Does this mean you found the problem? Why not just use: ephem_day = %H:%M then it will change everywhere. That's what it's there form Separating formatting from content is always a good idea. -tk On Thu, Feb 7, 2019 at 6:53 AM Pat O'Brien wrote: > I deleted my latest reply (but knew the

  1   2   3   >