When I first read about Homebridge, I was very enticed by the possibilities of integrating many non-Homekit devices into Homekit, but the idea of setting up a Homebridge server sounded too intimidating. Many sites and guides mention things like Raspberry Pi, shows lines of codes, write terms like Node.js. Many resources were on Github and other coding repositories.
However, the allure of adding my RF ceiling fans to Homekit was too strong to resist (through a device called the Broadlink RM), and thus I set out to create my own Homebridge server. It turned out that once I sifted all the information out, it was a really simple thing to do. I was a bit surprised that I took such a big roundabout route to learn the easy way to set up my Homebridge, so this guide is hoping it’ll help you too.
For this guide to work, I’ll assume you are already familiar with Apple HomeKit. Let’s start with the basics.
Homebridge – Homebridge is a server you create in your own home. In this Homebridge server, you can add devices (that are not officially supported by Apple) into Apple HomeKit, through the use of Homebridge plugins. For example, I used the Broadlink RM Pro plugin to add my ceiling fans into the Homebridge server. Then, you can add the entire Homebridge into your Apple HomeKit, and your devices on Homebridge now appear in your Apple Home app.
Homebridge plugins – You’ll need to install plugins for your Homebridge server to know how to work with different hardware. If you use a Tuya smart switch, you’ll need a Tuya-web plugin so Homebridge will know how to make it work with HomeKit. My Broadlink devices work with a Broadlink plugin.
Why Homebridge? – There are many, many smart devices, bulbs and other knick knacks that are branded “Works with Alexa”, “Works with Google Home”, and the occasional “Works with Siri” (this is actually through Siri Shortcuts, not HomeKit). There are much less devices that “Works with Apple HomeKit”, and they are usually more expensive. Homebridge allows you to buy that cheaper smart lightbulb that only works with Alexa and Google Home, and add it into your HomeKit.
Raspberry Pi – Homebridge, as a server, needs to be running off some hardware. You could use your Windows PC, for example, but you’d want the server to be running 24/7, or your smart home wouldn’t respond when your PC was off. The solution is a small computer called the Raspberry Pi, available for about S$60. Fits into the palm of your hand, comes with wifi, and draws very little power using any old USB wall charger and a micro-USB cable. I found the Raspberry Pi to be the easiest way to get a Homebridge server up and running – and quite inexpensive. It’s also OK to run 24/7.
Raspberry Pi’s microSD Card – The Raspberry Pi doesn’t come with any disk drive, it needs a micro-SD card to work. Technically, the Raspberry Pi is 100% hardware, and for it to be used as a server, it requires software like an operating system (like Raspbian). Getting confused? No worries, it’s simple. Basically, you put the operating system into the microSD card, and insert it into the Raspberry Pi. Now, software and hardware is complete and you’ll have your little computer running.
Official Homebridge Raspberry Pi Image – Here’s where the operating system and software comes into play to make your Raspberry Pi a Homebridge server. This image file is the collection of files and folders and whatever else required to create that software – operating system, Homebridge server etc. Download the image, write it into the SD card (instructions below), and now your SD card is like a fully functioning Homebridge server just looking for the hardware to work on. Stick the SD card into your Raspberry Pi and presto!
What about HOOBS? – HOOBS, or Homebridge Out Of the Box System, is another way to easily install Homebridge onto a Raspberry Pi, with its own HOOBS branding. I actually tried using HOOBS first, but found the official Homebridge installation equally easy and more reliable.
With these out of the way, here are the steps to set up your Raspberry Pi Homebridge server.
1. Buy A Raspberry Pi 3b Plus
My guide is all about Raspberry Pi, because I found it easier installing on the Pi than on Windows. A quick primer: Raspberry Pi has a few models available, from the Zero to the Raspberry Pi 4. The Homebridge image works on all models of the Raspberry Pi. My own research made me decide to use the Raspberry Pi 3B plus, for the following reasons:
- The 3B plus has wifi so setup is simple (the Zero doesn’t)
- The 4 is overkill for Homebridge – it has more processing power than is required for Homebridge
- The 4 runs hotter than the 3B Plus
- Between 3B and 3B Plus, I just picked the Plus because it has some better features, and I hoped the temperatures would be lower
- The 3B Plus is cheaper than the 4
Basically, the Raspberry Pi 3B Plus is the right mix of price, performance, and temperatures. Do note that in my setup, I do not run cameras or videos. If your plan includes cameras and video feeds, you may want to research more.
I bought my Raspberry Pi 3B Plus on Shopee for S$60, with a normal black case from the same shop for $9 (which I shouldn’t have – read on):
The Raspberry Pi Temperature and Cooling
Maybe because I was a PC building geek back in the day, my main concern with the Raspberry Pi is the temperatures and whether it needed active or passive cooling. What I really wanted was to have a Raspberry Pi which either did not need cooling, or could be cooled passively (without a fan), as I did not want a fan whirring in my cabinet 24/7.
Basically, being a computer, a Raspberry Pi is certain to create heat, as all computers do. To keep the components functioning properly, temperatures must be kept low.
I had read that the Raspberry Pi 4 runs significantly hotter than the Raspberry Pi 3B plus, due to its higher computing prowess. But I wondered if I could run a Raspberry Pi 3B Plus with Homebridge with no cooling whatsoever. The answer, it turned out, was no.
My Raspberry Pi 3B Plus + normal black case + no cooling at all (no heatsink, no fan) was running Homebridge at an average of 65C, in ambient 28C room. My Pi sat deep in a console. This was too high for me, and my aim was for the temperatures to be below 60C.
To solve this problem, I bought a Flirc case on Amazon for SGD 20. Happy to report that my temperatures now hover at 48 – 51C, which was acceptable to me.
2. Buy a Micro SD Card
There are lots of recommendations on SD cards online, but I didn’t get too hung up on what to use. I just used a spare 32GB card I had lying around. It’s a Class 10 Sandisk Micro SD card.
3. Download and install the Official Homebridge SD Card Image
This is how you put Homebridge into your Raspberry Pi. This reddit post had lots of useful info and the download links. Actually, the whole process is already documented in the official download page.
For those of you who need specific instructions, here’s what you do.
- Go to the official download page.
- Scroll down to halfway down the page where it says DOWNLOAD LATEST VERSION, and click on that (not the green Download Code button nearer the top).
- A new page opens, click the link to download the file. It will be a zip file called Raspbian-Homebridge etc etc.
- Now, go back to the official download page, and continue following the instructions – download the app called Etcher
- You’re going to need a way to put the SD card into your PC (if you don’t have a PC, this guide isn’t for you), probably through your computer’s built-in SD card slot or an USB SD Card reader.
- Use Etcher to write the image file (the zip file from step 3) into your micro-sd card (follow instructions!). This actually took me a few tries, the first few times the writing failed.
- Once done, put the SD card into your Raspberry Pi and power it on! Your Homebridge server is now setting itself up
- Wait a few minutes and use your phone to connect to the wifi network (Homebridge WiFi Setup) your Raspberry Pi created, and follow the instructions.
Tada! At this point, you’ll have Homebridge up and running, hopefully! When everything is set up, you can change configuration and manage Homebridge by using your PC browser to point to homebridge.local, or at the Raspberry Pi’s IP address.
Of course, that’s just the start. Now there are plugins to install, maybe even code to write. But all those are things for a later date. Hopefully I’ll have time to write a simple guide to the Broadlink plugin one day – it looked really intimidating when I first started reading about it, but I realized it was actually ok. There’s still some coding involved, though, so not for complete novices.
For me, the beauty of this process is that at no point of time did I have to enter a command line string like
npm install -g --unsafe-perm homebridge homebridge-config-ui-x
I was pleasantly surprised by how easily it all came together, for someone totally new to Homebridge and Raspberry Pis. It just worked!
Leave a Reply