Open SvenZeisberg opened 3 years ago
sorry WaziGate software version was v2.1.10
Looks like a display error one the Wazicloud, @cdupont ? Should i move this issue to Waziup/WaziCloud?
The bug is that the values "jumps"? Should it be continuous? Would be nice if you can copy the URL...
The values seems to jump between negative integer positions: For example in the graph aboveit jumps to -1, -2 and -3.
The values in the Cloud DB corresponds to the graph:
So I don't think it's due to the Cloud UI.
I did further tests with the WaziCloud, injecting fake data. Negative values seems to be handled well:
So it's probably something at WaziGate level or WaziDev. @j-forster is there a way to retrieve the time series from the WaziGate of Sven? @Sven could you copy the WaziDev sketch?
@j-forster can it be some encoding problem in XLPP? It looks like a float to int bit-shift conversion problem in XLPP :)
Wazigate pushes data every few minutes as a bulk upload. Did you do your tests using the bulk values import or did you send the values one by one? Maybe there is a problem at that endpoint - maybe reverting the values or the timestamps somehow.
The bulk import has a timestamp for each value that is generated in Wazigate edge with each values when it's received. The value is uploaded together with that timestamp, so I don't see how this could result in reverted chunks.
If it's a problem with XLPP (which was not in production when @SvenZeisberg received the first values on Feb. 13) the error would occur on a per-value basis, not on continuous chunks. So it is either a bug at the cloud-sync procedure at the wazigate-edge or it is on the cloud.
The sensor is this one: http://dashboard.waziup.io/devices/6021c4477845240006d5d429/sensors/temperatureSensor_1
The jumps occurs every few hours, when crossing an integer value. So I don't think it's about the bulk upload.
I see. Yes, the problem must be somewhere in the Wazigate or Wazidev.
Decoding LPP was handled by Chirpstack at that time.
What libraries are you using with the Wazidev @SvenZeisberg? Is it the XLPP library or the LPP library?
Between two negative integers, the curves goes in the wrong direction (e.g. up instead of down), and then jumps back to the right integer. You can obtain the same behavior in your browser javascript console (just having fun):
x = -2.1; Math.floor(x) + Math.abs(x % 1)
-2.9
So I suspect something in XLPP... Maybe here??? https://github.com/Waziup/arduino-xlpp/blob/main/src/xlpp.cpp#L30
In wazicloud project dashboard the negative temperature values of temp sensor are displayed wrong (see graph) --- Sensor was taken from Wazi-Starter-Kit, Wazidev was v1.3, Wazigate was v2.0.10. The error is easy to reproduce with any different devices ...so it is a systematic error. Probably it is a type conversion error either in wazidev or in wazigate ...hard to say, as there are no records of received numbers in wazigate.