@@ -13,16 +13,6 @@ void my_accessory_identify(homekit_value_t _value) {
13
13
printf ("accessory identify\n" );
14
14
}
15
15
16
- /*
17
- * This example includes 5 sensors:
18
- * 1. Temperature Sensor (HAP section 8.41)
19
- * 2. Humidity Sensor (HAP section 8.20)
20
- * 3. Light Sensor (HAP section 8.24)
21
- * 4. Contact Sensor (HAP section 8.9)
22
- * 5. Motion Sensor (HAP section 8.28)
23
- * 6. Occupancy Sensor (HAP section 8.29)
24
- */
25
-
26
16
// format: float; min 0, max 100, step 0.1, unit celsius
27
17
homekit_characteristic_t cha_temperature = HOMEKIT_CHARACTERISTIC_ (CURRENT_TEMPERATURE , 1 );
28
18
@@ -45,6 +35,9 @@ homekit_accessory_t *accessories[] = {
45
35
HOMEKIT_ACCESSORY (.id = 1 , .category = homekit_accessory_category_bridge , .services = (homekit_service_t * []) {
46
36
// HAP section 8.17:
47
37
// For a bridge accessory, only the primary HAP accessory object must contain this(INFORMATION) service.
38
+ // But in my test,
39
+ // the bridged accessories must contain an INFORMATION service,
40
+ // otherwise the HomeKit will reject to pair.
48
41
HOMEKIT_SERVICE (ACCESSORY_INFORMATION , .characteristics = (homekit_characteristic_t * []) {
49
42
HOMEKIT_CHARACTERISTIC (NAME , "Multiple Sensors" ),
50
43
HOMEKIT_CHARACTERISTIC (MANUFACTURER , "Arduino HomeKit" ),
0 commit comments