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 Levels added to Monitor and Pebble #47

Closed
wants to merge 64 commits into from
Closed

Battery Levels added to Monitor and Pebble #47

wants to merge 64 commits into from

Conversation

m2oore
Copy link

@m2oore m2oore commented Jul 21, 2014

Added some code to be able to view Battery Levels of the CGM Uploader to the CGM Monitor and Pebble Watch.

Battery Levels are uploaded as a new element in the Mongo DB.

@jasoncalabrese
Copy link
Member

Like the pebble we should make sure this works when the data isn't available, probably best to show nothing then

@m2oore
Copy link
Author

m2oore commented Jul 21, 2014

Agreed...was thinking about modifying the logic for it to be more like the pebble.

@m2oore
Copy link
Author

m2oore commented Jul 21, 2014

Made the requested change. If no battery level data it will hide the Div...otherwise it will show the battery level.

@rnpenguin
Copy link
Contributor

Currently the uploader does not send battery.

@m2oore
Copy link
Author

m2oore commented Jul 21, 2014

Not yet. I will upload that piece of code from my local copy to gitHub when
I get home.

On Mon, Jul 21, 2014 at 2:01 PM, rnpenguin [email protected] wrote:

Currently the uploader does not send battery.


Reply to this email directly or view it on GitHub
#47 (comment)
.

Jonathan Moore

@m2oore
Copy link
Author

m2oore commented Jul 21, 2014

I do have one question. I am adding a battery value to the Mongolab. I think I am seeing more documents being created because of this but I would like to know if this might be an issue? I guess once I upload the CGM uploader code to github you guys can take a look and tell me if I am doing something wrong.

@brianhanifin
Copy link
Contributor

I’ve only worked on the website side of things, but I would think we would only want the battery status to be updated every time the reading changes (what is that like every 10-15 minutes)?

The more document are created, the quicker the user will hit this storage limit (I believe it is 300mb on mongolabs). Assuming the oldest data gets purged automatically when this limit is reached, then the user’s history will be a little shorter than it could have been. At least that is my interpretation of things. 

@m2oore
Copy link
Author

m2oore commented Jul 25, 2014

Made some addition changes to the code to clean up what I did. Created a document where Battery Level is only updated on that one document. That way there is not multiple documents being created to store that one value. It will be good as well as you can use it for other values such as GPS cords or the name of the uploader device so you know which phone is uploading data.

Anyway take a look and see. I have been testing it on my test local copy and has been working well. Just pushed it to my live side on my son's end and will post any problems if I come across any.

@jasoncalabrese
Copy link
Member

this is really old, still don't have battery on the webmonitor, but would probably be best to do that from scratch since there have been lots of updates since this

sulkaharo pushed a commit that referenced this pull request Aug 28, 2019
jamorham referenced this pull request in jamorham/nightscout-vps Dec 10, 2022
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.

4 participants