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

Check the Remote Battery Periodically and Report to Low Battery Topic #244

Merged
merged 7 commits into from
Dec 14, 2020

Conversation

krkeegan
Copy link
Collaborator

@krkeegan krkeegan commented Dec 11, 2020

This requires merging #240 first.

This is a new feature which will check the battery level for 2342-xxx remotes at most once every 4 days. The device is generally asleep, so the message is sent just after receiving a message from the device when it is awake. This means you will not get battery warnings from devices that you do not use.

If the battery voltage is low, a message will be emitted to the Low_Battery topic.

  • Linting passes
  • Unit tests were updated and pass
  • Documentation was updated
  • Command line functions were added
  • Works well in a test environment, attempting to drain the battery on a remote, but actually testing would take a while

Closes #49

This will check the the battery voltage of compatible remotes
at the most every 4 days.  The length is a constant that could be
changed easily.  4 days seemed reasonable.

The battery is deemed to be low if it is below 3.4v.  This is also
a constant that can easily be changed.

This uses the same low_battery topic from Battery Sensor
@krkeegan
Copy link
Collaborator Author

I am trying to determine what the low battery voltage should be. I made a simple script that keeps querying the database trying to run out the battery. So far I estimate it has sent 10,000 messages and still appears to be about 3.55v. Once I have a good number this should be good to do as well.

@krkeegan
Copy link
Collaborator Author

3.4v seems like a reasonable low battery level. The device works down to at least 3.36v but the voltage seems to be dropping faster now, so it seems like this is the tail end of the curve.

As an aside, these things really run for a long time on a single charge. The docs say 9-12 months. While testing this, I figure there have been 20,000+ messages sent from this device and I have kept it awake for many hours now in order to drain it down. The self discharge rate of Li-Ion is very good, so I would guess that a infrequently used device could last years, even a frequently used one probably lasts much longer than a year.

@krkeegan krkeegan linked an issue Dec 14, 2020 that may be closed by this pull request
@krkeegan krkeegan merged commit 91da7dd into TD22057:dev Dec 14, 2020
@krkeegan krkeegan deleted the Remote_Battery branch December 17, 2020 20:27
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

Successfully merging this pull request may close these issues.

Support for battery reporting on Mini-Remote 4
1 participant