miband4
miband4 copied to clipboard
Activity Log data incorrect
First of all, thank you for putting in all the work to create such a useful lib. There seems to be an issue with parsing the recorded activity information from the band: data like the heart rate (only 0 or 255) and steps (only 0 or 128) are incorrect. Is the a common problem?
band info: MiBand Soft revision: V1.0.2.64 Hardware revision: V0.44.19.2 Serial: 336713969700 Battery: 71
I seem to have the same problem. Are the steps not the number of steps during that 1 minute interval ?
my log:
12.11 - 08:08: category: 90; intensity 0; steps 0; heart rate 255;
12.11 - 08:09: category: 90; intensity 0; steps 0; heart rate 255;
12.11 - 08:10: category: 90; intensity 0; steps 0; heart rate 255;
12.11 - 08:11: category: 90; intensity 0; steps 0; heart rate 255;
12.11 - 08:12: category: 80; intensity 30; steps 0; heart rate 255;
12.11 - 08:13: category: 1; intensity 64; steps 15; heart rate 255;
12.11 - 08:14: category: 1; intensity 80; steps 33; heart rate 255;
12.11 - 08:15: category: 1; intensity 100; steps 76; heart rate 255;
12.11 - 08:16: category: 16; intensity 22; steps 0; heart rate 255;
12.11 - 08:17: category: 96; intensity 6; steps 0; heart rate 255;
12.11 - 08:18: category: 96; intensity 18; steps 0; heart rate 255;
12.11 - 08:19: category: 96; intensity 6; steps 0; heart rate 255;
12.11 - 08:20: category: 96; intensity 15; steps 0; heart rate 255;
12.11 - 08:21: category: 96; intensity 21; steps 0; heart rate 255;
12.11 - 08:22: category: 96; intensity 10; steps 0; heart rate 255;
my band info:
MiBand
Soft revision: V1.0.9.48
Hardware revision: V0.25.19.5
Serial: 79fb17e114e8
Battery: 45
Time: 2021-11-12T15:17:20
Following code section:
- https://github.com/satcar77/miband4/blob/4fdf6e9b4f4c5fd5c90b4ce2fbe5965d6bb82ea7/miband.py#L83
describes the implementation.
I thought this was based on gadgetbridge file
- https://github.com/Freeyourgadget/Gadgetbridge/blob/2c6907b02bd6bdb28e520b755798b3dbbbaad316/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/MiBandSupport.java
but I can't find it back in that file.
So I am wondering where this mapping comes from.
I am especially interested in understanding the different categories and intensity values.
Moreover heart rate
value is not correct.
It is actually based on :
- https://github.com/Freeyourgadget/Gadgetbridge/blob/2c6907b02bd6bdb28e520b755798b3dbbbaad316/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband/operations/FetchActivityOperation.java#L369