Skip to content

Conversation

@markruys
Copy link

@markruys markruys commented Dec 4, 2021

Actually, I created this PR as OpenZWave#2598, but the OpenZWave project seems to quite slow in processing PRs.

The Neo Coolcam NAS-WR01ZE randomly reports kWh value with the most significant bit set. This results in erroneous negative readings:

       37.86          0x00000ECA
-21474798.43  0xFFFFFFFF80000EDD
       38.26          0x00000EF2
-21474798.11  0xFFFFFFFF80000EFD
       38.40          0x00000F00

OZW expects a 32-bit signed int, hence the negative readings. According to the docs of this device, the maximum report value is 21474836.47 kWh, which is 0x7FFFFFFF. This PR resets resets the most significant bit to 0. This results in:

37.86
38.05
38.26
38.37
38.40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant