Version 4.5.0 released

1,110 views
Skip to first unread message

Tom Keffer

unread,
Apr 2, 2021, 11:11:42 AM4/2/21
to weewx-user
Change log
The utility wee_database has new options --add-column, --rename-column, and
--drop-columns for adding, renaming, and deleting columns in the database.

New optional tag ".series()", for creating and formatting series in templates.
See the document series_tags.md in the docs subdirectory. This is still
experimental and subject to change! Addresses issue #341.

New optional tag ".json()" for formatting results as JSON.

New optional tag ".round()". Useful for rounding results of .raw and .json tags.

Improved performance when calculating series using aggregation periods that are
multiples of a day.

Changed NOAA reports to use the 'normalized_ascii' encoding instead of 'utf8'
(which did not display correctly for most browsers). Fixes issue #646.

Plots longer than 2 years use a 6 month time increment.

Uploads to PWSWeather and WOW now use HTTPS. Fixes issue #650.

Fixed bug that prevented the Vantage driver from waiting before a wakeup retry.
Thanks to user Les Niles!

Changed the way of expressing the old "wview" schema to the new V4 way.
Hopefully, this will lead to fewer support issues. Fixes issue #651.

Fixed problem where iterating over a time period without an aggregation would
wrongly include the record on the left.

Fixed bug that caused the incorrect label to be applied to plots where the
aggregation type changes the unit. Fixes issue #654.

Plots now locate the x-coordinate in the middle of the aggregation interval for
all aggregation types (not just min, max, avg). Revisits PR #232.

Added new time units 'unix_epoch_ms' and 'unix_epoch_ns', which are unix epoch
time in milliseconds and nanoseconds, respectively.

The FTP uploader now calculates and saves a hash value for each uploaded file.
If it does not change, the file is not uploaded, resulting in significant
time savings. PR #655. Thanks to user Karen!

Updated the version of six.py included with WeeWX to 1.15.0. Fixes issue #657.

Option aggregate_interval can now be specified by using one of the "shortcuts",
that is, 'hour', 'day', 'week', 'month', or 'year'.

Options "log_success" and "log_failure" are now honored by the StdArchive
service.


Tarmo

unread,
Apr 2, 2021, 12:41:28 PM4/2/21
to weewx-user

garrya...@gmail.com

unread,
Apr 2, 2021, 12:49:20 PM4/2/21
to weewx-user
Does a "get code" from github, which gets you "weewx-master.zip", get the exact same package as weewx.com/downloads/development_versions/weewx-4.5.0.tar.gz?

Going to try using "weewx-master.zip" . . .

Regards,

Garry

Tom Keffer

unread,
Apr 2, 2021, 1:03:53 PM4/2/21
to weewx-user
My apologies. Forgot that little step!

--
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/b8711657-b4de-4c2a-b0c6-172e1eae1ee6n%40googlegroups.com.

garrya...@gmail.com

unread,
Apr 2, 2021, 1:06:45 PM4/2/21
to weewx-user
Upgrading using "weewx-master.zip" appears to have worked perfectly!

Thanks Tom!

Peter Fletcher

unread,
Apr 2, 2021, 2:56:34 PM4/2/21
to weewx-user
What has changed in the Seasons skin? When I apt upgraded my Pi today, I got the usual "What do you want to do about weewx.conf?" prompt (which I answered, as usual, by opting to keep my existing version), but I also got a similar prompt for the Seasons skin.conf. I have made some minor modifications to Seasons for my own use, but I also use a more heavily modified version of it for my publicly visible site. It would be good to know if I need to think about changing anything.

Mks Mk

unread,
Apr 2, 2021, 3:14:27 PM4/2/21
to weewx-user
the upgrade to 4.5 from 4.4 failed and weewx is broken please advice
used these commands for upgrade
sudo apt update
apt list --upgradable  (4.5 was showing)
sudo apt full-upgrade
then I answered "N" to the upgrade select to keep my old files

Apr  2 21:31:49 raspberrypi systemd[1]: Starting LSB: weewx weather system...
Apr  2 21:31:49 raspberrypi weewx[1049]: Starting weewx weather system: weewxTraceback (most recent call last):
Apr  2 21:31:49 raspberrypi weewx[1049]:   File "/usr/share/weewx/weewxd", line 29, in <module>
Apr  2 21:31:49 raspberrypi weewx[1049]:     import user.extensions
Apr  2 21:31:49 raspberrypi weewx[1049]:   File "/usr/share/weewx/user/extensions.py", line 20, in <module>
Apr  2 21:31:49 raspberrypi weewx[1049]:     schema_extended = schemas.wview.schema + [('lightning_strikes', 'REAL'), ('avg_distance', 'REAL')]
Apr  2 21:31:49 raspberrypi weewx[1049]: TypeError: unsupported operand type(s) for +: 'dict' and 'list'
Apr  2 21:31:49 raspberrypi weewx[1049]:  failed!
Apr  2 21:31:49 raspberrypi systemd[1]: weewx.service: Control process exited, code=exited, status=1/FAILURE
Apr  2 21:31:49 raspberrypi systemd[1]: weewx.service: Failed with result 'exit-code'.
Apr  2 21:31:49 raspberrypi systemd[1]: Failed to start LSB: weewx weather system.
On Friday, April 2, 2021 at 6:11:42 PM UTC+3 tke...@gmail.com wrote:

Tom Keffer

unread,
Apr 2, 2021, 4:12:30 PM4/2/21
to weewx-user
My mistake. I knew there was a reason why we didn't transition the old wview schema to the new V4 style!

I should have a dot-dot release out later today. 

-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.

Tom Keffer

unread,
Apr 2, 2021, 4:32:40 PM4/2/21
to weewx-user
Version 4.5.1 out.

My apologies.

Tom Keffer

unread,
Apr 2, 2021, 4:59:46 PM4/2/21
to weewx-user
Peter: are you using a Debian or Redhat system?

Do you have the output from the session?

--
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.

Peter Fletcher

unread,
Apr 2, 2021, 5:25:48 PM4/2/21
to weewx-user
I'm using the regular Raspberry Pi version of Debian, and I am afraid that I don't have a copy of the output of the apt session. However, diffing my Seasons skin.conf with the new version saved as skin.conf.dpkg-dist shows (apart from my modifications, of course) changes in the predefined radar_url and radar_img parameters, a change in the available and default encoding parameters, and  the use of text descriptors (day, week, etc) instead of numbers of seconds for aggregate_interval parameters. None of these are a problem for me (since the old seconds counts seem to still work), and I don't see anything else.

mwall

unread,
Apr 2, 2021, 5:42:38 PM4/2/21
to weewx-user
peter,

the redhat and debian packages define a set of files as 'configuration' files.  these are files that are distributed in weewx, and any of those files that are modified will result in a "something changed, do you want to keep your changes or accept the new version" prompt.

nominally this is the weewx.conf file and the 'extensions.py' file.  on redhat systems, the entire 'skins' directory (/etc/weewx/skins) is also this way, but only for files that are part of the weewx distribution.  if you add your own skin, it won't be recognized this way.

on debian systems, it apparently behaves the same way, but i cannot for the life of me remember how i made that happen (usually it is the debian/conffiles file, but skins is not in there!)

anyway, when you get one of these prompts, the package manager will always save a copy of the file you did not choose.  on redhat it shows up as .rpmnew or .rpmsave.  on debian it shows up as .dpkg-dist or some such.  that way you can always compare to see what you did not choose.

m

vince

unread,
Apr 2, 2021, 5:56:42 PM4/2/21
to weewx-user
FWIW, it's more work but a generally better way to approach essentially forking things in core weewx is to create your own skin based on some starting point, disable the skin that comes with weewx, and enable your custom skin that has a different name.  Bonus points if you make your custom skin installable with wee_extension.

That keeps you safe from your modifications being altered by a future weewx update, as weewx won't stomp on things that didn't come with weewx.


Peter Fletcher

unread,
Apr 2, 2021, 6:56:18 PM4/2/21
to weewx-user
Yes, that is what I did with the more extensively modified version of Seasons I use for my public site, but the version I use locally just had some minor tweaks, so I didn't change the name, and apt appears to be handling it as I would wish and as mwall describes (though I have never touched conffiles, so the default for weewx may have changed).

Gérard P

unread,
Apr 3, 2021, 4:21:02 AM4/3/21
to weewx-user
It is possible to stay with 4.5.0 by changing the syntax of code using the "+" operator, for instance :
    schema_extended = schemas.wview.schema + [('lightning_strikes', 'REAL'), ('avg_distance', 'REAL')]
become
    schema_extended = schemas.wview.schema.copy()
    schema_extended.update([('lightning_strikes', 'REAL'), ('avg_distance', 'REAL')])

DaveStLou

unread,
Apr 3, 2021, 7:40:55 AM4/3/21
to weewx-user
The FTP uploader change greatly improved my upload time. Thanks!

Tom Keffer

unread,
Apr 3, 2021, 8:24:52 AM4/3/21
to weewx-user
Yes, it's possible to extend the V4 schema. That's what is documented in the section Modifying a starting schema

But, let's keep the wview schema at V3.

--
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.

PJO

unread,
Apr 3, 2021, 2:47:20 PM4/3/21
to weewx-user
I updated (via sudo apt upgrade, after stopping weewx) from 4.4 to 4.5.1 on Ubuntu 20.04 Core opting to get an updated weewx.conf

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] ? Y
Installing new version of config file /etc/weewx/weewx.conf ...
Installing new version of config file /etc/weewx/weewx.conf.dist ...
using debconf configuration values from previous install
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.5) ...
Errors were encountered while processing:
 weewx
E: Sub-process /usr/bin/dpkg returned an error code (1)

I ended up with a bad weewx.conf and had to restore weewx.conf.dpkg-old

tarob...@gmail.com

unread,
Apr 3, 2021, 2:54:29 PM4/3/21
to weewx-user
Upgraded from 4.4 to 4.5.1 via sudo apt without stopping weewx and had no issues. Running on Raspberry Pi 4, Raspbian buster.

Mks Mk

unread,
Apr 3, 2021, 9:44:06 PM4/3/21
to weewx-user
the update to 4.5.1 worked for me this time but have one issue that weewx.conf shows  version  4.4.0 but the generated web page shows WeeWX version 4.5.1
can I change weewx.conf line to 4.5.1 or keep it as is?

Tom Keffer

unread,
Apr 3, 2021, 9:53:54 PM4/3/21
to weewx-user
Hmmm, the upgrade process should have upgraded the version number in weewx.conf. Are you sure you're looking at the right one? If you did a Debian install it should be at /etc/weewx/weewx.conf.

There were no changes to weewx.conf, so, if it comes to it, you can just change the version number. But, it would be useful to know what happened.

Mks Mk

unread,
Apr 3, 2021, 10:19:58 PM4/3/21
to weewx-user
I am sure about this finding 
when using "sudo nano /etc/weewx/weewx.conf" the file shows 4.4.0
syslog shows "INFO __main__: Starting up weewx version 4.5.1"
web page also shows 4.5.1

Neville Davis

unread,
Apr 3, 2021, 11:44:31 PM4/3/21
to weewx-user
Hi
Just updated my system to 4.5.1 without problems.
For information also running Belchertown skin v 1.2 python 3 with OWFS rain bucket...... all good

Neville

Neville Davis

unread,
Apr 3, 2021, 11:47:00 PM4/3/21
to weewx-user
I will also add my weewx.conf shows 4.5.1
Neville

mwall

unread,
Apr 4, 2021, 7:25:18 AM4/4/21
to weewx-user
On Saturday, April 3, 2021 at 9:44:06 PM UTC-4 mksm wrote:
the update to 4.5.1 worked for me this time but have one issue that weewx.conf shows  version  4.4.0 but the generated web page shows WeeWX version 4.5.1
can I change weewx.conf line to 4.5.1 or keep it as is?


short answer:  if you know that your configuration file works properly with weewx 4.5.1, you can safely change the version in the configuration file to 4.5.1.  but it won't make any difference, as it only affects the upgrade process.

long answer:

what process did you use to upgrade?

if you used deb or redhat, did you choose to use your config or use the "maintainer's" (new) config?

when weewx starts up, it uses the version number in the code.  so the fact that you see 4.5.1 in the log means that you are actually running 4.5.1.

the version in the config file is a loose indication of the weewx version when the config file was installed or last updated.  i say loose because there is no way to know whether someone has modified the configuration file independently from a weewx-managed install/upgrade.  the version number in the configuration file is used in some cases when you ask weewx to update your config file from an older version.  it is also used by the rpm/deb machinery.

m

mwall

unread,
Apr 4, 2021, 7:30:01 AM4/4/21
to weewx-user
On Saturday, April 3, 2021 at 2:47:20 PM UTC-4 PJO wrote:
I updated (via sudo apt upgrade, after stopping weewx) from 4.4 to 4.5.1 on Ubuntu 20.04 Core opting to get an updated weewx.conf

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] ? Y
Installing new version of config file /etc/weewx/weewx.conf ...
Installing new version of config file /etc/weewx/weewx.conf.dist ...
using debconf configuration values from previous install
update-rc.d: error: unable to read /etc/init.d/weewx

it would appear that somewhere along the line you deleted the file /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.5) ...
Errors were encountered while processing:
 weewx
E: Sub-process /usr/bin/dpkg returned an error code (1)

dpkg failed hard because of the missing /etc/init.d/weewx

debian is pretty good about not leaving things in a random state, even after dpkg failures.  but it can be rather complicated to extract yourself from such a situation.

mwall

unread,
Apr 4, 2021, 7:53:23 AM4/4/21
to weewx-user
On Saturday, April 3, 2021 at 2:47:20 PM UTC-4 PJO wrote:
I ended up with a bad weewx.conf and had to restore weewx.conf.dpkg-old

could you post the 'bad' weewx.conf (remove any passwords/keys first).

also, could you do a listing of your /etc/weewx directory contents?  e.g., ls -lRa /etc/weewx

t...@tom.org

unread,
Apr 4, 2021, 8:25:50 AM4/4/21
to weewx-user
Interesting that Belchertown 1.2 is working for you. Everything works great on 4.4.0 but reporting (downloading the Aeris forecast) fails on 4.5.1. I filed a bug in the Belchertown GitHub repo.

Mks Mk

unread,
Apr 4, 2021, 8:54:23 AM4/4/21
to weewx-user
mwall

started the upgrade to 4.5.0 from 4.4.0
used these commands for upgrade

sudo apt update
apt list --upgradable  (4.5 was showing)
sudo apt full-upgrade
I answered "N" to the upgrade select to keep my old files

but ended in failure weewx was not able to run.

later that day started the upgrade to 4.5.1

sudo apt update
apt list --upgradable  (4.5.1 was showing)
sudo apt full-upgrade
I answered "N" to the upgrade select to keep my old files.

weewx working again.
going through my files for check I found the issue with weewx.conf
I edited the file and changed it to 4.5.1 based on Tom advice.

the reason I asked is within the weewx.conf - this line of instruction "# Do not modify this. It is used when installing and updating weewx."

PJO

unread,
Apr 4, 2021, 8:57:35 AM4/4/21
to weewx-user
Yes, you're right I removed /etc/init.d/weewx -- when I switched to using systemd ; I didn't realize this would still be needed. In fact, I followed advice here that leaving this in place was not a good idea.
 
Attached are copies of the original and bad weewx.conf files and a file listing (from which I've deleted git related things to do with the skin I've been working on).

I didn't mention it earlier because I hadn't realized it yet, but fyi other problems I encountered were

1. issues with my copy of sensors.inc from the Seasons skin (see issue)
2. as result of my not checking things properly before restarting I ended up with some bad records until I reverted to the original weewx.conf file because of a changed schema

Lessons learned: switch to Seasons before running the update if using sensors.inc; verify weewx.conf changes properly (first time I've had an issue).
uploads.zip

Chris Alemany

unread,
Apr 4, 2021, 11:11:51 AM4/4/21
to weewx...@googlegroups.com
Successfully upgraded from 4.4.0 to 4.5.1 on Raspbian (pi 3b) with 
sudo apt-get update
sudo apt upgrade weewx
Running heavily modified Standard skin and the latest Weather34.

Cheers
Chris
Sent from my iPad

Neville Davis

unread,
Apr 4, 2021, 6:44:00 PM4/4/21
to weewx-user
I am not using Aeris I use Darksky and Australian met office data, with modified Belchertown skin.
So not seeing your problem.

Neville

Cameron D

unread,
Apr 5, 2021, 8:31:49 PM4/5/21
to weewx-user
Hi PJO,
I have changed the "advice" in the wiki relating to custom systemd unit files and init.d files. Sorry.  I can't recall the situation that led to that advice, but once the custom unit file is working properly then the init.d file is simply ignored.

PJO

unread,
Apr 5, 2021, 8:56:43 PM4/5/21
to weewx-user
Well, in principle one should be able to delete an old init.d file; my understanding is that your original advice was correct. The problem appears to have been an assumption that the init.d file would still be in place and available for use by the update procedure. I can restore it if necessary before the next update.

Cameron D

unread,
Apr 5, 2021, 9:14:50 PM4/5/21
to weewx-user
Yes - I think the issue is only with the update process and there are just too many potential situations for the update script to be comprehensive.
I would suggest you replace the old file before the next update.  I have previously shot myself in the foot by "cleaning up" after an installation - things I learned to do with rpm installs don't work with .debs.

moth...@gmail.com

unread,
Apr 6, 2021, 9:56:03 AM4/6/21
to weewx-user
No problems here. Everything works as it should.
Thanks for the update.

Op dinsdag 6 april 2021 om 03:14:50 UTC+2 schreef Cameron D:

Graham Eddy

unread,
Apr 11, 2021, 4:20:33 AM4/11/21
to weewx...@googlegroups.com
4.5.1 updated cleanly here (from 4.4.0 using setup.py on current RPi OS)

i ran into the as_value_tuple() API change, as documented - minor fix to change my services (added ‘except KeyError’ to ‘vt[0] is None’ test)
Reply all
Reply to author
Forward
0 new messages