March 02, 2020

Homebridge update installation on RPi

Updated 2023-10-27 !

! The latest information on Homebridge update is found here ! 

Start updating the Homebridge(HB) installation, after You logged on to the RPi, with;

sudo apt update && sudo apt full-upgrade -y

If You are using HOOBS or Homebridge with UX their updates can be done via respective GUI interface. HB also have a function to update Node.js. In other words, the info below is more like "nice to know".

Razberry update
If You have installed the Razberry Daughter card check the update instructions.

Check updates
With 


npm outdated -g --depth=0

and something like this will show

Package            Current  Wanted  Latest  Location
hap-nodejs          0.4.47  0.4.48  0.4.48
homebridge          0.4.45  0.4.46  0.4.46
npm                  6.4.1   6.7.0   6.7.0
npm-check-updates   2.14.2  2.15.0  2.15.0

and gives a hint what needs to be updated

If Node-Red(NR) is installed and appears in the list upgrade NR first with the installation script.

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

/usr/bin/homebridge -> /usr/lib/node_modules/homebridge/bin/homebridge
/usr/bin/npm-check-updates -> /usr/lib/node_modules/npm-check-updates/bin/npm-check-updates
/usr/bin/ncu -> /usr/lib/node_modules/npm-check-updates/bin/ncu
/usr/bin/npm -> /usr/lib/node_modules/npm/bin/npm-cli.js
/usr/bin/npx -> /usr/lib/node_modules/npm/bin/npx-cli.js
+ hap-nodejs@0.4.48
+ homebridge@0.4.46
+ npm-check-updates@2.15.0
+ npm@6.7.0
added 52 packages from 7 contributors, removed 38 packages and updated 71 packages in 139.451s

Now You have done a standard uppdate ! Below some additional info and tips

NPM, Node and Homebridge-telldus update 
NPM check 


npm -v
6.10.3

and if neccesary upgrade with 

sudo npm install npm@latest -g

To check the current Homebridge Telldus plugin version use 

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

Checking the current Node version use

node -v

Node version must be >= 18.x. Upgrade info here.

and then You need to reinstalling Homebridge.

sudo npm install -g --unsafe-perm homebridge

When using command npm outdated and latest is greater then wanted, use install command with latest. For example 

sudo npm install -g homebridge-telldus@latest

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

4 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

Feel free to leave a comment ! ... but due to a lot of spam comments I have to moderate them. Will reply ASAP !