I just came across this, not sure how long it’s been possible, but I didn't find it mentioned elsewhere:
Homekit automations can trigger KM Macros! this was a serious missing link for me.
(I’ve seen Type to Siri, for activating Homekit actions. This is the other direction - making devices in your home trigger new actions - of greater capabilities than Apple’s standard issue)
I was frustrated when first exploring homekit automation that they couldn’t fire off an applescript. Mostly they invoke a homekit “scene”. From the Home app, they can also trigger a limited subset of “siri shortcuts”. BUT, crucially one of the few allowed actions is:
And that URL can be… (drum roll) the URL of a KM macro. not the "kmtrigger://macro" style, but the URL for triggering the macro via the web server on your mac. The URL is being accessed by a homekit “hub” device such as a homepod, or appletv. So it can see your mac on the local network. I used a local macro URL, but you could also use the external macro URL (RIP Peter’s servers…).
So by having the automation get this local address:
http://192.168.2.7:4490/action.html?macro=4BDAC38F-41D6-4F35-8014-7FD0717F1118
I now get this:
I first learned of ‘Get URL’ in homekit from the app, Pushkit. which does about the same thing - accepts a homekit trigger URL on their server, which then can re-direct to fully capable shortcuts.
Are we approaching the KM-Homekit-Singularity?