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

Log jamming - Sensor logs seem to get bottlenecked #212

Closed adamdewey closed 2 years ago

adamdewey commented 2 years ago

Describe the bug Unsure exactly what has happened here but my tablet is no longer receiving logs from the sensors.

image

Tried restarting app, removing a sensor, restarting tablet and waiting more than 24 hours but no luck.

The only way I could get them to update was to open the Blue Maestro app, which seems to trigger an update.

Interestingly 2 of the sensors on the Blue Maestro app are showing 6000 logs...

2021-12-15_10-26-20

To Reproduce Steps to reproduce the behavior:

  1. Unsure - connect 6 sensors, set them to 1 min logging and close app for multiple (6?) days?
  2. Turn app back on and see that logs are stuck?

Expected behavior A clear and concise description of what you expected to happen.

Smartphone (please complete the following information):

Additional context Thought it might be the Laird sensor, so removed that, but still seems to be happening?

chetstone commented 2 years ago

Any progress on this?

I've been using cold chain for a couple of weeks and to monitor temperatures at my house.

I have two Laird sensors outside and three blue maestro sensors inside. The app regularly stops updating after anywhere from a couple hours to overnight. Usually I can get it updating again by simply killing the app and restarting it. But several times the Laird sensors would not reconnect without removing the battery and re-inserting it.

This is a Samsung T 500 tablet with android 11. (I will soon be forced to let it update to android 12).

I suppose that Bluetooth range could be an issue with the Laird sensors, but imho they are not that far away. The one I've had trouble with more often is about 7m and the other about 9m, with one wall in between each.

mark-prins commented 2 years ago

oh no! and also 'oh, no' which is to say 'that's not good to hear, sorry that the app isn't working well' and also 'no, we haven't looked at it yet'

we are swamped with work and there's no one actively working on cold chain - though we really need someone to. I'll see who we can free up.

adamdewey commented 2 years ago

FYI @npendergrast

npendergrast commented 2 years ago

FYI @DhanyaHerath

mark-prins commented 2 years ago

@adamdewey @npendergrast @DhanyaHerath : I've raised it with Craig & Nicole and asked for someone to be freed up to work on it

mark-prins commented 2 years ago

There are some RuntimeExceptions in onDestroy due to react native system settings. e.g. https://app.bugsnag.com/sustainable-solutions-nz-ltd/cce/errors/628ed30fb2b24c0008ecb90d?filters[event.since]=30d&filters[app.release_stage]=production&sort=events

Incidentally, the packages are out of date - time to raise an issue to run through that.

mark-prins commented 2 years ago

@chetstone Would you mind trying v0.5.0-rc2

I've made a couple of tweaks which have things running nicely for me - although tbh I wasn't having much trouble with the Lairds on the Samsung tablet ( I have an A7 ).

The lenovo was working fine for the lairds.. but now it simply won't connect to one of the laird sensors. It simply won't prompt for the pin, even after going into bluetooth settings and removing all the paired sensors. That issue appears to be particular to that tablet though, and I can't recreate it elsewhere.

chetstone commented 2 years ago
        Mark,I will take a look. I will need to merge your changes into my branch which has a couple of convenience hacks for my use case (Fahrenheit, anyone?).Actually, things have been working pretty well since I filed my comment. I swapped the lairds and the blue maestros, so the Lairds are now inside and the blue my Astros are outside. So it could be a range issue. Also, the upgrade to android 12 could certainly have affected things.Since then I had one instance where one of the lairds stopped reporting and I had to remove and replace the battery. (I didn’t have to repair or reconnect). But I’ve had no instances of all of the sensors stopping reporting like I did before.Removing the battery does seem to help with resetting the Laird‘s. Also there’s the factory reset. If pressing the button for 12 seconds or whatever doesn’t work, you might have to use the BT510 app to repair the sensor and reset it.BTW you’ve tagged your changes in msupply-cold-chain but not in msupply-ble-service. Could you please add that tag?  ThanksChester---- On Wed, 10 Aug 2022 18:35:34 -0600  Mark ***@***.***> wrote ---- 

@chetstone Would you mind trying v0.5.0-rc2 I've made a couple of tweaks which have things running nicely for me - although tbh I wasn't having much trouble with the Lairds on the Samsung tablet ( I have an A7 ). The lenovo was working fine for the lairds.. but now it simply won't connect to one of the laird sensors. It simply won't prompt for the pin, even after going into bluetooth settings and removing all the paired sensors. That issue appears to be particular to that tablet though, and I can't recreate it elsewhere.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

mark-prins commented 2 years ago

Thanks @chetstone - that's good to hear. And a good reminder that we should do something about Fahrenheit sometime!

Have pushed a tag to the msupply-ble-service.. oops 🙄

mark-prins commented 2 years ago

I believe resolved now - please reopen if observed again.