Skip to content
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

Battery Status at Opener wrong #69

Closed
Skjall opened this issue Dec 5, 2020 · 3 comments
Closed

Battery Status at Opener wrong #69

Skjall opened this issue Dec 5, 2020 · 3 comments
Labels

Comments

@Skjall
Copy link

Skjall commented Dec 5, 2020

The Opener has no battery level. The API returns only a bool for batteryCritical. The Plugin seems to expect a "batteryChargeState" and therefore creates a reading for the battery level, which is always 0.

{
    "deviceType": 2,
    "nukiId": xxxxx,
    "name": "Haus",
    "firmwareVersion": "1.6.2",
    "lastKnownState": {
        "mode": 3,
        "state": 1,
        "stateName": "online",
        "batteryCritical": false,
        "ringactionTimestamp": "2020-12-04T10:34:16+00:00",
        "ringactionState": false,
        "timestamp": "2020-12-05T17:46:01+00:00"
    }
}
@benzman81
Copy link
Owner

will check

@benzman81
Copy link
Owner

I cannot reproduce this. The plugin logic actually expects this and uses the batteryCritical flag to use some content numbers:

batteryChargeState = json.batteryChargeState ? json.batteryChargeState: batteryCritical ? Constants.BATTERY_LOW : Constants.BATTERY_FULL;

Constants.BATTERY_FULL : 100,
Constants.BATTERY_LOW : 5

@benzman81 benzman81 added invalid waiting for response waiting for response labels Dec 6, 2020
@Skjall
Copy link
Author

Skjall commented Dec 6, 2020

I think you can close it. Maybe the state was flapping on the edge of too low voltage and therefore the plug-in call saw a low battery and mine not. I just took a look in the Nuki App and now the battery was actually low. So.... not a bug. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants