@@ -13,16 +13,6 @@ void my_accessory_identify(homekit_value_t _value) {
1313 printf ("accessory identify\n" );
1414}
1515
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-
2616// format: float; min 0, max 100, step 0.1, unit celsius
2717homekit_characteristic_t cha_temperature = HOMEKIT_CHARACTERISTIC_ (CURRENT_TEMPERATURE , 1 );
2818
@@ -45,6 +35,9 @@ homekit_accessory_t *accessories[] = {
4535 HOMEKIT_ACCESSORY (.id = 1 , .category = homekit_accessory_category_bridge , .services = (homekit_service_t * []) {
4636 // HAP section 8.17:
4737 // 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.
4841 HOMEKIT_SERVICE (ACCESSORY_INFORMATION , .characteristics = (homekit_characteristic_t * []) {
4942 HOMEKIT_CHARACTERISTIC (NAME , "Multiple Sensors" ),
5043 HOMEKIT_CHARACTERISTIC (MANUFACTURER , "Arduino HomeKit" ),
0 commit comments