This document has three sections:
The section Instructions for Specific Versions applies to both installation methods.
Warning!
You must use the same upgrade technique as your initial install!
For example, if you used setup.py to install
weewx, you should use
setup.py to upgrade.
If you used a DEB or RPM package to install, then you should upgrade
using the same package type.
Before upgrading weewx, check the section Instructions for Specific Versions to see if any specific actions are required. Then follow the standard installation procedure:
Unpack the archive:
tar xvf weewx-X.Y.Z.tar.gz
Change directory into it:
cd weewx-X.Y.Z
Build the distribution:
./setup.py build
Install weewx:
Warning!
Before doing the next step, be sure that home
in the file setup.cfg is set to the location
of the previous weewx installation.
sudo ./setup.py install
The install process will do the following:
Upgrade to X.Y.Z like this:
sudo dpkg -i weewx_X.Y.Z-R.deb
The upgrade process will not modify the weewx databases.
Unmodified files will be upgraded. If modifications have been made to the weewx configuration, you will be prompted as to whether you want to keep the existing configuration or accept the new configuration. Either way, dpkg will save a copy of the option you did not choose.
For example, if /etc/weewx/weewx.conf was modified, dpkg will present a message something like this:
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] ?
Choosing I (install the new version) will place the previous configuration in /etc/weewx/weewx.conf.dpkg-old where it can be compared with the new version /etc/weewx/weewx.conf
Choosing O (keep the current version) will place the new configuration in /etc/weewx/weewx.conf.dpkg-new where it can be compared with the old version /etc/weewx/weewx.conf
Upgrade to X.Y.Z like this:
sudo rpm -U weewx-X.Y.Z-R.rpm
The upgrade process will not modify the weewx databases.
Unmodified files will be upgraded. If modifications have been made to the configuration, rpm will display a message about any differences between the changes and the new configuration. Any new changes from the upgrade will be noted as files with a .rpmnew extension and the modified files will be left untouched.
For example, if /etc/weewx/weewx.conf was modified, rpm will present a message something like this:
warning: /etc/weewx/weewx.conf created as /etc/weewx/weewx.conf.rpmnew
Version 2.2 introduces a schema, found in bin/user/schemas.py, for the stats database. This schema is used only when initially creating the database. If you have a specialized stats database, that is, one that saves types other than the default that comes with weewx, you should edit this file to reflect your changes before attempting to rebuild the database.
Version 2.0 introduces many new features, including a revamped internal engine. There are two changes that are not backwards compatible:
All skins should be completely backwards compatible, so you should not have to change your templates or skin configuration file, skin.conf.
If you have written a custom report generator it should also be backwards compatible.
Version 1.14 introduces some new webpages that have been expressly formatted for the smartphone by using jQuery.
The skins shipped with the distribution take advantage of these features. If you do nothing, your old skins will continue to work, but you will not be taking advantage of these new webpages.
If you want them, then you have two choices:
After the section that looks like
[[[Mobile]]] template = mobile.html.tmpl
add the following directives:
[[[MobileSmartphone]]] template = smartphone/index.html.tmpl [[[MobileTempOutside]]] template = smartphone/temp_outside.html.tmpl [[[MobileRain]]] template = smartphone/rain.html.tmpl [[[MobileBarometer]]] template = smartphone/barometer.html.tmpl [[[MobileWind]]] template = smartphone/wind.html.tmpl [[[MobileRadar]]] template = smartphone/radar.html.tmpl
Then modify section [CopyGenerator] to add the highlighted files:
[CopyGenerator] # # This section is used by the generator CopyGenerator # # List of files that are to be copied at the first invocation of the generator only copy_once = backgrounds/*, weewx.css, mobile.css, favicon.ico, smartphone/icons/*, smartphone/custom.js
Whichever approach you chose, the generated files will appear in public_html/smartphone. The start of the document root will be at public_html/smartphone/index.html. You may want to add a link to this in the template for your main index page skins/Standard/index.html.tmpl.
Version 1.13 changed the way binding happens to the databases used in reports so that it happens much later. The upshot is that the signature of a few functions changed. Most you are unlikely to encounter. The exception is if you have written custom template search lists, as described in the section Extending an existing report generator in the Customizing weewx guide. This section has been updated to reflect the new function signatures. As a side effect, the illustrated example actually has become much simpler!
No changes to skins.
Version 1.10 introduced several new features.
Version 1.10 introduces some extra almanac features, such as the azimuth and elevation of the sun and moon, or when the next solstice will be. It also includes a template formatted for smartphones, as well as an icon ("favicon.ico") that displays in your browser toolbar. The skins shipped with the distribution take advantage of these features. If you do nothing, your old skins will continue to work, but you will not take advantage of these new features.
If you want these new features then you have two choices:
Add a new [[[Mobile]]] section:
[FileGenerator] ... [[ToDate]] ... [[[Mobile]]] template = mobile.html.tmpl
Then add mobile.css and favicon.ico to the list of files to be copied on report generation:
[CopyGenerator] copy_once = backgrounds/*, weewx.css, mobile.css, favicon.ico
Which approach you should take will depend on how extensively you have modified the stock skin distribution. If the modifications are slight, approach #1 will be easier, otherwise use approach #2.
With the introduction of explicit control of output units in the templates such as
$day.outTemp.max.degree_C
the calling signature of the following two Python classes was changed
The example of writing a custom generator MyFileGenerator (which produced "all time" statistics) has been changed to reflect the new signatures.
This will only affect you if you have written a custom generator.
With the introduction of a standard archiving service, StdArchive, the names of some events have changed. This will not affect you unless you have written a custom service.
V1.7 introduces skins. The skins live in subdirectory skins. They are not compatible with the old template subdirectory --- you can't simply rename templates to skins.
The part of the configuration file dealing with the presentation layer has been split off into a separate file skin.conf. Hence, once again, the installation script setup.py will NOT merge your old weewx.conf configuration file into the new one. You will have to re-edit weewx.conf to put in your customizations. You may also have to edit skin.conf for whatever skin you choose (right now, only one skin, Standard, comes with the distribution).
However, a reinstall of V1.7 will merge your changes for weewx.conf. It will also merge any changes you have made to skin.conf as well.
Please check the following:
altitude = 120, meter
heating_base = 65, degree_F cooling_base = 65, degree_F
The directory 'templates' is no longer used; it has been replaced with directory 'skins'. You may delete it if you wish:
rm -r $WEEWX_ROOT/templates
Because the configuration file weewx.conf changed significantly going from V1.4 to V1.5, the installation script setup.py will NOT merge your old configuration file into the new one. You will have to re-edit weewx.conf to put in your customizations.
Option clock_check, previously found in the [VantagePro] section, is now found in the [Station] section. The install program will put a default value in the new place, but it will not delete nor move your old value over. If you have changed this value or if you can't stand the thought of clock_check appearing in two different places, you should delete the old one found under [VantagePro] and make sure the new value, found under [Station] is correct.
Two Python files are no longer used, so they may be deleted from your installation if you wish:
rm $WEEWX_ROOT/bin/weewx/processdata.py rm $WEEWX_ROOT/bin/weewx/mainloop.py
In addition, file readme.htm has been moved to subdirectory $WEEWX_ROOT/docs, so the old one can be deleted:
rm $WEEWX_ROOT/readme.htm
© Copyright Tom Keffer