Installing Homebridge

What is Homebridge?

Homebridge lets you add any smart devices to Apple’s HomeKit, even if they aren’t officially supported. It\’s open source and can run on a wide range of devices. I personally use it in a dedicated virtual machine on my server, but you can also use a Raspberry Pi.

Having smart lighting has been one of the best things I ever discovered.

  • It can completely change your mood when you’re working, relaxing, watching movies, etc.
  • I also use it as an alarm clock, turning on the lights full blast makes it easier to get out of bed!
  • I can tell Alexa to turn the lights off when I’m going to bed.

Am I really this lazy? Maybe. Give it a try, it’s the one thing I really won’t compromise on at my home.

These are the ceiling fixtures that I have installed: 12inch Smart Ceiling Light Fixture, Ocioc Slim Flush Mount Ceiling Light Compatible with Alexa Google Home

They’re not great, but they work! These lights will work with Alexa or Google Chrome, but not Apple’s HomeKit.

Installing Homebrige

This is where Homebridge comes in. Here’s a link to my Git Repository and the script below.


# Install NodeJS & Dependencies
sudo apt-get install -y nodejs
sudo apt-get install gcc g++ make
curl -sL | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn

# Install Homebridge
sudo npm install -g --unsafe-perm homebridge homebridge-config-ui-x

# Start Homebridge on Boot
sudo hb-service install --user homebridge

First Run

Once installed, open up your web browser and go to the local IP and port 8581. For example,

  • Default usernamee is admin
  • Default password is admin

You may want to change that.

Getting Started

  1. You should see something that looks like this:

  2. Scan the QR code with your iPhone and it will automatically add it to homekit.

Adding Devices

Once the bridge is set up, you can add devices. We’re going to add a few of the most common ones. Many of these devices seem to be compatible with a few apps,

  • Alexa
  • Google Assistant
  • Tuya
  • SmartLife


  1. Install the official Homebridge plugin for Tuya:
  2. Update the Settings with the API credentials (more instructions below)
  3. You should be able to see all the devices from your Tuya app in your homebridge portal:
  4. Open up HomeKit on your phone, and you’ll see this!

How to get Tuya API credentials

First, you’ll have to add all of your devices to the Tuya Mobile App. Once this is done:

  1. Go to the Tuya IoT Web Platform
  2. Create a Cloud Project
  3. Get API Keys, etc.
  4. XXX
  5. Restart Tuya