Giter VIP home page Giter VIP logo

Comments (2)

janvda avatar janvda commented on August 25, 2024

I have added some log statements.
I also adapted it so that it is not logging the activity for the complete day but only for the current hour:

2021-11-24 09:25:24,047 miband (INFO) > Enabling Fetch Char notifications status...
2021-11-24 09:25:24,067 miband (INFO) > Enabling Activity Char notifications status...
Trigger activity communication
_char_fetch.getHandle(): 15 bytes received, processing them ...
  > Fetch data from 2021-11-24 9:0
_char_activity.getHandle(): 9 bytes received, processing them ...
  > 2021-11-24 09:04: category: 80; intensity 110; steps 0; heart rate 255
  > 2021-11-24 09:05: category: 17; intensity 83; steps 43; heart rate 255
_char_fetch.getHandle(): 3 bytes received, processing them ...
  > Trigger more communication
Trigger activity communication
_char_fetch.getHandle(): 15 bytes received, processing them ...
  > Fetch data from 2021-11-24 9:6
_char_activity.getHandle(): 17 bytes received, processing them ...
  > 2021-11-24 09:10: category: 96; intensity 14; steps 0; heart rate 255
  > 2021-11-24 09:11: category: 96; intensity 20; steps 0; heart rate 255
  > 2021-11-24 09:12: category: 96; intensity 28; steps 0; heart rate 255
  > 2021-11-24 09:13: category: 96; intensity 17; steps 0; heart rate 255
_char_activity.getHandle(): 17 bytes received, processing them ...
  > 2021-11-24 09:14: category: 96; intensity 23; steps 0; heart rate 255
  > 2021-11-24 09:15: category: 96; intensity 14; steps 0; heart rate 255
  > 2021-11-24 09:16: category: 96; intensity 15; steps 0; heart rate 255
  > 2021-11-24 09:17: category: 96; intensity 22; steps 0; heart rate 255
_char_activity.getHandle(): 17 bytes received, processing them ...
  > 2021-11-24 09:18: category: 96; intensity 26; steps 0; heart rate 255
  > 2021-11-24 09:19: category: 96; intensity 9; steps 0; heart rate 255
  > 2021-11-24 09:20: category: 96; intensity 25; steps 0; heart rate 255
  > 2021-11-24 09:21: category: 96; intensity 3; steps 0; heart rate 255
_char_activity.getHandle(): 17 bytes received, processing them ...
  > 2021-11-24 09:22: category: 96; intensity 1; steps 0; heart rate 255
  > 2021-11-24 09:23: category: 106; intensity 0; steps 0; heart rate 255
  > 2021-11-24 09:24: category: 96; intensity 16; steps 0; heart rate 255
  > 2021-11-24 09:25: category: 96; intensity 21; steps 0; heart rate 255
_char_activity.getHandle(): 13 bytes received, processing them ...
  1. So it looks like that the problem is not in this python repository but on the miband.
    The first 4 minutes are not returned by my miband4.

  2. To make it worse in the midst it is rerequesting activity information for the remaining part (> Fetch data from 2021-11-24 9:6 and it is again skipping the first 4 minutes.

from miband4.

janvda avatar janvda commented on August 25, 2024

I have found the root cause.
There is little bug in following line:

To fix this you need to change

index = int(self.pkg) * 4 + (i - 1) / 4

into:

index = ( int(self.pkg) -1 ) * 4 + (i - 1) / 4

from miband4.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.