We just took you through the process of getting started with Home Assistant, which is a piece of software that we installed on a Raspberry Pi 3 that can be used as your very own smart home hub, that is much more expandable and a lot cheaper than various other smart home hubs at just around £30.
There are a lot of components that you can add to your new Home Assistant install but in this article, we are going to take you through the setup process of one of the most popular smart home products, Philips Hue.
Home Assistant is fully capable of controlling these Philips Hue lights, with controls to turn on/off lights, set scenes and even set up smart light functions that work alongside the other components that are installed.
Before we start
We are going to assume that you have already installed Home Assistant on your Raspberry Pi and that you have previously installed the Philips Hue hub, lights, and the app, as we will need all of those.
If you haven’t set up Home Assistant yet, please follow our guide here, also if you haven’t got Philips Hue ready yet, be sure to do that before you start with this guide.
If you have done both of those then continue scrolling.
Link Philips Hue to Home Assistant
You will need to load up your configuration file once again and make sure that there is a line marked “discovery” within it. If there isn’t then you need to add the following line:
You will now have to reload your Raspberry Pi so you can either load up terminal and SSH into it with your credentials, or you can unplug you Pi and plug it back in again. If you are going for the more elegant solution then type this into the terminal when you are logged in:
That will allow Home Assistant to automatically look for and load your compatible components.
Once your Pi has reloaded you can go back to your Home Assistant interface and you should find a configurator section with an option to configure Philips Hue, like the image below:
Click on the configurator button.
Press to the big button in the centre of your Philips Hue bridge. On the old version of the Bridge, this will be the main button in the centre of the circle like device, much like what the pop-up shows in the image.
If it is a newer Philips Hue hub then you will have a square design. The button is still a circle in the centre, surrounded by a blue light.
Once you have pressed the button you will have around 30 seconds to get back to that screen and press the button that is labelled “I have pressed the button”.
If that all went correctly, then Home Assistant will then load up and show all of your Philips Hue lights.
Set the scene
One of the main features with Philips Hue is that you can set up various scenes that will allow you to save lighting settings and recall them when you want them to be shown or set them to be recalled automatically.
Of course, you can bring these scenes with you to Home Assistant.
The process of doing this is a little more advanced than what we are been through so far, however, once you understand it the process is simple enough.
The first thing that you will need to do is load up Home Assistant’s configuration mode again, we mentioned how to find this earlier so we won’t go back through that.
To bring scenes from Hue to Home Assistant you need to set up a script like the following:
Basically, what this does is set up two different scenes. The first allows me to activate the Concentrate scene in the Hue group Bedroom and the second allows me to activate Energize.
To set this up for yourself you need to load up the Hue app on your phone. The “group_name“ is the room name that you have set up and the “scene_name” is the scene that you have set within that room.
You can copy that script for each room and change it as according to each room, however, make sure that you keep the space correct and don’t repeat the script tag.
And that’s all
And that’s just about it for setting up Philips Hue with Home Assistant, pretty easy right?
Well, we say that but your dashboard probably looks like a bit of a mess right now and you probably want to move things around into the rooms that they belong in.
For that, we are going to post a separate how-to about how to separate these and other components and sensors into set groups that allow you to control rooms individually and sort things in a more organised manner.
We will update you with a link when we post that. In the meantime, check out the rest of our Smart Home Setup Guide here:
- Starting your own Smart Home with a Raspberry Pi and Home Assistant
- Set up Philips Hue with Home Assistant
- Optimising Home Assistant with groups, views, and a customised UI
- Adding Z-Wave capabilities to your Home Assistant install
- Integrating Sensative Strips with Home Assistant
- Add Xiaomi’s Yeelight LED strips to Home Assistant
- Add BroadLink RM Pro to Home Assistant