How to use the Homebridge Unraid Docker

Time’s have changed.  No longer are masses of virtual machines (or physical devices, such as raspberryPi) required. I’ve recently been introduced to the NAS (oh it’s so much more) software called Unraid.

Unraid allows you not only to run a NAS for your storage but also run “Dockers” or tiny virtual machine images which deploy in seconds. Developers have created thousands of these Dockers and you can usually find one which will work for you.

After having my Ubuntu virtual machine running for years with my Homebridge installation I eventually screwed it up and really couldn’t be bothered settings it all up again. However when Unraid came along it was a perfect opportunity to get it running again.

Which Version?

There are 2 versions of Homebridge on the community applications plugin. Both are the excellent work of Siwatinc.

I personally prefer the None GUI version as it’s easy to work with. I always had issues when i tried the GUI version.

Once you’ve clicked install you will want to setup your docker:

There are a few things you need to change.

You need to force a Mac address to the docker. This means you need to set the Docker it’s own IP address. This should be possible using Bridge mode.

If you choose the Advanced options you should see “extra parameters” here you can add your Mac Address – This is just a fixed number which you have registered with your lightwaveRF Hub. 

After this you need to install the correct package. If you only intend on using this for lightwaveRF just add the homebridge-lightwaverf package as below.

That’s It. Install the docker.

Once it’s running you can terminal into the Unraid box and navigate to the folder where you installed it (container path)

In my case it’s

cd mnt/user/appdata/homebridge

Here you will see a config.json. This is where you will place your custom JSON for your own setup. 

If you want to delete the current version you can run

rm -rf config.json

Then to create a new file

nano config.json

Then you can add your Json.

The general format is as below:

You must include the “username” as the MAC address of what is registered to communicate with your Hub and what you’ve set the dockers MAC address too.

Your PIN can be anything you like.

You must include your Hubs IP address under ip_address then you can create your JSON as before.

{
  "bridge": {
    "name": "Homebridge",
    "username": "00:A0:98:xx:xx:xx",
    "port": 51826,
    "pin": "021-23-242"
  },

  "description": "Your Homekit Server",
  "accessories": [],
  "platforms": [{

    "platform": "LightWaveRF",
    "name": "LightWaveRF",
    "ip_address": "192.168.xxx.xxx",
    "devices": [{
      "roomId": 2,
      "roomName": "Living Room",
      "deviceId": 1,
      "deviceName": "Downlight",
      "deviceType": "D"

    }]
  }]
}

After you’ve saved the JSON with Ctrl and x, restart the docker. 

You can view the dockers LOG to make sure the config took. You should see something like below on your Log. The Homekit Pin will be the one you set in your JSON.

   
Or enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐
│ 021-xx-xxx │
└────────────┘

Receiver socket listening 0.0.0.0:9761
[5/21/2020, 7:34:45 PM] Homebridge is running on port 51826.

It should now appear under the Home app on your Apple device for you to set up as normal.

Leave a Reply

Your email address will not be published.