Skip to content

Commit

Permalink
Add support HomeKit doorbells
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Sep 2, 2023
1 parent d724df7 commit 08dabc7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion internal/homekit/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
5 changes: 3 additions & 2 deletions pkg/hap/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ const (
StatusPaired = "0"
StatusNotPaired = "1"

CategoryBridge = "2"
CategoryCamera = "17"
CategoryBridge = "2"
CategoryCamera = "17"
CategoryDoorbell = "18"

StateM1 = 1
StateM2 = 2
Expand Down

0 comments on commit 08dabc7

Please sign in to comment.