Closed arteck closed 6 years ago
It come from min/max interval https://github.com/Koenkk/zigbee-shepherd-converters/blob/master/converters/fromZigbee.js#L12 and linear conversion of the current voltage https://github.com/Koenkk/zigbee-shepherd-converters/blob/master/converters/fromZigbee.js#L19 Look at the sensor voltage and understand how the percentage depends.
The question about the min and max value has already been discussed and so far we have stopped on this interval.
i think the problem is a different value from xiaomi and other devices here
const battery3V = { min: 2700, max: 3000, };
all my devices has a percentage value 100 .. this is wrong..
In debug you can see the voltage. What is the value do you have?
пт, 27 июл. 2018 г. в 13:36, arteck notifications@github.com:
i think the problem is a different value from xiaomi and other devices here
const battery3V = { min: 2700, max: 3000, };
all my devices has a percentage value 100 .. this is wrong..
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ioBroker/ioBroker.zigbee/issues/20#issuecomment-408393324, or mute the thread https://github.com/notifications/unsubscribe-auth/AEXqgKa4LJTF1s39UiE1kxmm8YeWULrbks5uKvtYgaJpZM4VIvxo .
my problem is not the voltage .. the percentage is wrong
I understand, but what the voltage delivers YOUR devices, if you think the percentage is wrong?
3012 is the voltage
And why you think that 100% is wrong? Elsewise can you suggest your formula? I have done long time ago the percent calculation and it was devil complex, because the ratio of the voltage and percents is not constant.
check this connect one battery device with a xioami gateway .... look for percentage battery.. now disconnect this and connect it with USB-Stick.. what can you see ?? is the percentage same or not ??? or almost the same ??
ok-ok. in dev branch I added new calculation battery percent value https://github.com/ioBroker/ioBroker.zigbee/blob/dev/lib/devstates.js#L132 we don't know how gateway calculate this percent. this may be a nonlinear relationship.
can you check the xiaomi battery handling. my sensoers and switsches has wrong batt percent
battery was removed and replaced.. same result