com.ruuvi.station icon indicating copy to clipboard operation
com.ruuvi.station copied to clipboard

Cloud connection alert triggered 6 days ago, sensor shows last data from Bluetooth

Open markoaamunkajo opened this issue 1 year ago • 2 comments

Description:

User run out of battery for Cloud sensor 6 days ago Sensor card hows last data arrived from Bluetooth, even though this is not possible

(this is Lauri's sensor located in Finland)

Image

markoaamunkajo avatar Jan 09 '24 02:01 markoaamunkajo

@markoaamunkajo can you investigate what user actions can lead to this?

andreevdenis avatar Feb 13 '24 13:02 andreevdenis

So far no luck reproducing this.

What is known:

  • Lauri shared this sensor to me and it shows last source correctly being Gateway
  • On Lauri's device this sensor shows Bluetooth icon as last source
  • This sensor shows incorrect values in Cloud and it's being investigated https://github.com/ruuvi/ruuvi.cloud.js/issues/430

markoaamunkajo avatar Feb 14 '24 05:02 markoaamunkajo

This is caused by Cloud side issue https://github.com/ruuvi/ruuvi.cloud.js/issues/430 For some reason old data point is returned from the cloud. In this case sensor values won't be updated since measurements outdated, but we update latest networkLastSync (Date), because we assume that data returned from the cloud is the latest available for this sensor. Sensor has 2 dates: updatedAt and networkLastSync. If these dates are equal then we show Gateway icon otherwise Bluetooth icon. For this sensor Lauri got updatedAt = 09.02.2024 and networkLastSync = 20.11.2020 so Bluetooth icon is displayed.

Can add extra check to not update networkLastSync if new value is less than previous. Not sure if this is needed since this case is rare and should be fixed on CLoud side somehow.

@laurijamsa @markoaamunkajo

andreevdenis avatar Apr 30 '24 16:04 andreevdenis

Yeah I think no need to add checks on the app. Let's fix this in the backend.

laurijamsa avatar May 01 '24 18:05 laurijamsa