Control HomeKit accessory with app in background

I understand that this is currently not possible, and that there are good reasons for this limitation. See here: https://forums.developer.apple.com/thread/22279


My question is: Is there any possible route to getting a background HomeKit entitlement for my app? Are there any forms I can fill out, any fingerprints or DNA I can submit, or whatever?


I've been working on an app for months now and I can't get much farther without being able to use background control of accessories. Why? Picture a scenario where the app is controlling a window. (This is not my exact application but close enough for illustration.) The app checks for local weather during the night and at 2AM it detects rain in the forecast. Time to close the window, but right now I can't do that without waking up the user with a notification. Then the user has to bring my app forward. The app can do the rest from there. I'm quite sure the user would prefer for the app to just shut the darn window!


Any hope?


I just spoke to Developer Relations at (800) 633 2152. They suggested a fresh post in this forum, so here I am. Speaking with DTS requires paying the developer's fee, but I'm reluctant to do that if I don't have a path forward for my app. I may have to pay to find out but I'm hoping I can get an answer here first.

I won't buy it even if you made it successfully to have the app run indefinitely in the backgroud. Not only because it will drain the darn battery dry but most importantly, even your idea is a good one, the implementation just doesn't make sense. Just ask yourself these questions - what if I am not at home and is out of town? Would I want my iPhone's battery keep draining like this? Why do I have to have the app running in the background if I can have it running in the foreground forever? Why suddenly my iPhone has become a (super expensive) remote control?


May be you should take a better look again at this https://support.apple.com/en-us/HT207057


//Ed

Battery usage is a minor concern. The app only needs to to do something every half hour or so. It uses very little power or data. Enabling background HomeKit would slightly increase the usage, but it's really not an issue. The iOS does a good job of managing the power and resources available to backgrounded apps.


"what if I am not at home and is out of town?"

So what? That's what HomeKit is all about, being able to control functions in your home from anywhere. If my windows are left open when I leave the house, it's be nice to close them if rain is coming! (As in my simplified example above).


"Why do I have to have the app running in the background if I can have it running in the foreground forever?"

You don't have to, but most users would want to set it and forget it. The app works perfectly in the foreground, but most users won't want to tie up their phone "forever" with my app running in the foreground with the screen lit all day and night. That would be an absurd drain on the battery. The app needs to function in the background to achieve hands-free automation 24/7.


"Why suddenly my iPhone has become a (super expensive) remote control?"

Again, that's pretty much the idea of HomeKit, to allow you to use your iPhone to remotely control items in your home. If you don't like HomeKit, you're free to not use it.


"May be you should take a better look again at this https://support.apple.com/en-us/HT207057"

From that document: "With the Home app, you can set up a home hub to control your HomeKit accessories remotely, grant access to the people you trust, and automate your accessories to do what you want, when you want."


That's a lie to some degree, since I most certainly can NOT automate my "accessories to do what you want, when you want", if I am limited to the meager programming available with each accesory and cannot write apps to do more. That limitation ignores a wide range of possibilities for HomeKit that is enjoyed by the other IoT competitors.

>Speaking with DTS <clip> may have to pay to find out but I'm hoping I can get an answer here first.


DTS will only try to help w/code level issues, where you have a project demonstrating your problem, not with pre-reviews or app planning, etc.


It sounds tho like you don't have a paid dev account (which is why dev support got rid of you by dumping you here), in which case you're well outside the support area(s) you're trying to make use of, so...


As for your question, I think you've answered it when stating "I understand that this is currently not possible".


Your best hope is to file a feature request w/your use case via bug reporter, but full use of that service may also require being a registered dev.


Good luck.

Control HomeKit accessory with app in background
 
 
Q