theengs / app

Theengs mobile application to read BLE sensors and push data to an MQTT broker
https://app.theengs.io
GNU General Public License v3.0
37 stars 7 forks source link

Graph drop outs and value inconsistencies for IBS-TH1 #38

Closed DigiH closed 1 year ago

DigiH commented 1 year ago

I saw this before on a previous version, but didn't pay too much attention to it. Now with it still showing with 1.1.1 (1010101)

Going into the widget view of a IBS-TH1 the first thing that is apparent is that one of the graphs - the blue one - is cut off and stop well before the current date, although both the temperature and humidity are always broadcast together and therefore I assume are recorded together.

Assuming the blue graph indicates the humidity and green the temperature, sliding over the graph to get the details display, neither the humidity, nor the temperature changes align with the currently displayed blue graph.

Looking at the jumps of the green graph it almost looks like the blue graph is somehow time condensed, and would fit along with the green graph and the details changes if it was also stretched out over the whole time line - as can also been seen by both the temperature and humidity details views during sliding, even for the section after the blue graph has stopped.

https://user-images.githubusercontent.com/17110652/199490255-0a34ade7-6a38-4f2a-8308-4cd89f8de3b8.mp4

DigiH commented 1 year ago

A few hours later, after also activating my second IBS-TH1 and adding it brand new to Theengs BLE, both widget graph views showing the same issue.

While both time lines are totally different, it is apparent that the blue graph cut off is at the same section in the last quarter column.

IMG_1714

IMG_1713

1technophile commented 1 year ago

This is for a CGD1 image image

We can see several things here:

DigiH commented 1 year ago

I really think it is a condensed/stretching/scaling issue. That the blue graph is correct, but only if it would stretch all the way across the time line. Then also your temperature going up and humidity going down would match nicely in your screenshot towards the end of today..

DigiH commented 1 year ago

So I deleted the app and all its data(bases) and installed TestFlight version 1.1.1 (1010101) fresh to rule out any database remainders/corruption from previous (test) versions.

What I am seeing so far is that only one time line data point on top of the initial values seems to have been registered, making a wider and wider gap on the right side. Even though I opened the app every 5-10 minutes and the refresh icon in the top right kept pulsing every time, and me also refreshing the sensor data manually every now and then, there have not been any new data points.

Watching how this develops …

IMG_1734

DigiH commented 1 year ago

Ok, after a while with not touching the phone, but the app still running while the phone was in stand-by, another data point appeared.for both my IBS-TH1s.

IMG_1739 IMG_1740

So far, so good.

When closing the app though, and opening it right up again (see the same time at the top) and looking at the graphs then, the issue is back.

Clearly indicating the compression of the blue graph, as the data points, previously at the same time points, are now shifted compressed from the left, and also looking to be compressed in its height.

IMG_1742 IMG_1741

So closing and reopening the app messes with the graphs, at least on iOS.

Previously this must have happened when installing an updated version of the app - similar to closing and reopening.

Updated screenshots from today, showing the original case with the green line all across the time line, the blue line compressed horizontally and vertically

IMG_1747 IMG_1748

DigiH commented 1 year ago

A few days later, and the graphs seem to have 'recovered' with both going all across and the data points are in sync.

Closing and opening the app again doesn't make any changes to the graphs.

@1technophile - are you seeing the same for your CGD1?

IMG_1761 IMG_1762

emericg commented 1 year ago

I have not seen this bug. It's weird because the time axis is shared between both values, and values are set together in pairs, so it's unlikely a mismatch can occur. Also the graph is the same for all thermometers and plant sensors (same code running).

1technophile commented 1 year ago

@1technophile - are you seeing the same for your CGD1?

Same thing here, all is fine

DigiH commented 1 year ago

Previously this must have happened when installing an updated version of the app - similar to closing and reopening.

Just installed the 1.2 (1020001) TestFlight update, and as expected, the issue is back. So closing and reopening the app sometimes, but definitely installing a new version of the app always, lets this appear.

IMG_1763 IMG_1764

DigiH commented 1 year ago

For this issue for my IBS-TH1s, at least for the macOS version - as installing a new app version recently came up with the problem again - switching the graph style to the bar style, then going back to the line style immediately fixes the issue, without having to wait a few days for it to recover.

So if a quick graph style switch is the fix it should probably also be easily addressable when just opening the line graph initially.

Closing the app and reopening it has the initial line graph with the issue again - do the graph switching and all is fine

https://user-images.githubusercontent.com/17110652/202253725-8e6f53ba-a2ec-4c98-8944-496374c547cb.mov

DigiH commented 1 year ago

Unfortunately the above solution also shows the previously mentioned vertical difference of the blue graph even more clearly now.

So after a few days the blue graph goes all across again now, but which vertical assignments is correct, before or after the graph switching?

Without any legends it is not very clear, but there are major differences - on macOS and iOS

With the graph switching fixing the horizontal issue, as shown above, my assumption here is that also the vertical amplitude is only the correct one after the switching, whereas before it shows it condensed!?!

https://user-images.githubusercontent.com/17110652/202465568-e0e43ccd-a2d5-438b-9e13-211034a1c157.mov

https://user-images.githubusercontent.com/17110652/202466419-f791212c-330d-45cf-a8fc-92e5af646592.mp4

DigiH commented 1 year ago

Looks all fine for me with the latest iOS and macOS builds 👍 Closing