Version 4.2.0 ready

627 views
Skip to first unread message

Tom Keffer

unread,
Oct 27, 2020, 8:14:04 AM10/27/20
to weewx-user
Some new features, fixes some bugs.

See the Upgrade Guide for instructions on how to upgrade.

CHANGE LOG
CHANGES COMING! This is the last release that will support the LaCrosse WS23xx,
Oregon WMR200 and WMR300 stations. In the future, they will be published as
unsupported extensions.

Made it easier to add new, derived types via StdWXCalculate. Fixes issue #491.

Changed the tag system slightly in order to make it possible for the XTypes
system to add new aggregations that take an argument.

Added the new data types in the extended_wview schema to the WeeWX types
system. Fixes issue #613.

Added ability to label left, right or both y-axes of graphs. PR#610.
Fixes issue #609. Thanks to user Brent Fraser!

Added units and labels for the lightning data types.

Fixed problem where threads attempt to access non-existent database. Fixes
issue #579.

Fixed problem that caused reporting units to revert to US if they were in a
mixed unit system. Fixes issue #576.

Fixed problem that could cause the station registry to fail if given a location
with a non-ASCII location name.

Changed TE923 bucket size from 0.02589 inches to 1/36 of an inch
(0.02777778 in). PR #575. Fixes issue #574. Thanks to user Timothy!

Undocumented option retry_certificate has been renamed to retry_ssl, and now
covers all SSL errors (not just certificate errors). Fixes issue #569. Thanks
to user Eric!

Fixed problem caused by specifying a [Logging]/[[formatters]] section in
weewx.conf that uses interpolated variables.

Fixed problem in the Vantage driver that resulted in incorrect sunrise/sunset
being included in loop packets when run under Python 3. Thanks to users
Constantine and Jacques!

Improved auto-scaling of plot axes.

Fixed problem where aggregates of windvec and windgustvec returned the aggregate
since start of day, not the start of the aggregation period. Fixes issue #590.

New unit "beaufort", included in "group_speed". Treating beaufort as a separate
type has been deprecated. Fixes issue #591.

New unit "kPa", included in "group_pressure". Fixes issue #596.

Fixed bug in the simulator. Made it easier to subclass class Simulator.

Expressions in StdCalibration are now ordered. Later corrections can depend on
earlier corrections.

Fixed problem under Python 2, where option 'none' could cause exception.
PR #597. Thanks to user Clément!

Fixed problem with ws23xx driver under Python 3 that caused it to crash.

Use a more modern formula for heat index. Fixes issue #601. Thanks to
user Peter Q!

Allow overriding the data binding when using iterators. Fixes issue #580.

Fixed problem where old daily summaries may not have a version number.

Fixed problem in WMR200 driver where missing UV reports as index 255.

Added option 'force_direction' for working around a WU bug. Fixes issue #614.

Greg Troxel

unread,
Oct 27, 2020, 9:21:11 AM10/27/20
to Tom Keffer, weewx-user

CHANGES COMING! This is the last release that will support the LaCrosse WS23xx,
Oregon WMR200 and WMR300 stations. In the future, they will be published as
unsupported extensions.

This is definitely not a complaint, and sorry if I have failed to notice
list traffic about this.

I don't have any of those stations, so this won't affect me. But given
the overall "weewx way", I find this surprising. I wonder if they are
troubled and nobody has volunteered to fix,if there is some reason they
are too hard to keep working, or if there are too many unreasonable
demands for support, or something else?


I'm also curious if there is a plan/timeline for dropping python 2.7
support. (I haven't personally moved to 3, partly because it has seemed
not 100% baked, and partly I just haven't. With this release, it seems
python 3 is perhaps the standard approach, and certainly not
experimental.

Greg
signature.asc

Tom Keffer

unread,
Oct 27, 2020, 9:47:53 AM10/27/20
to weewx-user
The drivers are being dropped because of their complexity and lack of use. With an all-volunteer effort, we have to husband our resources. Something has to go.

Python 3 is definitely very mature and 100% "baked." No reason not to use it, if you can.

No plans to drop Python 2. 

-tk


Phil Green

unread,
Oct 27, 2020, 10:32:04 AM10/27/20
to weewx-user
Installed on my Pi3 updated using setup.py method on existing install running python3.
Weather station Vantage Vue.
All working fine.
Many thanks.
Phil

Greg from Oz

unread,
Oct 27, 2020, 6:08:03 PM10/27/20
to weewx-user
Hi Tom,
I upgraded from 4.2.0.0a1 using dpkg -i python3-weewx_4.2.0-1_all.deb 
There was a warning saying I was downgrading.
The install worked but when I looked at the logs it didn't look right. The mqtt was sending every second.
I selected N when prompted to change the weewx.conf file.
The install seems to have changed parts of the weewx.con file as my location is back to santas workshop but other parts like my rsync is still there.
I have reverted back as I can snapshot so I will look at it further later today.

Thanks

PJO

unread,
Oct 27, 2020, 6:09:42 PM10/27/20
to weewx-user
Update from v3.9.2 on Pi2 w FineOffset WH1080 completed OK using apt. 

However, I noticed quotes were removed from passwords. Is this how they should be now? (Perhaps it wasn't with WeeWX, but I do remember having to add quotes to passwords in a .conf file at some point.)

Tom Keffer

unread,
Oct 27, 2020, 6:34:49 PM10/27/20
to weewx-user
Unfortunately, when the configuration file manager we use, ConfigObj, writes a file out, it drops the quotes.

It shouldn't matter unless you use the hash symbol ('#') in your password.

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/1970da9b-2c88-4b75-bfbe-d1cfc103d348n%40googlegroups.com.

Greg from Oz

unread,
Oct 27, 2020, 6:37:48 PM10/27/20
to weewx-user
Hi Tom,

I restored from snapshot.
I edited /etc/weewx.conf and changed version = 4.2.0a1 to version = 4.2.1 and then ran  dpkg -i python3-weewx_4.2.0-1_all.deb 
I also selected N when prompted to change the conf file.
Now it seems to have installed correctly and it is up and running.


Don't know what happened but I did try the upgrade twice with the same results both times until I changed the version number in the weewx.conf file.



On Tuesday, 27 October 2020 at 23:14:04 UTC+11 tke...@gmail.com wrote:

Doug Bo

unread,
Oct 28, 2020, 11:08:28 AM10/28/20
to weewx-user
Thanks to Tom & all of the contributors!

Time to upgrade!  :)

Doug B.

didier....@gmail.com

unread,
Oct 28, 2020, 1:07:55 PM10/28/20
to weewx-user
Hi Tom

Update from 4.1.1 to 4.2.0 : no problem

Perfect!!

Thank's a lot

wfs...@gmail.com

unread,
Oct 28, 2020, 1:11:26 PM10/28/20
to weewx-user
Updated via apt-get update then apt-get upgrade.  Kept my current weewx.conf.  All is good and working.  In comparing the weewx.conf files, it looks like
weewx.wxxtypes.StdDelta has been removed from the list of xtype_services.  Should I remove it from my copy?

Walt

Tom Keffer

unread,
Oct 28, 2020, 5:35:36 PM10/28/20
to weewx-user
The service weewx.wxxtypes.StdDelta is not used in V4.2.0, so it really doesn't matter. However, it is likely to be used in the future, so you might as well leave it in.

-tk


--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

ge...@cusick.org.uk

unread,
Oct 29, 2020, 8:02:34 AM10/29/20
to weewx-user
Upgrade was simple, straightforward, worked first time.

Thanks Tom

Geoff

Graham Eddy

unread,
Oct 30, 2020, 6:36:01 AM10/30/20
to weewx...@googlegroups.com
cut over weewx 4.1.1 (on RPi 4, with custom skin and extensions) → 4.2.0 successfully: clean, no issues. well done again, tom

tarob...@gmail.com

unread,
Oct 30, 2020, 10:08:01 AM10/30/20
to weewx-user
Upgraded from 4.1.1 to 4.2.0 with no issues at all using DEB package. During install, my current.inc was different along with weewx.conf (which of course I expected since I've modified both of those files). I choose the default of "N" to keep my modified version but if I would've selected "Y" for both of those files would my modification to those files carry over to the new ones? Or does it override with the new files and my modifications are lost?

Michael Sanphillipo

unread,
Oct 30, 2020, 3:38:38 PM10/30/20
to weewx-user
Tom, I ran the Python3 upgrade and it appears to be working fine. When I look in the syslog after restarting it still says Initializing weewx version 4.1.1. I looked at the weewx.conf and the version says 4.2.0. When the upgrade was finished I noticed that the weewx.conf was updated and a new weewx.conf.4.2.0 was created not one with  weewx.conf.YYYYMMDDHHMMSS . Any idea how I can tell what version I'm actually running? 

Tom Keffer

unread,
Oct 30, 2020, 3:45:30 PM10/30/20
to weewx-user
If the log says v4.1.1, then that's the version you are using.

The file weewx.conf.4.2.0 is the configuration file straight out of the distribution, before it has been merged or modified.

What install method did you use for the original install? What install method did you use for the upgrade? Did you use the same method? 

To say anything more, we would have to see the log.

-tk

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

Michael Sanphillipo

unread,
Oct 30, 2020, 3:49:00 PM10/30/20
to weewx...@googlegroups.com
My original install was via a Deb package I upgraded to Python3 a few months ago and today I used the setup.py method. Is the syslog what you need a copy of?

You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/5y47fJnD2QI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zEAXx-gK9igspLRqMEvzT8YYQudkxOWJx3NDc%3D9%2BnvmtVg%40mail.gmail.com.

Tom Keffer

unread,
Oct 30, 2020, 4:09:55 PM10/30/20
to weewx-user
The Debian package installer and the setup.py installer are completely independent and have nothing in common. So, you are just running your old system.

Either upgrade your old Debian install by following the directions in the Upgrade Guide for DEB packages, or change over to run the software left behind by the setup.py install. If you want to do the latter, you should modify /etc/init.d/weewx to point to the new location.

-tk

Michael Sanphillipo

unread,
Oct 30, 2020, 4:28:47 PM10/30/20
to weewx-user
I guess when I did the conversion to Python3 I changed the install location to my original location which was etc/weewx then ran  python3 ./setup.py build then sudo python3 ./setup.py install  when I should have left it home/weewx. If it's running okay would it be best to just leave it the way it is are there any advantages of upgrading to python3?

Tom Keffer

unread,
Oct 30, 2020, 6:12:53 PM10/30/20
to weewx-user
Not understanding your comment. Changing to python 3 involves changing the interpreter, not the code. WeeWX V4 uses the exact same code base for Python 2 and Python 3. It's just which interpreter gets invoked that makes the difference.

/home/weewx is not involved if you do a Debian package install. 

And, vice versa: /etc/weewx is not involved if you do a setup.py install.

The two installs are completely independent and do not share code, configuration information, nor databases. 

Which one gets run as a daemon is determined by what is in the daemon script /etc/init.d/weewx.

-tk

Michael Sanphillipo

unread,
Oct 30, 2020, 8:19:55 PM10/30/20
to weewx...@googlegroups.com
Tom, I figured it out. It is running under Python3. I needed to run "wget -qO - http://weewx.com/apt/weewx-python3.list | sudo tee /etc/apt/sources.list.d/weewx.list" I was still using a python2 squeeze version from my original install.


Alessandro Del Prete

unread,
Oct 30, 2020, 9:49:44 PM10/30/20
to weewx-user
Hi Tom,

I use ubuntu on an Intel NUC, with systemd, weewx 4.1 was installed as package.
I followed the upgrade guide, here was the result:

The following packages will be upgraded:
  weewx
1 upgraded, 0 newly installed, 0 to remove and 33 not upgraded.
Need to get 1.207 kB of archives.
After this operation, 47,1 kB of additional disk space will be used.
Get:1 http://weewx.com/apt/python3 buster/main all weewx all 4.2.0-1 [1.207 kB]
Fetched 1.207 kB in 6s (195 kB/s)
Requesting to save current system state
Successfully saved as "autozsys_sgety6"
Preconfiguring packages ...
(Reading database ... 245196 files and directories currently installed.)
Preparing to unpack .../archives/weewx_4.2.0-1_all.deb ...
Unpacking weewx (4.2.0-1) over (4.1.1-1) ...
Setting up weewx (4.2.0-1) ...
Installing new version of config file /etc/weewx/skins/Seasons/current.inc ...
Installing new version of config file /etc/weewx/skins/Seasons/rss.xml.tmpl ...
Installing new version of config file /etc/weewx/skins/Seasons/seasons.js ...
Installing new version of config file /etc/weewx/skins/Standard/index.html.tmpl ...

Configuration file '/etc/weewx/weewx.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** weewx.conf (Y/I/N/O/D/Z) [default=N] ? N
Installing new version of config file /etc/weewx/weewx.conf.dist ...
saving previous config file as /etc/weewx/weewx.conf-4.1.1
saving distribution config file as /etc/weewx/weewx.conf-4.2.0
merging previous and distribution into /etc/weewx/weewx.conf
Using configuration file /etc/weewx/weewx.conf-4.1.1
update-rc.d: error: unable to read /etc/init.d/weewx
dpkg: error processing package weewx (--configure):
 installed weewx package post-installation script subprocess returned error exit status 1
Processing triggers for systemd (245.4-4ubuntu3.2) ...
Errors were encountered while processing:
 weewx
ZSys is adding automatic system snapshot to GRUB menu
E: Sub-process /usr/bin/dpkg returned an error code (1)

No big issue regarding the missing /etc/init.d/weewx I guessed, the big problem is that when weewx restarted I noticed totally wrong data.

I quickly checked and compared the conf files, and I found out that station_type = WeatherFlowUDP was changed to station_type = Simulator.
I reverted it to the original value, but unfortunately I have 3-4 minutes of bad data in the db now, and I also sent it to some weather networks.

Could this be due to the merging process of the conf files?
Is there a way I can fix the database removing those bad records?

Thanks for any help on this.

Alessandro

Tom Keffer

unread,
Oct 31, 2020, 7:32:21 AM10/31/20
to weewx-user
See the Wiki article Cleaning up old 'bad' data for an example of deleting unwanted records. In your case, you will need to determine the starting and ending records of the simulator data, then delete them.

-tk

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

Alessandro Del Prete

unread,
Oct 31, 2020, 9:54:23 AM10/31/20
to weewx-user
Thanks Tom.

Is it normal that while upgrading, the merging process changed the station type in that way? I ask for next time I'll try the upgrade.

Tom Keffer

unread,
Oct 31, 2020, 10:00:25 AM10/31/20
to weewx-user
Perhaps we are misunderstanding each other. As I understand it, you originally installed V4.1 as a package. Later, you installed V4.2 using setup.py. As I keep saying, package installs and setup.py are completely different and share nothing in common.

So, you didn't merge. You installed a completely new version in /home/weewx. That is why it is using the simulator.

In general, if you do a package install, then upgrade using a package install. If you use a setup.py install, the upgrade using a setup.py install. You mixed the two methods.

Or, maybe I am misunderstanding something...

-tk

Alessandro Del Prete

unread,
Oct 31, 2020, 10:04:03 AM10/31/20
to weewx-user
No Tom. As you can see from the log,  I upgraded the package as per upgrade instructions. In fact the only change I noticed in the weewx.conf file was the statyon_type, all the rest of the configuration was ok.

I didn't install a separate version. That's why I posted the log. You will also notice in the log that I answered No when asked about replacing the .conf file.

Two problems encountered: no /etc/init.d/weewx script found, because I'm using systemd probably, and the second was the changing of the station_stype during the merge.

mwall

unread,
Oct 31, 2020, 7:15:33 PM10/31/20
to weewx-user


On Friday, October 30, 2020 at 10:08:01 AM UTC-4, tarob...@gmail.com wrote:
Upgraded from 4.1.1 to 4.2.0 with no issues at all using DEB package. During install, my current.inc was different along with weewx.conf (which of course I expected since I've modified both of those files). I choose the default of "N" to keep my modified version but if I would've selected "Y" for both of those files would my modification to those files carry over to the new ones? Or does it override with the new files and my modifications are lost?

the debian installer prompts you for each 'configuration' file that you have modified.  in the context of the debian (or redhat) installer, a 'configuration' file includes the weewx skin files in the weewx distribution, not just the weewx.conf file.  any skins that you add are not known by the installer (but the installer *does* know they exist, so it will not delete them).

so for the file 'current.inc', when you choose 'N', the installer will use your file as 'current.inc' and it will place another file next to it called 'current.inc.dpkg-new' that contains the distribution contents, i.e., the 'current.inc' as it comes from the 4.2.0 release.

similarly, if you choose 'Y', the installer will use the distribution contents for 'current.inc' and it will place another file next to it called 'current.inc.dpkg-old' that contains your 'current.inc' contents.

so whichever option you choose, you can compare with the option you did not choose.

the redhat and suse installers do this too, but it does not prompt - it just keeps your changes and installs the new file as 'current.inc.rpmnew'

m

Cameron D

unread,
Oct 31, 2020, 8:28:54 PM10/31/20
to weewx-user
There may be a bit of confusion in this thread about "merging".  My understanding and experience is that  with .DEB upgrades  there is no automatic merging of config file changes.
You run either with your old config or the new one.

Every upgrade I do a manual check for changes and merge anything myself.
One case is weewx.conf, which contains a version number, with the comment "do not modify this".
So I modify it - such that my old config file matches the new version number.

Cameron.

Alessandro Del Prete

unread,
Oct 31, 2020, 8:39:10 PM10/31/20
to weewx-user
From the log of my upgrade below, you can clearly see that it says " merging previous and distribution into /etc/weewx/weewx.conf".
If I answer NO to replace my weewx.conf I expect the previous version's weewx.conf to be used, untouched. Instead, I found the station_type changed to simulator, all the rest was exactly the same.

Configuration file '/etc/weewx/weewx.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** weewx.conf (Y/I/N/O/D/Z) [default=N] ? N
Installing new version of config file /etc/weewx/weewx.conf.dist ...
saving previous config file as /etc/weewx/weewx.conf-4.1.1
saving distribution config file as /etc/weewx/weewx.conf-4.2.0
merging previous and distribution into /etc/weewx/weewx.conf
Using configuration file /etc/weewx/weewx.conf-4.1.1

Cameron D

unread,
Oct 31, 2020, 9:12:13 PM10/31/20
to weewx-user
yes.  Maybe I cause my own problems by too much "cleaning up"

Greg from Oz

unread,
Nov 1, 2020, 1:00:20 AM11/1/20
to weewx-user
My weewx.conf was changed as well. It had been changed back to Santa Clause and the location was changed but the rest of the file still had my original changes in it.
I have mentioned that earlier in these posts. Good to know I am not the only one that this happened to.
I upgraded from the beta version to the latest stable version and used the dpkg -i method.
Reply all
Reply to author
Forward
0 new messages