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?
1 Answers
Not entirely sure what kind of information you want to send to your iOS device, it might be related to making an HMAccessory HomeKit compatible (MFI documentation).
But if it's about getting the device (HMAccessory) id, then you can always read the HMCharacteristic values of the (paired) accessory. Exemplifying with a simple example: let's say you have a HK enabled thermostat (one of many Apple defined services). You can get the serial number of that thermostat using the 'Serial number (public.hap.characteristic.serial-number).
I used the sample code posted here: http://techtician.raeidsaqur.com/post/130818306411/homekit-getting-serial-number-from-a-hmaccessory
However, if you are asking about generating notifications from HMAccessory, then it's a MFI (device) side question I'm afraid.

- 2,173
- 1
- 21
- 12