Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
etwmc committed Jun 18, 2015
2 parents 49ff5cf + 55cff70 commit d5b0723
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Example Accessory Configuration/Fan+Light.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ void initAccessorySet() {
boolCharacteristics *fanPower = new boolCharacteristics(charType_on, premission_read|premission_write);
fanPower->setValue("true");
fan->addCharacteristics(fanService, fanPower);
};
};
56 changes: 37 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,43 @@
#PersonalHomeKit
This is a dymanic version (runtime add/remove accessories/services). For static version(MCU version), switch to the static branch
Now support multiple characteristic, notify function
---------------
Reset
In iOS 9.0 Beta 1, Apple has implemented the check of status flag: a integer display where an accessory should be discoverable. And for any accessory that has paired, the flag should be 0.
Therefore, there is a way to reset the pair record in since this version:
By adding any argument while launching the program, the program will clear all the previous record of pairing, before start to launch the service.
e.g. ./PHK abcdefg
This argument might be changed in the future, so if you want to deploy for the future, consider using "PHK reset" as the command.

(
However, as it has not been implemented in iOS 8.3 or before, after any reset, iOS devices before iOS 9 will still attempt to connect, which will failed for obvious reason.
In that case, a manual removal of the accessory on the iOS end is required.
)



===============

This is a spin-off project from my attempt to build a Siri controlled night light, and it will provide source code to build a HomeKit support accessories.


1. Publish the device as a HomeKit
2. Allow the controller (iOS device) to pair with the accessory
3. Allow the controller connect with the accessory after pair
4. Record the paired controllers UUID and public keys
5. Provide the controller the service about the accessory
6. Allow controller to update value
7. Notify controller about value updated

Current Requirment:
1. OpenSSL
2. Avahi (For Linux)

Future Plan:
1. Support microcontroller



===============
Dear Lawyer of Apple, <br>
If you want me to pull down the code, just send me an email. (No phone call, I don't pick up unknown number. ) I'm a reasonable kid, and I like Apple, so no need for DMCA, just talk to me, we can make a deal.
Expand Down Expand Up @@ -37,22 +74,3 @@ To create your own service, please reference to the Accessory.cpp. You can add c
<br>
4. Then, make and enjoy.
<br>
===============

This is a spin-off project from my attempt to build a Siri controlled night light, and it will provide source code to build a HomeKit support accessories.


1. Publish the device as a HomeKit
2. Allow the controller (iOS device) to pair with the accessory
3. Allow the controller connect with the accessory after pair
4. Record the paired controllers UUID and public keys
5. Provide the controller the service about the accessory
6. Allow controller to update value

Current Requirment:
1. OpenSSL
2. Avahi (For Linux)

Future Plan:
1. Support microcontroller
2. Notify controller about value updated

0 comments on commit d5b0723

Please sign in to comment.