Closed pyxiscloud closed 4 years ago
I've checked and found it normally works if remove commit "Allow characteristic to send the value change event multiple times #128" When I edit characteristic.go - add this: `// Ignore when new value is same
if c.Value == value {
return
}
`
all works nice
What value does the OnValueRemoteUpdate
callback provide and for which characteristic?
acc.Lightbulb.On.OnValueRemoteUpdate(func(on bool) { //Send to MQTT bool value }) acc.Lightbulb.Brightness.OnValueRemoteUpdate(func(brightness int) { //Send to MQTT int value })
What values does the arguments on
and brightness
have, when you open the HomeKit app?
On = true Brightness = 100
Do you know which values those characteristics have before the Home app is opened?
yes, before it has:
On = false Brightness = 0
So this means that on startup the Home app automatically turns on the light bulb? This doesn't seem right.
I'm think this means that when homekit update status, it send request, but package make request to set value. (OnValueRemoteUpdate)
I've fixed that in the ignore-values
branch.
Please check out this branch and report if it works now.
Checked ignore-values
branch - works fine
Great, I've merged that into master now.
Hello! I'm think commits on 3 feb 2020 cause some errors With last version of sources, when I'm open Homekit App , hc calls "OnValueRemoteUpdate" method on opening Homekit app. But this method should be called only of user press something on device icon With "git checkout" to 27 jan 2020 it works fine.