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

Feature/fix kwh neo coolcam nas wr01 ze #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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