Apple HomeKit 150 Device Limit

Is there anything I can do to get around the 150 device limit using the Built-In HomeKit Integration for Hubitat? I know I can go above this with Homebridge, but I do like how integrated and seamless it works with the hub and would like to avoid having to go back to Homebridge again.

Not a good answer, but you could get another Hubitat hub and put some of your devices on it. hub mesh to the other hub. Create new HomeKit Integration from new hub.

Important to note that hub meshed devices are not allowed in the inbuilt HomeKit app. For this reason I still run HomeBridge because of my multihub setup.

3 Likes

This is a HomeKit limitation, not a Hubitat limitation.

4 Likes

And that is why you need another "connector" from the new hub.

I swear I was able to do more than 150 with Homebridge, but maybe not? If it's a HomeKit limitation then I guess there isn't much I can do by adding another hub or another bridge instance. I'll just use Groups and Scenes or Room Lighting to consolidate some things. Like I have multiple Wifi Outdoor Plugs for my landscape lighting outside. I can just make a single device in Hubitat for multiple plugs to get around this I guess.

1 Like

HomeBridge can create multiple "child bridges" to work around this limitation (among other reasons you may want to separate things) as of an update a few years ago:

If you had more than 149 or 150 devices, that is probably what you were doing.

3 Likes

Just wanted to add some help, as this took me a bit of searching to figure out how to format the config.json for multiple child bridges on a single Homebridge Hubitat MakerAPI plug-in. The Homebridge doc on Child Bridges does not explicitly explain how to add more than one child bridge to a single plugin.

These are all fake numbers, so there's no need to obviscate anything posted here.

EXAMPLE

"platforms": [
    {
        "platform": "Hubitat-MakerAPI",
        "name": "Hubitat",
        "app_url": "http://192.168.0.150/apps/api/1880/",
        "access_token": "41f83921-d728-3243-c3b4-d1cc6f32b195",
        "polling_seconds": 300,
        "temperature_unit": "C",
        "mode_switches": false,
        "hsm": false,
        "_bridge": {
            "username": "a3:63:79:27:f8:b2",
            "port": 42974
        }
    },
    {
        "platform": "Hubitat-MakerAPI",
        "name": "Hubitat",
        "app_url": "http://192.168.0.150/apps/api/1882/",
        "access_token": "2ef76g22-4df5-23c0-ec7a-1d9bc271bc4e",
        "polling_seconds": 300,
        "temperature_unit": "C",
        "mode_switches": false,
        "hsm": false,
        "_bridge": {
            "username": "a3:63:79:27:f8:b3",
            "port": 42975
        }
    }
]

Step 1:
If you're using the Homebridge UI, the initial child bridge is as simple as flipping a switch.

However this comes with a BIG Warning

As soon as I flipped on that child bridge switch, all of my devices added to Homebridge via MakerAPI disappeared from HomeKit and only the real HomeKit devices remained. The QR code of my Hubitat MakerAPI child bridge had to be added to HomeKit to bring my Hubitat devices back into HomeKit via Homebridge. This then forces you move your devices into rooms all over again. It's one time pain, but man was it painful moving 148 devices back into place again. You might be able to restore from a Controller for HomeKit backup, but that has been hit and miss for me in the past, so I didn't bother this time.

HomeKit automations will also disappear, but if you have Controller for HomeKit, those are preserved over there. Just need to re-add the trigger devices and HomeKit automations will all come back intact.

Step 2:
After you have the devices in your first child bridge back into their proper rooms, open the Homebridge config.json file (If you are using the Homebridge UI, this will be the JSON Config option)

Step 3:
Duplicate the platform entries as shown in the example above, but don't save it yet.

Step 4:
The "username" and "port" have to be unique between the two entries. I just incremented them by 1 on my Homebridge installation.

Step 5:
Add another MakerAPI instance to Hubitat with a unique name (i.e.  Homebridge 2)
and enter the unique API number and access token into the second child bridge entries of the config.json file.

Step 6:
Save the config.json and restart homebridge. You will now need to scan the QR code from the second child bridge to add it to HomeKit. It will display the same PIN as the first child bridge, but the QR code will be unique so HomeKit will allow you to add it as a new bridge.

Step 7:
Add your additional devices that were over the limit on the first child bridge, to the second Hubitat MakerAPI instance. This should give you 150 more devices you can add to HomeKit.

DISCLAIMER

I'm just sharing this to help someone out that might have been puzzled on how to acomplish this. I've no clue how HomeKit will perform as the numbers get much higher above the limit imposed by Apple, but I'm sure they had a reason for it. So far I'm not having a problem at 158 devices, but that's not far above the limit. I also have an Apple TV 4K 128GB with Wi-Fi & Ethernet (3rd Generation), and I'm running the latest Homebridge on a 2014 MacMini with 8GB and a 500 GB Samsung SSD, so that may be giving my an advantage that not everyone will get. :person_shrugging: All this to say, YMMV.

I'd be interested to hear how far others have pushed the HomeKit device limit, and what has been your experience with performance and reliability. Is it the same, or does it begin to suffer at a certain point over the limit?

3 Likes

I really appreciate you putting the work into investigating this! I did give it a try yesterday and it worked exactly like you described. I do prefer using the Apple home app simply because of its tight integration with the iPhone. There are some limitations where I have to flip and use my mobile optimized dashboard in the Hubitat app. Having a object where I can have a list of options I can scroll through, pick and execute is a big one. Now that I can get past this device limitation, I can probably just build virtual switches for each option. Button objects would be the other.

Presence is probably one of the biggest reasons I use it. Every third party app out there you always have to deal with the security question about sharing location in the background to Always Allow. Apple Home is definitely the easiest just tying presence to a virtual switch and never getting that nag message. I also use it for motion on my Arlo cameras using a momentary virtual switch due to a lack of Hubitat native integration for that platform. Looking back I do wish I had just bought cameras with RSTP support.