HomeKit framework capabilities regarding time based automations

Hello everyone,

I'm currently trying to use the HomeKit framework to create some time based automations. I read through the documentation and I'm still confused on how much I can do there.

What I want to achieve:
Create time based automations that changes some lights every 30 (or better 15) minutes. I don't want the user to have the app open or running all the time, so my idea was creating HomeKit automations for that. But that has the negative point that there will be 48 automations in the "Automation" tap of the apple home app. Also the user can change settings of those and my app would only notice next time the user opens it.

Has anyone created time based HomeKit triggers before and can point me into a direction how I can achieve this?

My workaround would be to use the API's of the respective Light Providers like Hue or Lifx, but then I would need to create a connector for each brand and I would really love to use Homekit.



Disclaimer: I'm very new to Swift & App Development
I’ve just started a project to monitor BLE sensors, which are not HomeKit compatible nor bridgeable, and trigger HomeKit accessory actions based on time of day and/or sensor state. Sensor updates will be every few minutes (configurable). My approach is to have a “SensorServer” app (SwiftUI) running on an always-on HomeKit compatible device (Apple TV or Mac) that sends HomeKit characteristic.write commands to HomeKit accessories (e.g. power outlet), based on time and sensor state. These “automation” definitions will be in some form of persistent storage, under the control of the SensorServer admin user.

You could perhaps use a similar approach and might not need persistent storage (I.e. database) if your automations are static and not numerous: you could hard code them in your app. The accessory statuses changed by your app will be promulgated to all users of the Apple Home app that are connected to your Home.

i hope this helps.

Regards,

Michaela
HomeKit framework capabilities regarding time based automations
 
 
Q