A developer challenge - Open up IP to everything

OK, the category is intentionally misleading. My apologies, but I want the brilliant developers in this community to take this challenge seriously.

With the fresh announcement of Z-Wave Long Range development for HE, the hub now supports simple connection and device sharing with Hub Mesh, simple Z-Wave device inclusion with SmartStart, and continued support for Classic Z-Wave Mesh.

Nearly any Zigbee device works on HE and more are being added every day. Hue Bridges integrate easily for great lighting options. Lutron Smart Bridge Pro gives us local control and unsurpassed Pico support. Plus there are community integrations to hubs like Insteon, Ring, and even HE > HA. But we’re still missing a piece to the puzzle that could be as easy to implement as the other integrations. We NEED HomeKit Controller like HA has!

This isn't HomeKit to Homebridge, this is HomeKit devices into Hubitat. It's doable and it would be easy for EVERYONE to use, not just those that decide they're good with running a broker and learning to setup MQTT or Node-Red. Its simplicity would bring even more HE users and it would cover a lot of use cases in one fell swoop. No one would need to have iOS or Mac devices to use it, and I can think of very few devices or hubs that cannot be integrated directly and locally into Hubitat by simply entering an 8 digit code. Even when those hubs and devices don't natively support HomeKit.

Xiaomi fans could bring those inexpensive and nicely designed devices directly into HE, while still maintaining connection stability for around $20 USD by simply adding the Mijia Multimode Gateway that is HomeKit compatible, has support for Zigbee 3.0, Bluetooth mesh and up to 128 end devices. Or the new Aqara M2 or M1S with Zigbee 3.0, Bluetooth mesh, Ethernet and support for up to 128 end devices.

There's no need for a device to be HomeKit native. If it is, great. It's state and parameters would instantly come into HE when added to such an integration, just as they are by using HomeKit Controller for HA. If a hub cannot support HomeKit on its own, but can share its devices with Homebridge or Hoobs, then it could share them with HE too. Just enter the 8 digit code from Homebridge or Hoobs, and all the devices and their states would appear in HE for local control and automation. No need for an Apple hub or device.

Please consider this. I'm here to test, root you on and promote your stable integrations, but as I've stated before, I cannot program my way out of paper bag. We need your help!

6 Likes

:clap: :raised_hands:
This would be amazing!

1 Like

Right!? Why should only HA users have this?

2 Likes

I already use homekit controller in HA for local control of Ecobee and a few other "things", so having it in Hubitat is of limited use to me at this point.

That said, the fact I use homekit controller in HA reinforces your point that this is a use case that people would use if it were available in Hubitat...

11 Likes

I don't know much about Homekit Controller, but I looked some at aiohomekit, and it seems really tightly coupled to zeroconf (aka mDNS) for discovery. Is there a way of using it without mDNS?

Every post requesting mDNS support on Hubitat has been either "maybe someday" (paraphrasing) or just not answered. So, my impression is that doing mDNS natively (and therefore Homekit Controller itself natively) on Hubitat isn't going to be possible without some external system like a RPi. In which case maybe you should just run HA on the RPi.

3 Likes

Thanks, that's good info. HE does support SSDP, but I have no clue if that's an option for something like this. If it's not possible, then you are correct, HA on a computer (which I have running) or RPi combined with a yet to be developed, but apparently possible HA > HE integration would be the answer to that issue.

To be clear, I would for sure benefit from a HomeKit Controller integration on HE, but it would be an addition to my setup, not my primary means of getting HomeKit enabled stuff or Homebridge into my hub. I'm an iOS and Mac user, so I use an AppleTV and HomeKit automations since I benefit from the iCloud remote connection and one of my Yale door locks is HomeKit enabled (because why not? :man_shrugging: It's close to the Apple TV and it was a good price). And that's not ideal either. There are limits. No variable sensor data. No control over bulb dimming or color from HE.

This ask is for the Hubitat community as a whole. I've been here since Feb of 2018 and on ST before that. In that time and continuing more and more with new users are the requests for devices that don't have HE direct support yet, but I know there's support through HomeKit, or there are plugins for Homebridge/Hoobs which will get them into Homebridge or Hoobs, and thus HomeKit Controller for direct device control and status in HA. I hope it's not a pipe dream, but as you point out, it can be done using HA as the bridge. Just would like to see something less involved than also configuring MQTT or Node-Red to connect the two in the HA > HE direction.

1 Like

I'm having a tough time wrapping my head around MQTT, but this looks like it's a less demanding path from HomeKit Accessory Protocol into HE. The broker requirement and the overall user unfriendliness of MQTT are the hurdles that makes it less approachable.

https://developer.aliyun.com/mirror/npm/package/mqtt2homekit

How ?

Or does this assume HomeKit Controller emulation running on HE

Yes. Would need HAP on HE

Can you control homekit devices from both HA and Apple Home at the same time?

I have not messed with HA yet so don't know the capabilities.. and am kinda confused by HomeKit Controller vs Homekit Integration (ala Homebridge).

Think of HomeKit controller as converting Home Assistant into a HomeKit hub.

I don't know if a HomeKit device can be "paired" to two HomeKit hubs. I don't see why not though.

1 Like

Yes and no. HomeKit Controller uses the HomeKit Accessory Protocol. It allows you to join HomeKit compatible devices to it so you can get control and status of them. Similar to how an Apple TV 4, iPad, or HomePod acts in a HomeKit environment. Allowing you to view the current state of a device and control it. The one key difference to Apple product is that it can give you remote access through iCloud and they also contain a Bluetooth LE radio so they can connect Bluetooth enabled HomeKit devices to HomeKit as well.

HA’s HomeKit Controller cannot bring in Bluetooth LE HomeKit devices, and it cannot communicate with iCloud for remote access via the Apple Home app

Homebridge and Hoobs allow devices that are not HomeKit enabled to be added to a controller through HAP. For example you cannot add a device that is already HomeKit capable to Homebridge or Hoobs.

But, let’s look at the example of HA and the HomeKit Controller integration, where any device that is HomeKit capable already can be joined via HAP and will show up in HA the same as any other device joined to it. And it can also run the HomeKit plug-in at the same time. Exposing it to a real HomeKit Hub like an Apple TV 4 for example.

Since Homebridge and Hoobs publish themselves and all the devices added to them as if each device is HomeKit compatible, adding them to a HomeKit Controller (HAP) make all those devices appear in HA as native devices with status and controllable.

So take HA out of the picture and imagine HE has a HAP integration of its own, where any device, gateway, or application (like Xiaomi Aqara, or Insteon, or OpenHab, or HA, or even Homebridge) that can join a HomeKit Controller would make its devices available in HE to use in rules and control.

1 Like

Thanks for the info @aaiyar and @SmartHomePrimer!!!

So if you have the HK devices in HA then you would need something like HOOBs to expose them to an Apple Hub.. cool that was inline with what I was thinking.

In terms of multiple hubs - this article says sort of - that one is always the primary and the others are standby if needed to take over.

No, it’s a little different there. They have their own version of HomeKit (apart from the HomeKit Controller integration). It’s similar to Homebridge in that it exposes non HomeKit native devices to a HomeKit Controller, but only those that are devices in HA. It doesn’t have the same plug-in architecture because they don’t need that.

But in the case of HE, we already have the capability to get devices that are in HE out to a HomeKit hub. What we’re missing is the ability to bring any actual or emulated HomeKit device into HE.

If we had the HAP Integration on HE there would be essentially no device that we couldn’t bring into HE and use rule machine and all the apps and integrations that we have and enjoy in HE, together with them. For many that don’t care about Apple or the Home app, that would be enough. For those that did want to also use the Home app, well that would be as simple as adding the Homebridge app to HE as well.

So why not just use HA? Personally, I think it’s really unpleasant to use and it’s not at all as easy to create automations in my view. It also doesn’t have the 700 series Z-Wave radios that are available on HE, and it will not have Z-Wave LR for the foreseeable future. Open Z-Wave cannot support it today, and I have not read anything that suggested that they will be able to either.

Someone can correct me if I’m wrong, but I also don’t know of anything like Hub Mesh on HA, which for HE users is just the most incredible and easiest to deploy integration between two hubs I’ve ever seen before. Most of us know that some devices just do not work well with other devices on the same hub, but separated they’re great. So being able to very easily distribute devices among multiple hubs, yet connect them together as if they were part of the same hub, so effortlessly is a huge advantage

1 Like

“ You can have more than one home hub in a Home which provides redundancy in case one goes offline”

This part wouldn’t be possible. They have their automations and device configurations synced to iCloud. That’s how they offer redundancy. Their automations are simplistic enough to pull that off. HE would need the entire platform running in the cloud and local. That’s what SmartThings is without the local. We’re here because that’s unreliable, not private, etc, etc.

1 Like

It's not that bad once you actually get in to it.

mqtt2homekit may have some promise if I understand it correctly. I think you could run it all on the same RPi. You need to install and run these:

MQTT broker
Node.js
mqtt2homekit
hap-client-tool

Then the new thing to write would be a driver for HE that subscribes to all of the same MQTT topics and which translates their traffic to attributes and events on the HE side.

I'd bet you could parse the same mapping file from mqtt2homekit to programmatically determine which MQTT topics need to be subscribed to by the HE driver.

It's still not native to HE (that would be a big leap), but it also isn't running HA and having to connect it and HE together.

2 Likes

Because I was curious was looking at what it would take to implement a HAP server solution on HE - short answer is it would be ... difficult.

Building something like this would require some decent Apple dev knowledge and skills and a chunk of time + no guarantee you could actually get it to work in HE directly depending on what libs you might need and if they are available to use in HE's Groovy implementation. Heck we have yet to implement a secure email client in HE because of this limitation.

A more feasible approach would be figuring out the best way to streamline a connection to a separate server where this is already done like mqtt2homekit or HA.

It's a very cool idea though.. thanks for the links/info.

4 Likes

The issue (and the reason for this HK controller request) is that Apple’s system is closed and once aHomeKit device is paired into it you can’t generally control it from anything else or get its current status or triggers from it into other systems. You have to create virtual devices/rules per device within HK as a workaround.

2 Likes

Learned something new - I didn’t know that!