Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Battery life issues #43

Open
krystophv opened this issue Feb 11, 2015 · 1 comment
Open

Battery life issues #43

krystophv opened this issue Feb 11, 2015 · 1 comment

Comments

@krystophv
Copy link

krystophv commented Feb 11, 2015

I've had a Pebble watch for quite some time and have enjoyed the week-long battery life that comes with it. When I started using the Nightscout watchface, I noticed my battery life drop to maybe 2 to 3 days, at best. On Facebook, I've seen people regularly report that they need to charge their Pebble daily.

Upon reviewing the code, it seems that the watchface is essentially polling the Nightscout website backend every minute. This means bi-directional communication over Bluetooth and network requests from the cell phone every minute for data that we know will only ever be updated every 5 minutes. This seemed like overkill to me, so I've forked the codebase and set up the poll to happen 5 minutes and 30 seconds after the most recent reading received, so we're not wasting battery and data getting information that we know we've already got.

This seems to vastly improve battery life. I wanted to open an issue and try to get some feedback on the topic before I make a PR from my fork, however, to ensure that I haven't overlooked something simple that would be essential to hit the data endpoint once a minute.

In the event that there is a problem receiving data, my edits will poll once a minute until it gets another BG value and then wait for 5 minutes and 30 seconds after that value was reported.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/8501116-battery-life-issues?utm_campaign=plugin&utm_content=tracker%2F2453141&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F2453141&utm_medium=issues&utm_source=github).
@jasoncalabrese
Copy link
Member

Sounds like a good and simple improvement to me, @YYGIRL do you see these issues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants