Skip to content

Battery life issues #43

@krystophv

Description

@krystophv

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions