-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StatusLowBattery always 1 #40
Comments
It works as designed by HomeKit. You can see here https://developer.apple.com/documentation/homekit/hmcharacteristictypestatuslowbattery To change the mapping like done in your last action is the right way to handle the incompatible behaviour of your device. |
Yes but neither with my own mapping nor with the setting of homebridge (index.js line 1419) it works correctly. As you see below my own mapping, it does not matter if the battery status of the device is 0 or 1, the status low battery is always the value form 0 to whatever. |
What versions of Homebridge and Homebridge-fhem do you use? I see neither timestamp nor [FHEM] tag in your log output. |
Removed for clarity. homebridge-fhem@0.3.7, homebridge@0.4.33. |
I have the same issue with homebridge-fhem@0.5.16, homebridge@0.4.53 and node@10.19.0 FHEM-device: Output from hb-service logs:
The battery is actually low, but if FHEM receives a "battery":1, the StatusLowBattery is still 1 even if i try to remap it using homebridgeMapping. |
please show your mapping |
The output above was made without a mapping. |
Tut doch aber genau das, was Du ihm gesagt hast. Das ist ein TRUE/FALSE. Dein Mapping sagt ihm Wert 0 in FHEM= Wert 1 in Homekit. Das zeigt auch das Logging. |
Das Logging wurde aber ohne Mapping erstellt und trotzdem wird eine 0 in eine 1 geändert. In der pilight Weboberfläche wird mir im Normalfall eine grüne Batterie angezeigt, wenn pilight battery:1 empfängt. In HomeKit bedeutet die 1 dann aber BATTERY_LEVEL_LOW und ich erhalte eine Batterie-Warnung. Nun empfängt pilight battery:0 und zeigt eine rote Batterie, aber in HomeKit kommt wiederum eine 1 an. Wie gesagt, alles ohne Mapping. Wenn HomeKit eine gegensätzliche Logik zu pilight hat, müsste es ja dann auf BATTERY_LEVEL_NORMAL springen, was es aber nicht macht. |
bitte poste mal die zum mapping gehörende log ausgabe |
Die Batterie hat sich wieder erholt, ist wahrscheinlich durch die kalten Temperaturen draußen in die Knie gegangen, also pilight empfängt wieder ein battery:1. Hier der Log mit mapping:
|
Falls mein vorheriger Post missverständlich war, das Verhalten ist meiner Meinung nach immer noch fehlerhaft, da trotz des Mappings eine 1 an HomeKit übergeben wird. |
da funk der automatisch erkannte threshold dazwischen. ich weiss noch nicht genau warum. setz mal |
Sehr gut, vielen Dank.
Jetzt wird es auch in HomeKit richtig angezeigt. |
I'm using the current homebridge-fhem version with a temperature sensor. The config in fhem is done like this:
define WohnzimmerWetter pilight_temp alecto_ws1700 11 attr WohnzimmerWetter IODev pilight attr WohnzimmerWetter genericDeviceType thermometer
The sensor has the attribute "battery" which has "0" when battery level is low and "1" if battery level is normal. But in Apple Home I always got a "battery level low" even if battery has value "1".
homebridge log:
WohnzimmerWetter-battery: 1 caching: BatteryLevel: 1 (as number; from '1') caching: StatusLowBattery: 1 (as number; means BATTERY_LEVEL_LOW; from '1')
Normally I do not have to make my own mapping, because it is done in index.js:1419.
So it seems that battery:1 is not detected correctly. If a set my own homebridge mapping, it has the same issue.
attr WohnzimmerWetter homebridgeMapping StatusLowBattery=battery,values=0:BATTERY_LEVEL_LOW;1:BATTERY_LEVEL_NORMAL
caching: StatusLowBattery: 1 (as number; means BATTERY_LEVEL_LOW; from '0') caching: StatusLowBattery: 1 (as number; means BATTERY_LEVEL_LOW; from '1')
The mapping is correctly as I have it in the homebridge log.
If I change my mapping like this, I got battery level normal.
StatusLowBattery=battery,values=1:BATTERY_LEVEL_LOW;0:BATTERY_LEVEL_NORMAL
caching: StatusLowBattery: 0 (as number; means BATTERY_LEVEL_NORMAL; from '0') caching: StatusLowBattery: 0 (as number; means BATTERY_LEVEL_NORMAL; from '1')
Do you need more information?
Thank you and best!
The text was updated successfully, but these errors were encountered: