HomeBridge – Wireless

Before you can install HomeBridge on a Raspberry Pi Zero W, you must first provide it with Raspbian OS. How to install your Raspberry Pi Zero W, you can read in one of my previous blogs here. Now that you have a Raspberry Pi Zero W running on Raspbian OS, well configured and connected to your Wi-Fi network. You are ready to install HomeBrige on your Raspberry Pi Zero W.

Access your Raspberry Pi Zero W

First open the Terminal on your mac. The first thing to understand about Terminal is that it’s just an application and it lives in the Utilities folder in Applications. You launch it like any other and when you do, you’ll see Apple’s implementation of a Unix command-line environment, known as a shell. Make a connection to your Raspberry Pi Zero W by typing SSH Pi@XXX.XXX.XXX.XXX where XXX.XXX.XXX.XXX is the IP Address from your Raspberry Pi Zero W.

SSHPi@XXX.XXX.XXX.XXX

Note: If you don’t know your IP address you can use LanScan you can get it here. LanScan is a free, simple and efficient IPv4 network scanner that discovers all active devices on any sub net: the local one, or any public sub net that you configure.

Now you will be prompted to typ your password (default Raspberry, you should change this as soon as possible).

Install Homebridge

On a ‘regular’ Raspberry Pi it is very simple to install HomeBridge, but on a Pi Zero it’s just a bit more complicated. For this step-by-step plan I used the HomeBridge maker’s tutorial. Where necessary, I adapted this to the Pi Zero (W).

Install ‘git’ and ‘make’ by typing

sudoapt-getinstallgitmake

When done Install ‘nodejs‘ Install the latest version of Node.js. For this, visit the Node.js website and find the latest version for ARMv6. Copy the link to the latest version (do not download the file) and type wget and then paste the link.

Installing the the required packages

Avahi is a fully LGPL framework for Multi cast DNS Service Discovery. It allows programs to publish and discover services and hosts running on a local network with no specific configuration. For example you can plug into a network and instantly find printers to print to, files to look at and people to talk to. The Avahi is a prerequisite for HomeBridge, so you can install it by typing.

sudoapt-getinstalllibavahi-compat-libdnssd-dev

Installing Homebridge

This may take a considerable amount of time. Be patient and while waiting you can look around at my site

sudonpminstall-g--unsafe-permhomebridgehap-nodejsnode-gyp

cd/opt/node/lib/node_modules/homebridge/

sudonpminstall--unsafe-permbignum

cd/opt/node/lib/node_modules/hap-nodejs/node_modules/mdns

sudo/opt/node/bin/node-gypBUILDTYPE=Releaserebuild

Start Homebridge

/opt/node/bin/homebridge

Yes it works!

Since no plugins are yet installed, you will not be able to handle it, but the base is laid. Check out what plugins there are? That can be done on my site of course and here!

You can stop HomeBridge by typing

CTRL+C

Now you only need a power supply to power your HomeBridge, No other cables needed!

Donate

Since October 2015, StudioPieters® has been writing this blog. Help accelerate its development with a small contribution! StudioPieters® is open source, and 100% free . Please consider donating to StudioPieters® before starting the fun of building and learning. StudioPieters® is a non-profit organisation devoted to making creative use of electronics accessible to everyone.