Add support HomeKit doorbells

This commit is contained in:
Alexey Khit
2023-09-02 20:34:39 +03:00
parent d724df7db2
commit 08dabc7331
2 changed files with 5 additions and 3 deletions

View File

@@ -71,7 +71,8 @@ func discovery() ([]*api.Source, error) {
err := mdns.Discovery(mdns.ServiceHAP, func(entry *mdns.ServiceEntry) bool {
log.Trace().Msgf("[homekit] mdns=%s", entry)
if entry.Complete() && entry.Info[hap.TXTCategory] == hap.CategoryCamera {
category := entry.Info[hap.TXTCategory]
if entry.Complete() && (category == hap.CategoryCamera || category == hap.CategoryDoorbell) {
source := &api.Source{
Name: entry.Name,
Info: entry.Info[hap.TXTModel],

View File

@@ -31,8 +31,9 @@ const (
StatusPaired = "0"
StatusNotPaired = "1"
CategoryBridge = "2"
CategoryCamera = "17"
CategoryBridge = "2"
CategoryCamera = "17"
CategoryDoorbell = "18"
StateM1 = 1
StateM2 = 2