msupply-foundation / msupply-cold-chain

Android application for viewing and monitoring temperatures of fridges
GNU General Public License v3.0
3 stars 3 forks source link

232 retrieve temp logs #234

Closed anildahalsussol closed 1 year ago

anildahalsussol commented 1 year ago

Fixes #232

As per discussion with @adamdewey :

  1. Let's not let the user change the interval. Only at first, we will let them change the interval.
  2. Second it seems Blue Maestro whenever the update command is fired deletes the log from msupply. But for BT250 we are downloading logs manually. So changed now that whether its BT250 or Blue maestro we want to download logs first then let the delete if it's needed as we see the after every download updateloginterval is running.
andreievg commented 1 year ago

@anildahalsussol, @adamdewey we really need to make this an issue, with proposed solution a duplication of the the issue (before PR)

adamdewey commented 1 year ago

@andreievg, @anildahalsussol Issue here: https://github.com/openmsupply/msupply-cold-chain/issues/235

andreievg commented 1 year ago

Oops, i see that there is an issue number in the title 232, will look at it sometime, thanks

andreievg commented 1 year ago

@anildahalsussol I think the core issue with gaps in logs downloads is dealt with by this description: https://github.com/openmsupply/msupply-cold-chain/issues/229#issuecomment-1556166880.

Sorry I don't really have the time to review your changes, and I can't quite validate if they are needed. From my understanding no one is raising issue with manual change to log frequency/duration causing logs to be wiped.

anildahalsussol commented 1 year ago

@anildahalsussol I think the core issue with gaps in logs downloads is dealt with by this description: #229 (comment).

Sorry I don't really have the time to review your changes, and I can't quite validate if they are needed. From my understanding no one is raising issues with manual changes to log frequency/duration causing logs to be wiped.

Hmm, yeah but it's still unknown as a country that we know which is losing data is not connecting for more than a day so when they try to connect back as it's not easily connected may be chances they do something which we are not aware of so far. I am trying to communicate with her to know what she do or if there are any steps that they do which is causing data to lose. And also why I am proposing this one is even cold chain apps don't retrieve old data if there are present in the sensor. As a screenshot, you can see one from Blue maestro apps and one from the cold chain. In our cold chain apps, it shows no data at all and in Maestro for the same sensor, it shows 6k logs. So if was deleting the logs by some error I suppose it should delete from the sensor too but looking at blue maestro it's not deleting. And as docs data only get deleted if the log interval is changed so I tried to and I have attached another screenshot with 3 logs in blue Maestro apps which I changed the interval and checked and as docs, it was wiped.

So my point is if data from the sensor is deleted then it must be an update of the log interval and if there is data in the sensor then obviously we have to download the logs again.

But as per the client when we checked the sensor with blue maestro there were only 10 logs for 7 days so I am not sure how, but I can think it can only be logitnerval?

The top one is the log which has 6k logs (interval of 1) and the second one I changed the log interval and after that, it shows 3 logs. photo_2023-05-23 09 59 50

6k logs showing in blue maestro apps for sensor c756a0c4 photo_2023-05-23 09 59 43

3 logs showing in cold chain apps for the same sensor c756a0c4 (it doesn't download old logs) photo_2023-05-23 09 59 46

[#229 (comment)](https://github.com/openmsupply/msupply-cold-chain/issues/229#issuecomment-1556166880).

We can try this one and hopefully, it improves.

adamdewey commented 1 year ago

Hey @anildahalsussol - thanks for looking into this, and good detective work!

But I think at the moment we can pause work here for now.

Let's see if Cam's fix resolves the issue for the client (and for our test systems).

If we're getting the end result we want (even if there is some weirdness with deleted logs) then that will be good enough for now.

We can re-visit this if we find time in the future.

Cheers