home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.11k stars 29.79k forks source link

[ozw] Battery level not reported on Yale locks #38907

Closed Dinth closed 4 years ago

Dinth commented 4 years ago

The problem

Battery level for Conexis L1 lock doesnt seem to be reported correctly - it always shows 0%, even on fresh batteries. I dont believe this is an OZW issue (unless it a regression in 1.6), as it was working fine a while ago on 1.4.

Screenshot from 2020-08-15 13-57-25

MQTT dump: mqtt_dump.txt

Environment

ovid-io commented 4 years ago

I have same issue, changed batteries over a month ago but lock still reports 1% battery. Would think it's Yale issue instead - as my integration is via SmartThings -> HA, and both report same value

probot-home-assistant[bot] commented 4 years ago

Hey there @cgarwood, @marcelveldt, @martinhjelmare, mind taking a look at this issue as its been labeled with an integration (ozw) you are listed as a codeowner for? Thanks! (message by CodeOwnersMention)

MartinHjelmare commented 4 years ago

The mqtt info we receive is reporting 0 % battery level, looking at the mqtt dump. We're just showing what we receive from the ozw daemon which is using the OpenZWave library to interpret the device data:

{
    "Label": "Battery Level",
    "Value": 0,
    "Units": "%",
    "ValueSet": true,
    "ValuePolled": false,
    "ChangeVerified": false,
    "Min": 0,
    "Max": 255,
    "Type": "Byte",
    "Instance": 1,
    "CommandClass": "COMMAND_CLASS_BATTERY",
    "Index": 0,
    "Node": 55,
    "Genre": "User",
    "Help": "Current Battery Level",
    "ValueIDKey": 929038353,
    "ReadOnly": true,
    "WriteOnly": false,
    "Event": "valueRefreshed",
    "TimeStamp": 1597430988
}

So this is not a problem in the ozw integration. Either it's the device that is reporting incorrectly or the data is interpreted incorrectly in the OpenZWave library.