-
Notifications
You must be signed in to change notification settings - Fork 42
HomeKit Accessory Testing Guide
This describes how to report a working HomeKit Accessory.
Important Please inform yourself how to reset the HomeKit Accessory under test to factory settings just in case anything goes wrong with the testing.
Documentation for the discover command
The first step is to check whether the accessory can be discovered:
python3 -m homekit.discoverTry to identify the block that corresponds to your accessory under test and attach the lines. This should look like this:
Name: Testsensor1._hap._tcp.local.
Url: http_impl://192.168.178.219:5556
Configuration number (c#): 1
Feature Flags (ff): Paired (Flag: 0)
Device ID (id): ED:DF:7E:2E:E4:69
Model Name (md): MyBreadBoardSensor
Protocol Version (pv): 1.0
State Number (s#): 1
Status Flags (sf): 1
Category Identifier (ci): Sensor (Id: 10)
Note down the Device ID for further steps.
Documentation for the identify command
This step is optional since no output should be provided. Take a short note if the accessory under test reacts to the call as it does with the iOS app.
python3 -m homekit.identitfy -d ${Device ID} Documentation for the init_controller_storage command
Use this command to create a new storage for the controller's data. Currently this is basically a file containing an empty JSON hash ({}).
Documentation for the pair command
The next step is to pair the accessory under test. Execute this command:
python3 -m homekit.pair -d ${Device ID} -p ${Device Setup Code} -f test_report.json -a deviceUnderTestThe output should be:
Pairing for deviceUnderTest was established.
Documentation for the identitfy command
This step is optional since no output should be provided. Take a short note if the accessory under test reacts to the call as it does with the iOS app.
python3 -m homekit.identitfy -f test_report.json -a deviceUnderTestDocumentation for the get_accessories command
This step checks for the ability on how to read out the available accessories.
python3 -m homekit.get_accessories -f test_report.json -a deviceUnderTestThe example below is from a slightly patched firmware build from the demos of maximkulkin/esp-homekit. Your output should look similar:
1.1: >accessory-information<
1.2: Testsensor1 (Name) >name< [pr]
1.3: JL (Manufacturer) >manufacturer< [pr]
1.4: 0012347 (Serial Number) >serial-number< [pr]
1.5: MyBreadBoardSensor (Model) >model< [pr]
1.6: 0.1 (Firmware Revision) >firmware.revision< [pr]
1.7: (Identify) >identify< [pw]
1.8: >temperature<
1.9: Temperature Sensor (Name) >name< [pr]
1.10: 30.1000003814697 (Current Temperature) >temperature.current< [pr,ev]
1.11: >humidity<
1.12: Humidity Sensor (Name) >name< [pr]
1.13: 28.7999992370605 (Current Relative Humidity) >relative-humidity.current< [pr,ev]