I am a massive user of smart home products and most of my home is linked up in some shape or form with smart home accessories. I am a user of Apple’s HomeKit to control my smart home accessories, but I have a number of devices that are not supported by HomeKit.

Searching the internet I found a possible solution in HomeBridge and whilst you can install HomeBridge on a Mac, PC or a Raspberry PI device, I run a QNAP NAS at home to manage my home entertainment and CCTV cameras and wanted to install HomeBridge on my QNAP. So after some searching the internet, I figured how to install HomeBridge on a QNAP NAS and I wanted to share this knowledge with those of you that are wanting to do the same.

What is HomeBridge

How to install HomeBridge on a QNAP Nas wit

Homebridge is a lightweight NodeJS server you can run on your home network that emulates the iOS HomeKit API. It supports Plugins, which are community-contributed modules that provide a basic bridge from HomeKit to various 3rd-party APIs provided by manufacturers of “smart home” devices. So in short, if you wanted to use non homeKit devices like me then HomeBridge could a solution for you.

What do need to run HomeBridge on a QNAP NAS

  • A compatible QNAP NAS (intel chip only)
  • Container station installed
  • Connected to a network with internet access
  • iPhone, iPad or iPod running iOS 10 or later

Quick disclaimer – I am not held responsible for anything that goes wrong. I have got this working and use it with Hive Home, Neato and other products in my home with no issues.

How to install HomeBridge on a QNAP NAS – Step by step instructions

  1. Makre sure that Container Station is installed which can be found on the QNAP app StoreContainer station QNAP
  2. Open container station from the main QNAP app screen
  3. QNAP container station HomebridgeClick on “create”
  4. Search for HomeBridge. This will bring up lots of versions, but choose the one named marcoraddatz/homebridge this is the most stable and easier to manage, I have found so far.HomeBridge QNAP container station
  5. Click install and choose the “Latest Build” this will take you to a create screen
  6. Create a friendly name that you can identify later, make sure auto start is selected and set the resources to what you think you can allow.Create a container for Homebridge
  7. Click Advanced Settings > Network and change the Network Mode to Bridge.QNAP HomeBridge container network settings
  8. Open up QNAP’s File Station and create a set of folders called Container/HomeBridge in the root of the volume. This will allow you to modify the HomeBridge files via QNAP’s File Station.
  9. Click Advanced Settings > Shared Folders and select the folder HomeBridge you created in step 8. Then in the Mount Point map, a QNAP folder too/root/.homebridge.HomeBridge container folder
  10. Once you have done all of that and checked the settings above, press create. This could take some time as the download is 1.1GB. So sit tight and wait for HomeBridge to install.
  11. Whilst you are waiting, click on the links below and download the below files. You don’t need to modify unless you want to.
  12. Once the HomeBridge is up and running, you now need to stop the HomeBridge running
  13. Upload the files above using QNAP’s File Station your homebridge files into the shared folder (Step 8) Now restart the HomeBridge in container station. For clarity these are Install.sh and Config.json
  14. Open the HomeKit app on your iOS device. In the left and corner press the arrow symbol, then Home settingsHomeKit Homebridge setup
  15. Then press Add Home
  16. Name it something, whatever you like and then save.
  17. Go back to the HomeKit app screen and then click Add Accessory
  18. Scan the QR code in the container station console and everything should link up. If you are having trouble scanning the QR code then use the code in the console.HomeBridge HomeKit app setup
MUST READ  IKEA smart blinds to launch in Europe in August, US in October

That’s it, you have now setup HomeBridge on a QNAP NAS using a container station. You can now add smart home accessories onto HomeBridge. If you have any questions or comments on how this tutorial how to install HomeBridge on a QNAP NAS using container station then leave a comment below.

Credits to Marco for some images

  • 26
    Shares

24 COMMENTS

  1. I have been searching for a while how todo this, very clear and precise. I do have a question, how do I install devices after installation?

    • You run the install command for the device in the console within container station. Then add any sign in details to the config file

  2. Thanks for the write-up. In your instructions on Step 8, you say create a “HomeBridge” folder in the root of the volume. However your screenshot of Filestation 5 indicates that the Homebridge folder is actually a subfolder of “Container” on your system. Could you clarify or confirm where this folder is needed specifically?

    Second, I also assume that install.sh and config.json need to be uploaded into this “Homebridge” folder based on your instructions in step 13. However I think this step may have some typos or skipped words, as it doesn’t read clearly.

    Thanks again for your effort!

  3. I’m trying this and can’t get any devices to show up. there must be some simple thing I’m doing wrong. I get this:
    /root/.homebridge/.env not found.
    Default env variables will be used.
    /root/.homebridge/package.json not found.
    Installing plugins from /root/.homebridge/install.sh.
    + [email protected]
    updated 1 package in 4.817s
    + [email protected]
    updated 1 package in 2.932s
    + [email protected]
    updated 1 package in 2.678s
    + [email protected]
    updated 1 package in 2.46s
    npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor.
    + [email protected]
    updated 1 package in 10.406s
    npm WARN deprecated [email protected]: use @xmpp/xml package
    npm WARN deprecated [email protected]: This module is no longer maintained, try this instead:
    npm WARN deprecated npm i nyc
    npm WARN deprecated Visit https://istanbul.js.org/integrations for other alternatives.
    npm WARN deprecated [email protected]: use @xmpp/jid package
    + [email protected]
    updated 1 package in 13.14s
    *** WARNING *** The program ‘node’ uses the Apple Bonjour compatibility layer of Avahi.
    *** WARNING *** Please fix your application to use the native API of Avahi!
    *** WARNING *** For more information see
    *** WARNING *** The program ‘node’ called ‘DNSServiceRegister()’ which is not supported (or only supported partially) in
    *** WARNING *** Please fix your application to use the native API of Avahi!
    *** WARNING *** For more information see
    [2019-2-17 15:20:43] Loaded plugin: homebridge-harmonyhub
    [2019-2-17 15:20:48] Registering platform ‘homebridge-harmonyhub.HarmonyHub’
    [2019-2-17 15:20:48] —
    [2019-2-17 15:20:54] Loaded plugin: homebridge-nest
    [2019-2-17 15:20:54] Registering platform ‘homebridge-nest.Nest’
    [2019-2-17 15:20:54] —
    [2019-2-17 15:20:55] Loaded plugin: homebridge-netatmo
    [2019-2-17 15:20:55] Registering platform ‘homebridge-netatmo.netatmo’
    [2019-2-17 15:20:55] —
    [2019-2-17 15:20:57] Loaded plugin: homebridge-nukiio
    [2019-2-17 15:20:57] Registering platform ‘homebridge-nukiio.NukiBridge’
    [2019-2-17 15:20:57] Registering accessory ‘homebridge-nukiio.NukiLock’
    [2019-2-17 15:20:57] Registering accessory ‘homebridge-nukiio.NukiBridgeMaintainanceSwitch’
    [2019-2-17 15:20:57] —
    ….. lots of stuff….
    ] Homebridge is running on port 51826.
    errorhub { Error: connect ECONNREFUSED 192.168.1.247:5222
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1170:14)
    errno: ‘ECONNREFUSED’,
    code: ‘ECONNREFUSED’,
    syscall: ‘connect’,
    address: ‘192.168.1.247’,
    port: 5222 }
    errorhub { Error: connect ECONNREFUSED 192.168.1.188:5222
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1170:14)
    errno: ‘ECONNREFUSED’,
    code: ‘ECONNREFUSED’,
    syscall: ‘connect’,
    Unhandled rejection TimeoutError: operation timed out
    at afterTimeout (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/timers.js:46:19)
    at Timeout.timeoutTimeout [as _onTimeout] (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/timers.js:76:13)
    at ontimeout (timers.js:466:11)
    at tryOnTimeout (timers.js:304:5)
    at Timer.listOnTimeout (timers.js:267:5)

    Am i missing something?

  4. Very good instruction, easy to follow. Just not working… – got this error message:

    /usr/local/lib/node_modules/homebridge-homematic/ChannelServices/HomeMaticHomeKitThermometerService.js:47

    Any idea how to solve this?

  5. Appeared to work. Thank you.
    It would be very helpful to provide additional detail regarding how to view console. I was able to figure it out though.
    Is the following a problem?
    [3/9/2019, 4:36:00 PM] Homebridge is running on port 51826.
    errorhub { Error: connect ECONNREFUSED 192.168.1.133:5222
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1113:14)
    errno: ‘ECONNREFUSED’,
    code: ‘ECONNREFUSED’,
    syscall: ‘connect’,
    address: ‘192.168.1.133’,
    port: 5222 }
    errorhub { Error: connect ECONNREFUSED 192.168.1.16:5222
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1113:14)
    errno: ‘ECONNREFUSED’,
    code: ‘ECONNREFUSED’,
    syscall: ‘connect’,
    address: ‘192.168.1.16’,
    port: 5222 }

  6. Additional details regarding the two errors I posted:

    I checked the two referenced IP addresses on my DHCP server and found they are two Harmony remote hubs.
    So the following text that followed the two errors above is directly relevant:

    Unhandled rejection TimeoutError: operation timed out
    at afterTimeout (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/timers.js:46:19)
    at Timeout.timeoutTimeout [as _onTimeout] (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/timers.js:76:13)
    at ontimeout (timers.js:425:11)
    at tryOnTimeout (timers.js:289:5)
    at listOnTimeout (timers.js:252:5)
    at Timer.processTimers (timers.js:212:10)

    Unhandled rejection TimeoutError: operation timed out
    at afterTimeout (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/timers.js:46:19)
    at Timeout.timeoutTimeout [as _onTimeout] (/usr/local/lib/node_modules/homebridge-harmonyhub/node_modules/bluebird/js/release/timers.js:76:13)
    at ontimeout (timers.js:425:11)
    at tryOnTimeout (timers.js:289:5)
    at listOnTimeout (timers.js:252:5)
    at Timer.processTimers (timers.js:212:10)

Leave a comment or ask a question

This site uses Akismet to reduce spam. Learn how your comment data is processed.