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

wrong negative temperature values displayed in wazicloud project dashboard #143

Open
SvenZeisberg opened this issue Feb 17, 2021 · 11 comments
Assignees
Labels

Comments

@SvenZeisberg
Copy link

waziup_wrong_negative_temp_values_dsiplay

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.

@SvenZeisberg
Copy link
Author

sorry WaziGate software version was v2.1.10

@j-forster
Copy link
Member

Looks like a display error one the Wazicloud, @cdupont ? Should i move this issue to Waziup/WaziCloud?

@cdupont
Copy link
Contributor

cdupont commented Mar 16, 2021

The bug is that the values "jumps"? Should it be continuous?
Would be nice if you can copy the URL...

@cdupont
Copy link
Contributor

cdupont commented Mar 16, 2021

The values seems to jump between negative integer positions:
image
For example in the graph aboveit jumps to -1, -2 and -3.

The values in the Cloud DB corresponds to the graph:
image

So I don't think it's due to the Cloud UI.

@cdupont
Copy link
Contributor

cdupont commented Mar 16, 2021

I did further tests with the WaziCloud, injecting fake data. Negative values seems to be handled well:
Screenshot from 2021-03-16 15-25-35

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?

@cdupont
Copy link
Contributor

cdupont commented Mar 16, 2021

@j-forster can it be some encoding problem in XLPP?
It looks like a float to int bit-shift conversion problem in XLPP :)

@j-forster
Copy link
Member

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.

@j-forster
Copy link
Member

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.

@cdupont
Copy link
Contributor

cdupont commented Mar 16, 2021

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.

@j-forster
Copy link
Member

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?

@cdupont
Copy link
Contributor

cdupont commented Mar 16, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants