Old 09/10/2009, 06:55 PM     Thread Author   #1 (permalink)
Member

 
Join Date: Jul 2009
Posts: 543
Likes: 78
Thanks: 31
Thanked 352 Times in 97 Posts

Default BatteryMonitor

The Pre battery has never been a strong point. As a result, there has been a good deal of guess work on battery life based on configurations. Should I turn off my GPS, should I keep AIM offline, should I keep my cards open, or close them? There really isn't a good way to determine this right now. And what about new OS versions? Most people can only say it seems better.

What BatteryMonitor does is it tracks battery usage over time. Using this tracked information, it can guess how much battery you lose per hour, how much time you have left, as well as illustrate your battery usage in a graph.

The way I do this is by polling for the battery status at defined times, which you select when you first start the application. As a result, the information isn't very reliable until used for an extended amount of time - I'd say a minimum of one hour. Without this larger sample set, the chance that a one-off skewed data point could muck up the results. I suggest using smaller intervals - but you have to keep in mind that polling every 1 minute also has a small impact on battery. With larger intervals, such as 10 minutes or more, you may need much more data before the numbers normalize.

Graphing is implemented via the google chart API. This means that a data connection is required to download the chart after each update. It is normal for the line to look mostly flat at the beginning, again give it some time before judging results.

The notifications option will send a notification with the current battery level, the drain-per-hour rating and the calculated remaining life after each poll. I suggest not using this if you set your polling time anywhere less than 30 minutes because it will become very intrusive. In fact, I'd probably suggest not using it at all.

The application needs to be running at all times to track the data but can be running in the background. So you are encouraged to do day-to-day use while it is running and see how much battery life your current configuration is using.

Feedback is welcome but I don't plan on modifying this application much. Being my first app, it was more of a learning project than anything else. As a result, I want to focus my efforts on more ambitious endeavors.

The code is free to be reused by anyone should they want to, given that it is NOT for commercial use.

For more information about my project please visit my co-blog, futurepr0n |

Update: Version 1.0.4
Although I have retired this app, StoneRyno has resurrected development and has posted his version (1.0.4) of the app later in this thread on this post:
http://forums.precentral.net/2384316-post187.html

Version 1.0.2
FINAL final version!
- Fixed bug with runtime reporting incorrectly
- Default poll time set to 10 minutes

Version 1.0.1
Sadly, this will be the last effort I put into battery monitor. My interest in homebrew development waned as soon as the official app catalog opened. Also sad is the list of changed features is shockingly sparse.
-Removed capacity since it was unreliable and caused more headache than it was worth
-Removed front page, moved options into the application menu
-The detailed status can also be accessed through the application menu
-The runtime should now report days, and also won't report data that is 0

Note, changing the polling time on the fly takes effect AFTER the last poll completed. So, if you had your interval set to 30 minutes and you change your mind to put it to 5 seconds, you won't see any updated info until the 30 minute poll is honoured. Changing the polling time on the fly may also skew the graphing data.

Although this closes the chapter on my freshman efforts with webOS, it is not my swan song to webOS. There will be new applications, but they will not be spoofing the Palm vendor id, so they can go to the official app catalog.

Thanks to everyone for your continued support and suggestions, and I'm sorry that I couldn't implement most of them.

Download 1.0.1 either from my site or on fileCoaster.




Screenshots:

Last edited by neville; 04/17/2010 at 10:09 AM.
neville is offline   Reply With Quote
Old 09/10/2009, 07:09 PM     Thread Author   #2 (permalink)
Member

 
Join Date: Jul 2009
Posts: 543
Likes: 78
Thanks: 31
Thanked 352 Times in 97 Posts

Default

To give some baselines:

My phone has:
- 3 e-mail accounts syncing on 15 min intervals
- Logged into gtalk constantly
- GPS turned on
- Wifi and bluetooth off

Draining
3.7% DPH (drain per hour) idle usage (check time, random text)
30% DPH while browsing on EVDO

Charging
+25% per hour on usb charger



Post your results and configuration!
neville is offline   Reply With Quote
Old 09/10/2009, 07:17 PM   #3 (permalink)
Member
 
Join Date: Sep 2009
Posts: 16
Likes: 0
Thanks: 1
Thanked 0 Times in 0 Posts

Default

I've been testing it out over the past few days and I gotta say it's actually pretty sweet. Its interesting to see whats going on with the battery and also just curious stuff like whats the temperature. Pretty awesome job dude!
FutureTech is offline   Reply With Quote
Old 09/10/2009, 07:18 PM   #4 (permalink)
Member
 
alvin319's Avatar
 
Join Date: Jun 2009
Location: St Augustine, FL
Posts: 815
Likes: 0
Thanks: 38
Thanked 140 Times in 75 Posts

Default

You are saying that a the card for this needs to be open at all times for it to work?
__________________
If you feel that I have given you worthy advice please feel free to show your support. TY

alvin319 is offline   Reply With Quote
Old 09/10/2009, 07:21 PM     Thread Author   #5 (permalink)
Member

 
Join Date: Jul 2009
Posts: 543
Likes: 78
Thanks: 31
Thanked 352 Times in 97 Posts

Default

Quote:
Originally Posted by alvin319 View Post
You are saying that a the card for this needs to be open at all times for it to work?
Yes, atleast until I find a decent example of how to do headless apps.
neville is offline   Reply With Quote
Old 09/10/2009, 07:46 PM   #6 (permalink)
Member
 
Join Date: Jul 2009
Posts: 110
Likes: 0
Thanks: 19
Thanked 9 Times in 7 Posts

Default

Quote:
Originally Posted by neville View Post
Yes, atleast until I find a decent example of how to do headless apps.
Check out Brightness Unlinked! He just released an update to his app that allowed it to run in the background and he might be willing to help. Great job on what u have done so far.
Dchris222 is offline   Reply With Quote
Old 09/10/2009, 09:09 PM   #7 (permalink)
Member
 
Join Date: Jul 2009
Posts: 5
Likes: 0
Thanks: 1
Thanked 0 Times in 0 Posts

Default

Very cool app. Thanks!
flyr29 is offline   Reply With Quote
Old 09/10/2009, 09:11 PM   #8 (permalink)
Member
 
Join Date: Aug 2009
Posts: 45
Likes: 0
Thanks: 0
Thanked 2 Times in 2 Posts

Default

Hi I install it using web os quick installer and everything does not fit in my window it's off by 1/8". And in the drop down window (polling interval) all of the wording is in a ghost white image . And I have the mugen 3800mah battery pack and I think that it's not reading the total capacity correct...will it read these large extended batteries? It says capacity mah 306.299988. Is that for the total amount of mah left in the batt pack? Or is that reading for the total mah capacity for that battery? Thanks for your reply

Last edited by RINGTONE JOE; 09/10/2009 at 09:23 PM.
RINGTONE JOE is offline   Reply With Quote
Old 09/10/2009, 09:15 PM     Thread Author   #9 (permalink)
Member

 
Join Date: Jul 2009
Posts: 543
Likes: 78
Thanks: 31
Thanked 352 Times in 97 Posts

Default

Quote:
Originally Posted by RINGTONE JOE View Post
Hi I install it using web os quick installer and everything does not fit in my window it's off by 1/8". And in the drop down window (polling interval) all of the wording is in a ghost white image . And I have the mugen 3800mah battery pack and I think that it's not reading the total capacity correct. It says capacity mah 306.299988. Is that for the total amount of mah left in the batt pack? Or is that reading for the total mah capacity for that battery? Thanks for your reply
The battery information is returned from the OS itself. The capacity should be the total size of the battery... not what it's current charge it. If it's reading it wrong... I'm not sure what to tell you.

What doesn't fit on your screen? Do you have a notification like the music player working while you do it?
neville is offline   Reply With Quote
Old 09/10/2009, 09:50 PM   #10 (permalink)
Member
 
Join Date: Jun 2009
Posts: 101
Likes: 0
Thanks: 14
Thanked 13 Times in 8 Posts

Default

Wow! Such a simple idea, yet sooo brilliant. I can't believe no one had done this already. And it works beautifuly. Only suggestion has been mentione, have app run in the background. If you really wanted to put some time into it, you could enable a user confogurable "profile" optiion that also saved the results for that particular config. So users could enter in what they have running and pull that data up later to compare against in order to optimize battery life to the max.
Or you could just have a "profile" button that when clicked, said "get a pen & paper, ya lazi@$$"
Either way.
Thanks & good job
Superstardjal is offline   Reply With Quote
Thanked By: Pokerbrothersstudio
Old 09/10/2009, 10:52 PM   #11 (permalink)
Member
 
Join Date: Aug 2009
Posts: 70
Likes: 0
Thanks: 2
Thanked 6 Times in 3 Posts

Default

Awesome app A+. this will be super handy. Would there be any way that you can add a page to the app that will show the real time drain every few seconds opposed to every 10min? I think it would be nice to have that way you can load up apps and see if any put any extra strain on the battery.
misasi is offline   Reply With Quote
Old 09/10/2009, 11:07 PM   #12 (permalink)
Member
 
Join Date: Jul 2009
Posts: 217
Likes: 1
Thanks: 55
Thanked 31 Times in 21 Posts

Default

Nice job on this app! I had it running during a recharge and it charged at a rate of about 25% per hour.

I second a few of the features mentioned above. Adding the ability to change the sampling rate would be nice for getting finer grained battery data. Also, being able to set up sampling runs that last from when the run is started until the phone is plugged in would be a great way of testing different usage patterns. This of course would also require a way of storing these runs and pulling them up for display. But overall, for a first release this is a great app and I look forward to any coming updates!
Armchair Commando is offline   Reply With Quote
Old 09/10/2009, 11:11 PM   #13 (permalink)
Member
 
Shadavis08's Avatar
 
Join Date: Aug 2009
Location: Ї Ƈøṁε ℉яøṁ ṫɦε ℓαη∂ øḟ ṫɦε øḟḟ ṫø℘ḯ¢ !! NOW BACK OFF !! ltm ltm ltm
Posts: 9,062
Likes: 62
Thanks: 2,254
Thanked 2,775 Times in 2,185 Posts

Default

thanks again for the app it works great , is there any way to run in the background without the card?? that would be nice but still a great tool/app.
__________________
ĦṔ-ḶøØṫ-ŦḯØη
Here is a direct link to webOS Doc for all carriers
http://www.webos-internals.org/wiki/...octor_Versions
P.S. if i have helped you and you are thankful please hit the thanks button to the right---->
Shadavis08 is offline   Reply With Quote
Old 09/10/2009, 11:16 PM   #14 (permalink)
Man of Steelerator (Super Mod)
 
pogeypre's Avatar
 
Join Date: May 2009
Posts: 4,382
Likes: 237
Thanks: 1,768
Thanked 2,611 Times in 1,562 Posts

Default

Where is it pulling the battery temp from?
pogeypre is online now   Reply With Quote
Old 09/11/2009, 12:08 AM   #15 (permalink)
Member
 
DNic's Avatar
 
Join Date: Jun 2009
Posts: 599
Likes: 0
Thanks: 174
Thanked 44 Times in 34 Posts

Default

Trying this and will leave on overnight......but itll be plugged in.
DNic is offline   Reply With Quote
Old 09/11/2009, 01:32 AM   #16 (permalink)
webOS Enthusiast
 
Abyssul's Avatar
 
Join Date: Jul 2009
Posts: 2,128
Likes: 44
Thanks: 41
Thanked 806 Times in 432 Posts

Default

I think I have everyone beat:


GPS on
Auto Locate on
Aim off
Tons of patches/tweaks/cpu scaling

~11% per hour
~15% per hour while heavy texting

I'm kind've waiting for WebOS 1.2 to come out before I start over on my modifications. Although I hate it, I can live with the poor battery life until the new update comes. My phone is useless and boring without the mods.
__________________


If I helped you or you have downloaded one of my files,
then least you could do is click the "Thanks" button.
Abyssul is offline   Reply With Quote
Old 09/11/2009, 01:36 AM   #17 (permalink)
Member
 
Webby_s's Avatar
 
Join Date: May 2009
Posts: 284
Likes: 0
Thanks: 36
Thanked 22 Times in 17 Posts

Default

I am with everyone else in that I would like it running in the background (with card gone) but all in all it looks awesome.
__________________
Still happily rooting my launch 6/6/09 Pre!
(and my wife's)
Webby_s is offline   Reply With Quote
Old 09/11/2009, 03:30 AM   #18 (permalink)
Member
 
Goyena's Avatar
 
Join Date: Nov 1999
Location: Lyon, France
Posts: 758
Likes: 23
Thanks: 72
Thanked 100 Times in 60 Posts

Default suggestions...

@neville
GREAT app. In case you do decide to put more of your time into it, a suggestion based on the comments above - record the configuration automatically:
  1. which radios are on (CDMA, GPS, WIFI)
  2. reception power and type (# bars, 3G/EVDO)
  3. number and/or which apps running
That's a lot of info, but I believe it could be incorporated easily in the graph. For the radios, you could use different colored blocks piled vertically behind the graph's line. Same for the reception - perhaps use a red block instead of a pink one if on 3G, and just put the number of bars in the block. Number 3 above might be fun for statistics-freaks, but perhaps the hardest to implement and represent?
__________________
Pixi Plus - Pre Plus - Pre 2 - Pre 3 - Touchpad 1 ;-)
Goyena is offline   Reply With Quote
Old 09/11/2009, 08:40 AM     Thread Author   #19 (permalink)
Member

 
Join Date: Jul 2009
Posts: 543
Likes: 78
Thanks: 31
Thanked 352 Times in 97 Posts

Default

Wow! I'm a little overwhelmed with the response my little test app is getting right now.

Thanks to everyone (over 4000 now?) who have tried my app, special thanks to those who have posted feedback here and even bigger thanks to those who provided suggestions.

As I stated in my first post, I really wanted to close the books on this app for other new and exciting webOS projects but all of your feedback has inspired me to crack open the project and make some enhancements.

All of you had great suggestions, and I do plan on implementing as many as I can. However, a lot of the features lay in that "undiscovered" category of webOS so far. I'm not sure how to get running processes for example, but getting signal strength and so on shouldn't be an issue.

Running in the background is another thing high on my priority list. And maybe some better predictive logic for remaining battery life, since right now it can report some vastly inaccurate results if you do something very battery-intensive followed by an idle.

I'd also like to implement the depot and take snapshots by time that can be saved and loaded by comparison... again this is all in my every-growing wishlist.

In regards to those of you who asked for a finer polling time - you can select as small as 1-minute from the first screen. I originally had 1-second as an option but found it intensive for graphing.

Again, thanks to everyone and please keep the comments going.
neville is offline   Reply With Quote
Thanked By: DJeremyC
Old 09/11/2009, 09:09 AM   #20 (permalink)
Member
 
Join Date: Jun 2009
Posts: 118
Likes: 0
Thanks: 4
Thanked 6 Times in 5 Posts

Default

Great app!

Question though, how accurate is that? I don't mean that as an insult, but I just turned the app on. The battery percentage reported by the pre itself (and as reported UI %) is 100% but teh actual % reported by the app is 95%. Is the 95% value real?

Also, I have Seidio's 2600mah battery, yet your app says my capacity is 661.599976.
KallDrexx is offline   Reply With Quote

 

Content Relevant URLs by vBSEO 3.6.0