oliexdev / openScale

Open-source weight and body metrics tracker, with support for Bluetooth scales
GNU General Public License v3.0
1.71k stars 296 forks source link

Incorrect time of the measurement #923

Closed woj-tek closed 1 year ago

woj-tek commented 1 year ago

Describe the bug For some reason, starting yesterday, OpenScale displays incorrect timestamp of the measurement. For example measurement took at 7:36 would be displayed with timestamp 10:36. I'm currently in CLST timezone, which is UTC -3 but I've been here for a couple of months now. There haven't been any update made (that I recall of). Zepp life was update on 26th of Jan so long before the issue.

To Reproduce Steps to reproduce the behavior:

  1. Enable bluetooth in the OS
  2. step on the scale
  3. get synchronised measurement with incorrect timestamp

Reproduced with latest dev version: not tried.

Debug log

(Measurement took at 8:17, displays 11:17) openScale_2023-02-10_08-16.txt

Relevant line:

2023-02-10 08:17:20.714 Debug [2] OpenScale: Added measurement: ID: 0, USER_ID: 1, DATE_TIME: Fri Feb 10 11:17:00 GMT-03:00 2023, WEIGHT: 75,40, FAT: 22,64, WATER: 53,07, MUSCLE: 73,42, LBM: 0,00, WAIST: 0,00, HIP: 0,00, BONE: 2,80, CHEST: 0,00, THIGH: 0,00, ARM: 0,00, NECK: 0,00, CALIPER1: 0,00, CALIPER2: 0,00, CALIPER3: 0,00, COMMENT: 
oliexdev commented 1 year ago

What do you mean by you are currently in CLST timezone? Did it happen after you moved in this timezone? The current time/date is set on your scale with your date/time set from your smartphone.

woj-tek commented 1 year ago

I moved to CLST timezone 2 months ago, I got new mi scale, added it to openScale and everything was working just fine this past two months. 2 days ago all of the sudden the timestamp started to not match actual time of the measurement (measurement at 7:30 woild be logged with timestamp 10:30). To the best of my recollection nothing has changed.

I checked zepp application but I don't see any setting related to timezone of the scale. Nor did I saw it in the openScale settings.

oliexdev commented 1 year ago

The time/date is set every time your connect to the scale in the background. The reference of the date/time is your setting in your smartphone (main date/time)! Please check if your smartphone has the correct time/date. You could also try to reset your scale, please look into the scale manual how you do that.

woj-tek commented 1 year ago

Weird. I check Zapp app and the timestamp in it was correct. But I went ahead with factory reset and... it seems to have worked :-)

oliexdev commented 1 year ago

ok great, I won't recommend to use the vendor app and openScale in parallel because some scales needs to be set an internal key to work. If you switch between two apps then the scale "get confused".

woj-tek commented 1 year ago

I would just use openScale, but... I need official app for Mi Band to work (Notify for Mi Band, even though it's 3rd party still requires it to work for some reason...)

oliexdev commented 1 year ago

@woj-tek you could try https://github.com/Freeyourgadget/Gadgetbridge for your Mi Band.

woj-tek commented 1 year ago

@oliexdev oh, thanks! Looks promising. I wonder if it would work with SleepAsAndroid though, will test. Thanks a million! :-)