Closed lukasa1993 closed 3 years ago
edited button sample with
homekit_accessory_t *accessories[] = {
HOMEKIT_ACCESSORY(
.id=1,
.category=homekit_accessory_category_video_door_bell,
.services=(homekit_service_t*[]) {
HOMEKIT_SERVICE(
ACCESSORY_INFORMATION,
.characteristics=(homekit_characteristic_t*[]) {
HOMEKIT_CHARACTERISTIC(NAME, "Bell"),
HOMEKIT_CHARACTERISTIC(MANUFACTURER, "HaPK"),
HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, "0012345"),
HOMEKIT_CHARACTERISTIC(MODEL, "MyBell"),
HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, "0.1"),
HOMEKIT_CHARACTERISTIC(IDENTIFY, button_identify),
NULL
},
),
HOMEKIT_SERVICE(
DOORBELL,
.primary=true,
.characteristics=(homekit_characteristic_t*[]) {
HOMEKIT_CHARACTERISTIC(NAME, "Button"),
&button_event,
NULL
},
),
NULL
},
),
NULL
};
this it seems to work but funny thing is that HomeKit app on iOS14 on iPhone crashes when i try to open settings for this accessory
homekit_accessory_t *accessories[] = {
HOMEKIT_ACCESSORY(
.id=1,
.category=homekit_accessory_category_programmable_switch,
.services=(homekit_service_t*[]) {
HOMEKIT_SERVICE(
ACCESSORY_INFORMATION,
.characteristics=(homekit_characteristic_t*[]) {
HOMEKIT_CHARACTERISTIC(NAME, "Bell"),
HOMEKIT_CHARACTERISTIC(MANUFACTURER, "HaPK"),
HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, "0012345"),
HOMEKIT_CHARACTERISTIC(MODEL, "MyBell"),
HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, "0.1"),
HOMEKIT_CHARACTERISTIC(IDENTIFY, button_identify),
NULL
},
),
HOMEKIT_SERVICE(
DOORBELL,
.primary=true,
.characteristics=(homekit_characteristic_t*[]) {
HOMEKIT_CHARACTERISTIC(NAME, "Button"),
&button_event,
NULL
},
),
NULL
},
),
NULL
};
this works and app doesn't crash on iOS 14, only thing remains it always says not responding so probably need to return status somehow
is there a way to make just a doorbell without video ? so i get notified if somebody clicks button ?