Upgrade Raspbian Wheezy (Debian 7) to Jessie (Debian 8) to support Z-Way v2.3.8 (specially for Popp Hub 1)

Tips, Tricks and Scripts to enhance your home automation and workaround known device bugs, limitations and incompatibilities
Post Reply
User avatar
ronie
Posts: 57
Joined: 29 Jun 2015 09:50

Upgrade Raspbian Wheezy (Debian 7) to Jessie (Debian 8) to support Z-Way v2.3.8 (specially for Popp Hub 1)

Post by ronie » 07 Nov 2018 18:12

How to migrate from Wheezy to Jessie to support Z-Way v2.3.8

After v2.3.7 the z-way installation package structure was changed for maintainance reasons from simple *.tgz into debian packages.
Also some newer libs are used now which are not supported by Wheezy (Debian 7). So this distribution won’t be supported anymore by default as before, which means an upgrade to Jessie (Debian 8) is necessary if you still want support for your Z-Way.

This instruction should help you to migrate your old system to the other.

Revert a faulty v2.3.8 upgrade - e.g. done on Wheezy

If you unfortunately tried to upgrade to v2.3.8 and your hub seems to be broken now then please follow these Receipe to roll the update back tov2.3.7:
Revert a Z-Way upgrade with help of the terminal

Make your box ready for v2.3.8

An upgrade from Wheezy to Jessie is necessary if you still want to use the latest Z-Way . It is recommented to do backups before (Smart Home UI > Menu > Management > Backup > Cloudbackup or Local Backup / Expert UI > Network > Control > Create Backup). Please follow the next instructions below to upgrade your system.

!!Attention!! This update can take up to 2 hours or more. Making a copy of your SD card before is recommented.

Follow these steps below to upgrade wheezy to jessie:
  1. Get up to date:

    Code: Select all

    $ sudo apt-get update
    $ sudo apt-get upgrade
    $ sudo apt-get dist-upgrade
  2. Verify nothing is wrong. Verify no errors are reported after each command. Fix as required (you’re on your own here!).

    Code: Select all

    $ dpkg -C
    $ apt-mark showhold
  3. Optionally upgrade the firmware.

    Code: Select all

    $ sudo rpi-update
  4. Prepare apt-get
    Update the sources to apt-get. This replaces "wheezy" with "jessie" in the repository locations giving apt-get access to the new version’s binaries.

    Code: Select all

    $ sudo sed -i 's/wheezy/jessie/g' /etc/apt/sources.list
    $ sudo sed -i 's/wheezy/jessie/g' /etc/apt/sources.list.d/*.list
  5. Verify this caught them all. Run the following, expecting no output. If the command returns anything having previously run the sed commands above, it means more files may need tweaking. Run the sed command for each.

    Code: Select all

    $ sudo grep -lnr wheezy /etc/apt
  6. Do the Upgrade:

    Code: Select all

    $ sudo apt-get update && sudo apt-get upgrade -y
    $ sudo apt-get dist-upgrade -y

    some user prompts during the installation may occur (handle on your own choice):
    popp hub 1 users can usally accept with yes or Y

    Code: Select all

    no ssh for root user: yes/no
    >>yes
    
    some services needs to be restarted: yes/no
    >> yes
     
    Configuration file '/etc/skel/.bashrc'
    ==> 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.
    *** login.defs (Y/I/N/O/D/Z) [default=N] ?
    >> Y
     
    Configuration file '/etc/sysctl.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.
    *** login.defs (Y/I/N/O/D/Z) [default=N] ?
    >> Y
     
    Configuration file '/etc/login.defs'
    ==> 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.
    *** login.defs (Y/I/N/O/D/Z) [default=N] ?
    >> Y
     
    Configuration file '/etc/xdg/openbox/LXDE/rc.xml'
    ==> 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.
    *** rc.xml (Y/I/N/O/D/Z) [default=N] ?
    >> Y
     
    Configuration file '/etc/xdg/pcmanfm/LXDE/pcmanfm.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.
    *** pcmanfm.conf (Y/I/N/O/D/Z) [default=N] ?
    >> Y
     
    Configuration file '/etc/dphys-swapfile'
    ==> File on system created by you or by a script.
    ==> File also in package provided by package maintainer.
    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.
    *** dphys-swapfile (Y/I/N/O/D/Z) [default=N] ?
    >> Y
    
    Configuration file '/etc/nginx/sites-available/default'
    ==> Deleted (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.
    *** default (Y/I/N/O/D/Z) [default=N] ?
    >> Y
    
    Configuration file '/etc/lightdm/lightdm-gtk-greeter.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.
    *** lightdm-gtk-greeter.conf (Y/I/N/O/D/Z) [default=N] ?
    >> Y
    
  7. Cleanup old outdated packages.

    Code: Select all

    $ sudo apt-get autoremove -y && sudo apt-get autoclean
  8. Verify with

    Code: Select all

    $ cat /etc/os-release
    the updated Firmware.
  9. You’ve come this far, might as well get the latest firmware.

    Code: Select all

    $ sudo rpi-update
Z-Way upgrade:

Finally update z-way to latest POPP version (v2.3.8)

Code: Select all

$ wget -q -O - http://z-way.z-wave.me/z-way/popp_rpi/v2.3.8-rcFINAL-internal/install | sudo bash
or latest Z-Wave.Me version (v2.3.8)

Code: Select all

$ wget -q -O - http://z-way.z-wave.me/z-way/razberry/latest/install | sudo bash
Check if your z-way-server is running:

check the z-way-server log

Code: Select all

$ tail -f /var/log/z-way-server.log   // cancel with [Ctrl] + [C]
and check the Smart Home or Expert UI - after login go to
http://[IP]:8083/smarthome/#/events
http://[IP]:8083/expert


that there are no Error Messages about Z-Way or Z-Way Binding (You will also recognize it because your Z-Wave devices aren't available)
Otherwise follow the steps in the Error Message. Serial port for UZB is /dev/ttyACM0 and for RaZberry /dev/ttyAMA0.

If the z-way binding is ok but the port has gone (null) > check the console log with the command above
Check if /boot/cmdline.txt is not empty and that the content is similar to the content below.
Simply open the nano editor and check the content:

Code: Select all

$ sudo nano /boot/cmdline.txt
// content
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
Store and / or leave the file by pressing [CTR] + [X].
If you will be asked to store your changes type Yes and press enter. Also agree by pressing [Enter] if the file will be overwritten.

If a change was necessary, reboot the box

Code: Select all

$ sudo reboot
In any other case of problems please contact the Support:
support(at)z-wave.eu (DE/EN)
razberry(at)z-wave.me (RU/EN/FR)

Or try to search our forums to find a suitable solution:
http://forum.z-wave.me/ (EN/RU/DE/FR/IT/CN)
http://zwave.de/forum/ (DE)

========================================================================
Anleitung in deutsch: Wie man von Wheezy nach Jessie migriert, um Z-Way v2.3.8 nutzen zu können

Post Reply