Homekit Between Subnets

 
Capture.PNG
 
 

I recently picked up a HomePod, this now makes it so I own the big three Personal assistant speakers. Now I had tried before to connect my Phillips hue speakers to my iPhone before but due to them being on a separate subnet from my phone it didn't want to connect with just MDNS, For the last 6+ months I really could not be bothered to fix this as I could control my lights through Alexa. Now with the arrival of this speaker, I finally got the push to fix this little networking issue.

Step One Networking

First thing you will need is MDNS (Avahi) enabled on both the network your hue bulbs are on and the network your iPhone and subsequently HomePod is on ( I will get into this in my smart speaker review later). If this is not already set go to your PFSense router and open Services > Avahi.

Capture.PNG

In here hold CTRL and then click on the networks that your Apple devices and hue sit on. Now we need to make our firewall rule. For this we will need to create 2 aliases, one for our Homekit Devices and the other for the ports. So head over to Firewall > Alias.

Capture2.PNG

Now for the first device alias, we are going to add both our iDevices and our hue devices as from what I'm aware there is a need for some back and forth between the devices (you will need to give all these devices static IP’s). This also helps decrease the number of rules we need to create from 2 to 1. The second alias is the ports needed for communication which is.


443

80

8080


Once the aliases are created, Head over to Firewall > Rules.

Capture3.PNG

On both the networks that your iDevices and hue sit on you will need to create a TCP rule from and to your device alias you created with the destination port range being the one you created. This will allow communication between hue and your homekit devices.

Step Two Adding Hue To HomeKit

This needs to be done from your iPhone and surprisingly you also need to have the hue app installed to actually add the devices to HomeKit.  First we need to connect our phone to the same subnet as the Hue bridges, This is important as if they are not connected to the same network for this initial pairing they will not connect to one another (After this pairing is done we can go back to the normal subnet and still communicate).

When your on the Hue subnet open up Hue on your iPhone then go to Settings > HueBridges then click add. You will then need to go to your bridge and press the button on top.

19-06-22 15-58-54 0044.png

Repete this for as many bridges as you have on your network (I have 2 as my house seems to be made out of mostly external walls). After you have added you lights and bridge(s) select your bridge then head to Settings > Homekit & Siri then press Join at the bottom of the screen. If i had foresight i would have taken screenshots for the rest of this process.

After you hit join you can add the items to an existing home or create a new home, once this is done hit next it's now time for fun. You will then need to go to each of your bridges and turn it over and find it's home kit code enter this hit done and you will now be able to control your hue with homekit. Repete this for any other bridges in your home, Once your done you can disconnect your phone from your Hues subnet and back to its normal subnet. Now you should be able to control your Hue bulbs between the subnets.