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

Ignore most significant bit kWh readings #2598

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

Conversation

markruys
Copy link
Contributor

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

I expect this PR addresses issues #1724, #2062, and #2333 wrt NAS-WR01ZE.

@markruys markruys force-pushed the feature/Fix_kwh_Neo_Coolcam_NAS-WR01ZE branch from 38ce4e9 to 8a19338 Compare October 11, 2021 19:47
@LoukKamp
Copy link

LoukKamp commented Nov 4, 2021

Any chance that this change is merged to the master and will be included in then next release or beta (V1.7)?

As all new models of this wall plug (Neo CoolCam NAS-WR01ZE) seem to have this nasty behavior, more and more people will benefit from this change .

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.

2 participants