0
  1. What are the things needed to send the files to HomeKit accessory using HomeKit services? from accessory design perspective and from iOS perspective.
  2. Is HomeKit allow to send files like images or xml data from iOS application?
RohitK
  • 1,444
  • 1
  • 14
  • 37
  • HomeKit is for the control of devices ina home such as lights, locks, fans, garage doors etc - essentially things with either a binary state (on/off) or limited states (brightness, colours). There is no file transfer ability. HomeKit uses wifi and Bluetooth to connect to devices so you could use the same connection technology to transfer files to a device but it is outside the scope of the HomeKit framework – Paulw11 Oct 01 '15 at 12:45

3 Answers3

1

HomeKit allows you to create a custom characteristic that can take various different formats. You can use the "Data" format, making the characteristic be "Write" or "Read" and send the information (image) you need in whatever direction to the device or the app. As Adam Shiemke was saying, you might want to define a protocol on that characteristic, i.e. in case you want to send additional data like a name and an image.

Maria
  • 4,471
  • 1
  • 25
  • 26
0

As far as I know we can't send the file to HomeKit accessory using home kit. I have search for sending images to accessory but not possible. I didn't ding any methods related to it.

SRI
  • 1,514
  • 21
  • 39
0

It's sorta possible, but there is almost certainly a better way. The structure of homekit mirrors bluetooth LE, so there are accessories which contain services which contain characteristics. Characteristics are source or syncs for data (or both). With homekit, there is some structure to how the data can be formatted, but there is also the option to have unstructured data transfer to/from a characteristic.

So you can write whatever data you want, but you'll have to define the data transfer protocol. And it'll be fairly slow since everything is encrypted. If you're transferring over BLE, there are limits on how much data can be written at a time as well (limitations of BLE protocol), so you need to chunk things or rely on the OS to do the chunking for you, which could lead to out-of-order transfer (in theory, not sure how HK would interact with this).

Adam Shiemke
  • 3,734
  • 2
  • 22
  • 23
  • Why do you say: "it'll be fairly slow since everything is encrypted"? – zaph Oct 22 '15 at 00:17
  • 1
    Homekit uses a fairly sophisticated encryption scheme, and it's usually talking to low-power cheap micros on the accessory side, so all the overhead tends to slow things down. If your accessory is running on PC-class hardware, you probably won't notice, but I don't think anyone is doing that. – Adam Shiemke Oct 22 '15 at 18:46