brutella / hc

hc is a lightweight framework to develop HomeKit accessories in Go.
Apache License 2.0
1.74k stars 189 forks source link

Detect accessory name change #169

Closed travishaagen closed 4 years ago

travishaagen commented 4 years ago

Is it possible to detect an accessory name change from an iOS device? I tried the following, but it doesn't appear to work:

                acc := accessory.New(
                    accessory.Info{
                        Name:         "Initial Name",
                        ID:           uint64(123),
                    }, accessory.TypeSensor)
                acc.Info.Name.Perms = characteristic.PermsAll()
                acc.Info.Name.OnValueRemoteUpdate(func(newName string) {
                    fmt.Printf("OnValueRemoteUpdate name => %s\n", newName)
                })
brutella commented 4 years ago

The name characteristic is readonly. HomeKit doesn't send name changes back to the accessory.