Closed m0rgano closed 3 years ago
These sort of problems do occur occasionally and are normally caused due to corruption of data. There is really nothing that can be done to resolve this - it's not a binding issue as such.
It is happening consistently. It looks like the sort of behaviour when an Integer is being used to store the data somewhere rather than a Long.
Some of these devices have been known to have problems. It could be that the device device is sending the data corrupt.
You can see below that the data is invalid.
01 14 00 04 00 19 0E 32 02 21 44 80 00 65 CB 00 3D 80 00 65 CB 90
32
Meter
02
Report
21
Meter Type
44
Precision 2 decimal places, size 4 bytes
80 00 65 CB
4 bytes of data
800065CB
is -2147457589 - with 2 decimal places, that is -21474575.89 as shown in the log, so this seems correct.
If we remove the high bit we have 65CB
it would be 260.59. I don't know what you expect, but I believe that the top bit is probably not meant to be set.
Thanks for the analysis. I can probably fix that by manipulating the data myself.
This is happening on all my devices of this type so it seems to be a common problem. Is there any way of removing that spurious top bit in the binding, so that others can benefit? The number (kWh) should always be positive for this device.
There's not really any easy way to manipulate the data in this way. The binding tries to be generic rather than being built with specific bits of logic to work around bugs or whatever in devices which would make it hugely complex given we have about 1200 devices that are supported.
I think when we've had things like this in the past, people have used rules to filter this out - you'll find stuff on the forum about this. Normally it's more random, and I don't know if it's always this bit that's set if resetting the device might help. I know people have had various problems with these Coolcam devices.
OK I understand. I'll work around it myself and I'll endeavour to report it to Neo Coolcam.
If the problem is associated with a device, please provide the following -:
Debug Log for the relevant transaction:
As you can see, the kWh meter report value is showing as a large negative number.