Installing HomeBridge on my Synology NAS with Docker
The first thing I did was find and configure a Docker image of HomeBridge. HomeBridge is a service that runs on your network emulating the HomeKit API. This allows unapproved third-party devices to be configured with HomeKit and controlled with Siri.
After downloading one of the Docker images for HomeBridge, I followed the directions found on it's Docker page. It essentially involves creating a shared folder where you will store your HomeBridge files that the Docker container will access. Templates of the configuration files are found here.
Unfortunately, the GUI wizard for Docker on Synology does not provide the opportunity to configure the container as necessary so it must be started from the terminal via SSH or some other method.
docker run --name=HomeBridge -d --restart=always --net=host -p 51826:51826 -v /volume1/docker/homebridge:/root/.homebridge psmith/synology-docker-homebridge:0.13
In my docker/homebridge shared folder I prepared two files, config.json and package.json.
The package.json file contains the command so that homebridge-smartthings will be installed. This plugin is needed for HomeBridge to interface with my SmartThings hub.
{ "scripts": { "install": "npm install -g homebridge-synology homebridge-smartthings --unsafe-perm" } }
The config.json file contains the bridge setup and the SmartThings platform setup. The SmartThings setup required setting the unique app_id and access_token which I will obtain after configuring the SmartThings SmartApp for HomeBridge.
{ "bridge": { "name": "Homebridge", "username": "CC:22:3D:E3:CE:30", "port": 51826, "pin": "031-45-154" }, "platforms": [ { "platform": "SmartThings", "name": "SmartThings", "app_url": "https://graph.api.smartthings.com:443/api/smartapps/installations/", "app_id": "************************", "access_token": "************************", "polling_seconds": 600, "update_seconds": 1 } ] }
Preparing SmartThings
For the SmartThings setup I followed the instructions found on the smartthings-homebridge page. A few things that I noticed missing from the instructions were
- In order to see the Settings button under My SmartApps, you need to first integrate your account with a GitHub account. I already had a GitHub account, so linking them was quick.
- Before you can see JSON Complete API appear under My Apps in the SmartThings app, you need to publish the program from the My SmartApps webpage by clicking on the program pdlove : JSON Complete API and then selecting the Publish button at the top.
Opening the program within My Apps in your cellphone, after you enable all the devices, there is a Config section which provides the unique app_id and access_token needed for the HomeBridge configuration on my server file config.json.
iOS Setup and Final Thoughts
It took me a while to understand how to set everything up, but once I saw the Docker container log say Homebridge is running on port 51826 without it crashing I knew I was almost done! Now I just had to find a HomeKit app to configure and hope it all works well.
I checked online for different HomeKit apps I could use that are free. The Insteon+ app required you to register an account first, and then Lutron app could not find my HomeBridge. I finally found success with the Devices app. It was able to find the HomeBridge and detect all my devices on the SmartThings hub.
After I asked Siri to turn on one of my lights, it worked! I do not have an Apple TV so I will not be able to use Siri when I am away from home, but I believe this can be useful in locations where I cannot yell to my Amazon Echo. The setup was relatively easy with Docker containers and the SmartThings plugin already available for HomeBridge. For those with a SmartThings Hub hoping to control it with Siri, HomeBridge is the real deal!
super! I hope that is still working! can you add any device you want regardless the brand?
ReplyDeleteYes, it has been stable and reliable. Since it is just an interface for the SmartThings hub, any device that works with SmartThings should work fine through HomeBridge to iOS.
Deletethanks a lot, I will install it and try some wemo plugs and switches!
DeleteUnfortunately, just discovered that the ds216play I bought is 32 bit so can't run Docker. Guess my wife and her iOS devices are going to be out of luck, at least for now.
ReplyDeleteYou are my new hero! Love it!
ReplyDeletecold storage fort worth FrigiServe is a commercial cold storage warehouse that provides quick freezing, handling, and storage for the food industry. Contact Us.
ReplyDeleteyacht charter in Goa Embark on an unforgettable voyage on a luxury yacht with Marine Asia, the leading yacht charter company in the Goa. Available for both daily and hourly rent, we own the yachts showcased by goayacht.com. Backed by a professional crew with more than 20 years of sailing experience, our yacht rental service in Goa aims to deliver the ultimate yachting experience with professionalism, security, and unparalleled luxury.
ReplyDeleteThanks for ones marvelous posting! I really enjoyed reading it, you might be a great author.
ReplyDeleteI will be sure to bookmark your blog and will eventually come back later on.
Try to check my webpage - 부산오피
Starbucks teamworks
ReplyDeleteStream2Watch
ReplyDeletegizmo login
ReplyDeletepartner connect cintas
ReplyDelete