etwmc / Personal-HomeKit-HAP

This project will provide source code to build a HomeKit support accessories.
MIT License
235 stars 85 forks source link

Runtime adding accessories #13

Closed aliasdoc closed 9 years ago

aliasdoc commented 9 years ago

Hi,

With this approach, I think it's not allowing to add accessories in runtime, no ??

etwmc commented 9 years ago

The penalty on adding accessories on runtime could be larger than the crypto used in the project. But if you want, you can modify it, about 9 lines.

Wai Man Chan Sent from my iPad

On Nov 24, 2014, at 01:42, OUJABER Mohamed notifications@github.com wrote:

Hi,

With this approach, I think it's not allowing to add accessories in runtime, no ??

— Reply to this email directly or view it on GitHub.

aliasdoc commented 9 years ago

Hi @etwmc , thanks for your reply, I'm trying to rewrite all using your code with base, I would like to be able to add accessory in runtime because I use it with another RF24 bridge, maybe using one server per accessory is a good way like https://github.com/KhaosT/HAP-NodeJS, when I clean my code, I post it.

etwmc commented 9 years ago

Actually, if it is physically 1 connection in the network (that mean, only one box/bridge/computer will connect to the network, while also connect to multiple appliances itself), you are supposed to use bridge (multiple accessories, one instance) instead of multiple server:

  1. Apple define "bridge" this way
  2. You only need to pair once, and all your appliances will be seen as separate accessories
  3. It reduce the overhead of multiple server (multiple server->multiple socket/thread set/key store/stack, with need for multitask)
  4. You only need to set a value in the bonjour TXT records to notify the change.
etwmc commented 9 years ago

I just pushed a dynamic version in the Dynamic fork.

aliasdoc commented 9 years ago

Hi @etwmc, I just noticed, thanks, can you share some documentation about protocol ?? I'd like to implement controller notification and some other stuff but I don't find any doc about HomeKit Protocol, thanks.

etwmc commented 9 years ago

I believe any publication on is qualify as violation of dcma. (Last time someone post that it got pull down) Just give me the functions you want. I will wrap this project up before Christmas.

On Nov 26, 2014, at 21:36, OUJABER Mohamed notifications@github.com wrote:

Hi @etwmc https://github.com/etwmc, I just noticed, thanks, can you share some documentation about protocol ?? my mail: m.oujaber@gmail.com mailto:m.oujaber@gmail.com, I'd like to implement controller notification and some other stuff but I don't find any doc about HomeKit Protocol, thanks.

— Reply to this email directly or view it on GitHub https://github.com/etwmc/PersonalHomeKit/issues/13#issuecomment-64604721.

aliasdoc commented 9 years ago

Thanks for your reply, primarily I need controller notification and scenes, thanks for your help