Saturday, 15 April 2017

Homebridge update installation on RPi


Updated 2018-02-09 !

Raspberry Pi update

Update the Raspberry Pi OS, after You logged on to the RPi, with;

sudo apt-get update
sudo apt-get upgrade
sudo apt-get clean

Razberry update

If You have installed the Razberry Daughter card check the current software version on the Razberry WEB-site.

If You need to update just run the installation command

wget -q -O - http://razberry.z-wave.me/install | sudo bash 

Check updates

npm outdated -g --depth=0
Package                   Current  Wanted  Latest  Location
homebridge-telldus          0.0.9   0.0.9   1.0.3

Node and Homebridge-telldus update 

To check the current Homebridge version use 


npm list -g homebridge-telldus
/usr/lib
└── homebridge-telldus@0.0.9 

Checking the current Node version use

node -v
v6.4.0

Please note that the latest version of the Telldus plugin, V1.x.x, demands Node 8.3 or greater so if You are still on Node 6.x You first have to upgrade Node with

curl deb.nodesource.com/setup_8.x | sudo bash
sudo apt-get install nodejs

Reinstalling Homebridge.

sudo npm install -g --unsafe-perm homebridge

As seen above the command npm outdated wants the 0.0.9 version, so npm update want do the job if You wish to install 1.0.3, (latest).

Instead please use the command

sudo npm install -g homebridge-telldus@latest

Global update 

If You followed my earlier plugin instructions, use the npm update command

sudo npm update -g

The upgrade will at the end show something like this

├── homebridge@0.4.29
├── homebridge-telldus@0.0.9  (git+https://github.com/mifi/home......
├── homebridge-zway@0.5.0-rc0
├── node-gyp@3.6.0
└── npm@5.5.1

Selective update

OR do a selective update with respective package if You want to decide the version Yourself. For Telldus

sudo npm install -g homebridge-telldus@0

and so on....

12 comments:

  1. Om jag vill uppgradera till homebridge 1.* förstår jag rätt då att följande kommandon ska köras:

    1)
    curl deb.nodesource.com/setup_8.x | sudo bash
    sudo apt-get install nodejs

    2)
    sudo npm update -g
    (Jag följde din guide i min tidigare installation)

    Sedan klart??

    ReplyDelete
    Replies
    1. Do a backup first for example https://pysselilivet.blogspot.com/2017/11/rpi-clone-raspberry-boot-disk.html . Then the things under 1/, reinstall Homebridge and then sudo npm install -g homebridge-telldus@latest . The Blogpost is updated. Enjoy !

      Delete
  2. Kommer uppdateringen kräva att jag tar bort min konfigurering av hem-appen och att jag får lägga till ett nytt hem?

    ReplyDelete
    Replies
    1. I have never lost any configuration or connection to the Homehub (ATV or iPad) when upgrading.

      Delete

  3. Jag följde stegen ovan men då jag startar homebridge får jag fel att vissa moduler kompilerats mot fel Node.js.

    Då man installerar om homebridge ovan behöver man inte köra alla nedanstående kommandon som man gjorde vid första installationen för att få med sig rätt moduler?
    Dvs behöver man inte köra alla dessa kommandon?

    $ sudo npm install -g --unsafe-perm homebridge hap-nodejs node-gyp
    $ cd /usr/lib/node_modules/homebridge/
    $ sudo npm install --unsafe-perm bignum
    $ cd /usr/lib/node_modules/hap-nodejs/node_modules/mdns
    $ sudo node-gyp BUILDTYPE=Release rebuild
    $ cd /

    ReplyDelete
    Replies
    1. I did an update Yesterday just to confirm. The commands under "Node and Homebridge-telldus update" was enough updating my installation. Don't seems that Your Homebridge reinstallation whent OK

      Delete
    2. Do you have any suggestions what to do? I did not get any errors during the homebridge reinstallation.

      Delete
    3. Is Your OS updated? sudo apt-get update/upgrade ? Do the "Node and Homebridge-telldus update" commands again and really follow the log. Otherwise use Your backup, take a new backup, and do a new update.

      Delete
    4. I updated the OS and did the node and homebridge-telldus update again but still the same problem

      Delete
    5. Ok, its hard to do remote support ! Follow the instructions for a new installation and se if there is any change, otherwise use the backup.

      Delete
    6. För info så fick jag det att fungera då jag gjorde följande:

      1) "Please note that the latest version of the Telldus plugin, V1.x.x, demands Node 8.3 or greater so if You are still on Node 6.x You first have to upgrade Node with:"

      $ curl deb.nodesource.com/setup_8.x | sudo bash
      $ sudo apt-get install nodejs

      2) Här var jag tvungen att frångå guiden. Det räckte inte med att uppdatera bara Homebridge för mig utan jag var tvungen att utföra dessa kommandona
      (från guiden för första installation av homebridge):

      $ sudo npm install -g --unsafe-perm homebridge hap-nodejs node-gyp
      $ cd /usr/lib/node_modules/homebridge/
      $ sudo npm install --unsafe-perm bignum
      $ cd /usr/lib/node_modules/hap-nodejs/node_modules/mdns
      $ sudo node-gyp BUILDTYPE=Release rebuild
      $ cd /

      och därefter uppdatera homebridge

      $ sudo npm install -g --unsafe-perm homebridge

      3) Och till sist uppdatera telldus pluginet
      "Update to latest homebridge-telldus plugin:"

      $ sudo npm install -g homebridge-telldus@latest

      tack för all support!

      Delete
    7. Nice ! Thx for feedback, apprecated !

      Delete