Questions tagged [ios-homekit]

53 questions
8
votes
0 answers

HomeKit: "Thread left active" log in xcode console

In my app, I have added a HomeKit-enabled accessory to my home object. It's a lightbulb that I'm able to successfully turn on/off from the app. However, every time I switch it on/off I get these logs in the Xcode console: 2020-06-02…
alexisSchreier
  • 677
  • 1
  • 5
  • 21
6
votes
0 answers

Get all Home Hubs available in HomeKit(in iOS 10)

I'm work on HomeKit App and my requirement is to get Home Hubs available in HomeKit(in iOS 10) and there respective states i.e., "connected" or "not connected". I searched in homekit FrameWork but, i didn't find any help Thank you.
datha
  • 359
  • 2
  • 14
5
votes
1 answer

Know Admin from HMUsers array

I have an issue that When I want to add the room to the Home incase if the user is Guest then I am getting HMErrorCodeInsufficientPrivileges error. I have a view which will display after click on the button named "Add Room", My intensin is I want to…
SRI
  • 1,514
  • 21
  • 39
5
votes
1 answer

How to integrate arduino board with apple home kit, Is it possible or not ?

I want to make my own ios app with homekit, which should control arduino, i have studied about homekit and i have doubt that whether it is possible to integrate arduino or raspberry PI with home kit or not ? any useful links ?
4
votes
0 answers

Instantiating HMHomeManager causes a background thread error

I have a fresh iOS app / project; all I've done is import the HomeKit framework. When I instantiate HMHomeManager: var homeManager = HMHomeManager() Xcode yells at me: Main Thread Checker: UI API called on a background thread: -[UIApplication…
Dan
  • 4,197
  • 6
  • 34
  • 52
4
votes
1 answer

Display power usage as temperature with Node-Red in Apple HomeKit

I would like to display the power usage in HomeKit. Unfortunately there is no category to do that in HomeKit. That's why I had the idea to display this not as a power usage but as temperature in HomeKit. The idea is to control HomeKit scenes with…
4
votes
3 answers

HomeKit: Check for permission

I have an iOS application using HomeKit and I need to check if application can access HomeKit Store. As I noticed, homeManagerDidUpdateHomes will be called anyway. How do I check for HomeKit store permission?
Nikita Zernov
  • 5,465
  • 6
  • 39
  • 70
3
votes
0 answers

How to Add and Set up accessory using HMAccessoryPayLoad

I want to know how to use apple docs func addAndSetupAccessories(with payload: HMAccessorySetupPayload, completionHandler completion: @escaping ([HMAccessory]?, Error?) -> Void) I want to use this func because I need to pair HomeKit…
Pavan Kumar
  • 63
  • 1
  • 6
3
votes
1 answer

Know when view presented using addAndSetupAccessoriesWithCompletionHandler

From iOS 10 onwards apple have introduced the addAndSetupAccessoriesWithCompletionHandler method to add the HMAccessories to the home. In this method ^(NSError *error block is executing when we successfully add/cancel the accessory setup. But my…
SRI
  • 1,514
  • 21
  • 39
3
votes
1 answer

Understanding Homekit as a Developer

When I first heard about Homekit in 2014 when introduced by Apple I thought this was a feature only for device manufacturers who would be allow to embed the Homekit in their devices but I think I'm missing something here form the programmers point…
fs_tigre
  • 10,650
  • 13
  • 73
  • 146
3
votes
1 answer

HMLocationEvent Sample

I am implementing HMLocatinEvent in my HMHome. I am trying the below code but one thing I didn't get is I don't know how to execute functionality like incase if I left home have to switch off all the lights. I didn't find any method related to the…
SRI
  • 1,514
  • 21
  • 39
2
votes
0 answers

Is it possible to set the brighness of a light from a variable in Apple HomeKit

I want to create a wake up light with Apple HomeKit Automations that gradually increases the brightness of an Apple HomeKit controlled lightbulb. A simple while-loop as written in a following pseudo code should do the trick: /* This automation is…
Kasperi Koski
  • 55
  • 1
  • 5
2
votes
3 answers

How to add HomeKit accessory using HMAccessoryPayLoad?

Hello currently I'm working on HomeKit, I want achieve one feature using HomeKit. My requirement is without using QR code I want to add accessory. As every accessory has it's own URL like e.g. X-HM://XXXXXXXXX associated with QR code, i.e.…
Shrikant K
  • 1,988
  • 2
  • 23
  • 34
2
votes
1 answer

(Swift) iOS application crashes before asking for HomeKit Access

In my iOS application, when I delete the app off of my phone and rebuild it, when I launch it the app crashes from trying to access the HMHomeManager variables I have set up, and THEN asks for permission for HomeKit access. Is there anything I can…
Jolaroux
  • 361
  • 1
  • 5
  • 15
2
votes
1 answer

How to send notification from Accessory to iOS device using HomeKit framework

Is their any way to send notification from Accessory to iOS application using HomeKit API. Like storing device id on Accessory and sending notification to that device?
RohitK
  • 1,444
  • 1
  • 14
  • 37
1
2 3 4