InfiniTimeOrg / InfiniTime

Firmware for Pinetime smartwatch written in C++ and based on FreeRTOS
GNU General Public License v3.0
2.71k stars 926 forks source link

Tracking steps between Gadgetbridge and PineTime seems inaccurate... #928

Closed ajack2001my closed 2 years ago

ajack2001my commented 2 years ago

Verification

What happened?

I walked and GB reported I took 536millions steps by mid day

What should happen instead?

Typically around 5k steps by mid day

Reproduction steps

Don't know...

More details?

WhatsApp Image 2022-01-11 at 5 49 08 PM WhatsApp Image 2022-01-11 at 5 54 47 PM

Version

1.8.0

Companion app

GB 0.64.0

ITCactus commented 2 years ago

i have never experienced such an issue, even during implementing steps sync support for Gadgetbridge... i tested the feature with up to 20k steps, and no issues. could it be some issues with Gadgetbridge in "Settings -> About you"? also, did you try to remove device from Gadgetbridge, and do a clean pair like a new device?... also, keep in mind, that sync is processed only when you unlock the PineTime screen (e.g. push the power button)...

anyway, it's unlikely the InfiniTime issue, but anyway can you look in Gadgetbridge logs e.g. in Android Studio? step sync should look like this: D/nodomain.freeyourgadget.gadgetbridge.service.btle.BtLEQueue: characteristic changed: 00030001-78fc-48fe-8e23-433b3a1942d0 value: 0x08 0x00 0x00 0x00 D/nodomain.freeyourgadget.gadgetbridge.service.devices.pinetime.PineTimeJFSupport: onCharacteristicChanged: MotionService:Steps=8 D/nodomain.freeyourgadget.gadgetbridge.service.devices.pinetime.PineTimeJFSupport: adding 8 steps do you see correct values, or those are already in thousands?

@JF002, @Avamander, just wondering if it could be a side effect of the feature mentioned as "secure pairing" ?

Avamander commented 2 years ago

@ITCactus unlikely to be the cause.

Must've been a communication error somewhere, given the fact that it's nonreproducible I don't think we can do anything here.

ITCactus commented 2 years ago

well, for the first time i noticed some issue with steps counter - today PineTime/InfiniTime counted only about 400 steps instead of couple of thousands. and no steps info on charts in Gadgetbridge at all... unfortunately, that version of Gadgetbridge is not debugable, and all i can see is logs (after enabling those in GB settings). and in logs i see that sync steps from InfiniTime to Gadgetbridge is ok, but those are not added for some reason.

and in my case, it looks like the reason why Gadgetbridge not adds the steps is that it shows for today "total steps" about 11170, and that was the value for "Trip" (not "Steps") on InfiniTime. and because "11170" is more than "400", the GB logic ignores the value as false positive sync.

update: just confirmed it - on "11172" Gadgetbridge added 2 steps... so, for some reason, InfiniTime sent "Trip" value, and not a "Steps".

@Avamander could it be the case, that "InfiniTime" syncs the "Trip" count instead of "Steps" in some cases (e.g. overnight the "Steps" counter is zeroed, but "Trip" is not, and then "InfiniTime" uses the "Trip" counter)?

aereaux commented 2 years ago

I've been experiencing some issues like this, where the value in gadgetbridge will be significantly more than the value on the pinetime. It happens somewhat often, although I haven't found a way to definitively reproduce it. Is there anything I can do to help debug this?