Skip to content

Upgrading smarthome.py V1.0 to smarthomeNG.py V1.1

wvhn edited this page Jun 27, 2016 · 1 revision

This article is based on the German version in https://github.com/smarthomeNG/smarthome/wiki/Update by bmxp. It is more or less a translation with some changes nessecary for an update of the "old" image of mknx.

If Smarthome had been installed with git out of the old repository all paths are pointing to there. To switch this to SmartHomeNG repository, first change to the Smarthome folder:

cd /usr/smarthome

and list the current git origins:

git remote -v

The result is:

origin  git://github.com/mknx/smarthome (fetch)
origin  git://github.com/mknx/smarthome (push)

Now set the new URL:

git remote set-url origin --add https://github.com/smarthomeNG/smarthome
git remote set-url --delete origin  git://github.com/mknx/smarthome
git remote -v

The result will be:

origin  https://github.com/smarthomeNG/smarthome (fetch)
origin  https://github.com/smarthomeNG/smarthome (push)

Now, the new version can be downloaded with "git pull". Changes you have made before to smarthome sources will cause conflicts which you have to solve with the appropriate git commands or move them out of the smarthome directory, make a backup and restore them after the update (if necessary). To check which files may be affected type

git status

The result may look like this:

On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   bin/smarthome.py
        modified:   lib/daemon.py
        modified:   plugins/knx/dpts.py

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        plugins/uzsu/
        var/run/

no changes added to commit (use "git add" and/or "git commit -a")

In my case, I just had so restore changes I had made in plugins/knx/dpts.py to add a data point for matching the data format of my Tebis TS System. The other changes I had made for systemd control (see chapter 1) are now integrated in version 1.1.