(Perhaps I have not found the magic search phrase, so, apologies if this is well documented.)
BLUF: Is there any way to define automation rules in either Hubitat or HomeKit and have the other then get it through some sort of integration or 3rd party app? I really want to avoid dual maintenance.
I know I can do devices, I'm using lots of them. I am also using virtual switches to access devices from Hubitat that won't integrate from HomeKit (eg., a Matter door lock). I'm beginning to craft simple state machines using switches and rules. (Yes, I know Modes are something to explore, and I will.) But, I still have not figured out how to get rules authored in just one place to work in both Hubitat and HomeKit.
Am I am missing something fundamental that makes this possible?
I've been a software developer. I am now at risk of introducing complexity that could quickly get out of hand, exacerbated by dual maintenance. Authoring rules/automations in just one place is a significant step to manage scale and complexity. Using other concepts, like Modes, can, too. But, one thing at a time ... .
My searches for rules/automation integration from Hubitat to HomeKit bring up device integration pages ... and that's about it.
I'm not sure what you mean by rules integration, but by using virtual devices, you can have "rules" in HomeKit that trigger rules in Hubitat. I don't use HE rules (I use Node-RED) but I use a virtual device in HE (exposed to HomeKit), that is turned on by a HomeKit rule when my Ring door bell detects motion. This triggers devices in Hubitat to respond to events in HomeKit. Is that what you are trying to do?
Your post is unclear to me. What exactly are you asking for?
Do you want to create rules/automations on Hubitat and:
Edit them using Apple Home (or some other HomeKit app)? This is not possible.
Trigger Hubitat automations using Apple Home? This is possible; @rakeshg has suggested one way in this thread.
Something else?
Most users have their automations created using engines on Hubitat. It is also possible to use an external engine - once again, @rakeshg gave the example of Node-RED. You could also create your automations using Apple Home. The choice of engine is up to you. What you should not anticipate is that automations created using one engine will be editable by another.
This is how I understood the OP, i.e. share and even sync automations between Hubitat and Apple Home when edits are made in one system. I agree that isn’t possible.
I guess my uncertainty arises out of this sentence.
What dual maintenance? Most users confine themselves to a single platform for automation. While, for convenience, they may access devices on multiple platforms. Some users (a minority) send device data and metrics to other platforms for data visualization and analysis.
I appreciate the comments. Part of the confusion is due to my not yet having internalized enough to be really clear in how to think and then ask clear questions. So, again, thank you.
I think I now see the path forward. Use HE as the rules "engine", the place where all logic is captured. For user triggers, either existing device interaction suffices, or there will be a virtual device exposed on HomeKit (e.g., a switch). HE has all the logic responding to those triggers. No need for HomeKit automation development and maintenance.
The exception is with true one-off situations. My Matter door lock is not commissioned into HE. I need HomeKit automation to trigger a virtual switch exposed out of HE when an Apple Home user action closes the lock. But, that's the exception, not the norm.
I can think of some exceptions too, but it’s usually manageable.
For example, I could use the Home app’s built-in geofencing to trigger a Hubitat virtual switch, and that does require the creation of a Home app automation. Some people find the Home app’s geofence to trigger more reliably than the Hubitat mobile app’s.
My one attempt to get Hubitat Geofencing to work didn't. It kept thinking I was somewhere far away from where I was at the time (Android app). Some quick searches found others having this same problem. It was not (and still is not) a priority, so I've not chased this any further.
My wife does have an iPhone, so perhaps HomeKit enabled automation will be a good way to address this. I'll keep that in mind. Thanks.
Many users have found dedicated mobile apps for geofencing to work well. On Android, OwnTracks seems to be popular. On iOS, Locative, Geofency, and Apple Home have their proponents.