Jump to content


BLifePlugin v0.3 - homescreen plugin for remaining operating time calculation

- - - - -

  • Please log in to reply
16 replies to this topic

#1
Vitaly Lysenkov

Vitaly Lysenkov

    Newbie

  • Members
  • Pip
  • 7 posts
  • Devices:T-Mobile SDA, I-Mate sp5m
BLifePlugin v0.3 has been released!
Posted Image Posted Image
The BatteryLife Plugin (BLifePlugin) gathers and aggregates battery discharge statistics. It then calculates the remaining battery life with the current battery charge and current time of the day. The more days you use the plugin, more accurately it will predict the remaining time. Two or three days will be generally enough to see that it really works! If it has no statistics (stat file name is invalid, for example), time is evaluated as most battery plugins do - linear approximation based on the current discharge and the passed time.

BLifePlugin also shows a day average discharge graph, time to reach 100% when charging and other cool stats.

The plugin is compact with Smartphone devices running Windows Mobile 2003 (SE) and later with any screen orientation (portrait or landscape) and any resolution (from old 176×220 to current QVGA or even higher). The plugin was successfully tested on my T-Mobile SDA (running WM2003 SE) and I-Mate SP5m (running WM5).

Visit www.accosto.com for further information and the download page to get the installation package!

Edited by Paul (MVP), 07 March 2007 - 08:37 PM.


#2
Vitaly Lysenkov

Vitaly Lysenkov

    Newbie

  • Members
  • Pip
  • 7 posts
  • Devices:T-Mobile SDA, I-Mate sp5m
Here are screenshots (see bottom plugin line):
Posted Image , Posted Image


#3
MHHD

MHHD

    Newbie

  • Members
  • Pip
  • 3 posts
This seems like a cool product.  Does anyone have an experience with it?


#4
Vitaly Lysenkov

Vitaly Lysenkov

    Newbie

  • Members
  • Pip
  • 7 posts
  • Devices:T-Mobile SDA, I-Mate sp5m
For all guys having trouble with screen fonts, text position, etc.

BLifePlugin v0.3 released.

Changes:
  • (new) some standard plugin parameters added. font-face, font-size, font-weight, fgcolor, bgcolor, padding-left, padding-right, padding-top are now parsed both from and tags (plugin has more priority, of course).
  • (new) CPU load monitoring added. Plugin background will be painted with HighCPULoadBgColor when the average CPU load exceeds HighCPULoadPercent.  It is very useful to see if any background application consumes  significant amount of CPU thus leading your device to drain more  battery power.
  • (new) GetSystemPowerStatusEx will be called when  GetSystemPowerStatusEx2 fails. But Voxtel W210 still doesn't work with  this standard API. A kind of magic...
  • (fix) for PocketPC (use my PluginAdapter to run this plugin on  PocketPC): now all the time the device has been in 'sleep' mode is  considered as working. Per-hour discharge percent will be calculated as  all discharge divided by hours.
Please refer to Description or Download page.


#5
PaulOBrien

PaulOBrien

    It's My Party

  • Founder
  • PipPipPipPipPipPip
  • 32,945 posts
  • Gender:Male
  • Location:Norwich, UK
  • Devices:Galaxy Nexus / TF Prime
  • Twitter:@paulobrien
Very nice, I like it!

I'm going to post this in news shortly ;)

P

You can follow me on Twitter - http://twitter.com/paulobrien / Follow MoDaCo on Twitter - http://twitter.com/modaco / Follow MoDaCo Android on Twitter - http://twitter.com/modacoandroid

Want to donate? MoDaCo is raising money for the Multiple Sclerosis society.

Posted Image


#6
roma0803

roma0803

    Addict

  • Members
  • PipPipPipPipPip
  • 654 posts
  • Location:The Netherlands
  • Devices:Samsung Omnia II/Nokia N82
Does not work on the i-mate SPL (as most of the other battery monitors). It will lock the phone if the homescreen plugin is selected.

When I die, I want to die like my grandfather, who died peacefully in his sleep. Not screaming like all the passengers in his car.

#7
looeee

looeee

    Diehard

  • Members
  • PipPipPipPip
  • 434 posts
  • Devices:O2 Graphite, HTC s730
Great plugin ... many thanks


#8
farker

farker

    Newbie

  • Members
  • Pip
  • 8 posts
  • Location:West Yorks
  • Devices:SPV c500
Anyone using the battery life blifeplugin on an o2 xda graphite? Is it working?

I have it running but it does not collect any data. It correctly shows the percentages on the home screen but just show a load of "unknown" on the stats page


#9
am0k

am0k

    Newbie

  • Members
  • Pip
  • 11 posts
is there any way to make the background color transparent when selected ??

Mpx 200 - WM5

#10
Vitaly Lysenkov

Vitaly Lysenkov

    Newbie

  • Members
  • Pip
  • 7 posts
  • Devices:T-Mobile SDA, I-Mate sp5m

View Postam0k, on May 6 2007, 22:24, said:

is there any way to make the background color transparent when selected ??
No - at this time. Will make it soon.

P.S. PocketPC version released.
http://www.modaco.co...PC-t255198.html


#11
Vitaly Lysenkov

Vitaly Lysenkov

    Newbie

  • Members
  • Pip
  • 7 posts
  • Devices:T-Mobile SDA, I-Mate sp5m

View Postfarker, on Apr 18 2007, 19:42, said:

Anyone using the battery life blifeplugin on an o2 xda graphite? Is it working?

I have it running but it does not collect any data. It correctly shows the percentages on the home screen but just show a load of "unknown" on the stats page
I think, first of all you should check if StatFilename is defined correctly. Can you just create the file with this path+name in your favourite File Manager?


#12
tobbbie

tobbbie

    Regular

  • Members
  • PipPip
  • 106 posts
  • Location:Germany
  • Devices:Tornado (+ see signature)
Hi Vitaly,

... I have the plugin running since a few days now and I just cant't figure out the logic for the graph shown.

You mention it is the average power consumption that is drawn. I wonder about several things:

1.) where are new data added?
- left side of the graph (shifting the old graph to the right)
- right side of the graph (shifting old graph to the left)
The CPU monitors that I know from the PC are adding data at the right end and are shifting old data left.

2.) what is the scale of the x-axis? It seems like 24h with 1h ticks, 6h main + moving 0:00 marker.
- How does this scale shift (right or not at all?)
- does it shift synchronous with the data drawn (from my casual observation it does not)?
- why does the 0:00 marker not shift along with the other scale (the intersection shows the current time?)

3.) what is the scale of the y-axis (mA)?
- Is it depending on the maximum ever reached?
- can you indicate the absolute value (in mA)?
- I suppose high value means high discharge?
- what happens if charging is done in parallel, can I see this from the graph?

4.) Are you planning to add other graphs using the same timescale so you could browse through the graphs?
I could imagine the following:
- Battery % (weighted derived from Voltage I think?)
- Battery voltage (would reflect charge + discharge, bottom value should not be 0 but correlate to 0% capacity)
- Battery charge current draw (in the same graph as discharge but different scale?)
- CPU usage
-

thanks for the tool anyway :-)

bye
tobbbie
:-)


#13
tobbbie

tobbbie

    Regular

  • Members
  • PipPip
  • 106 posts
  • Location:Germany
  • Devices:Tornado (+ see signature)

View Posttobbbie, on Jul 3 2007, 11:45, said:

Hi Vitaly,

... I have the plugin running since a few days now and I just cant't figure out the logic for the graph shown.

You mention it is the average power consumption that is drawn. I wonder about several things:

1.) where are new data added?
- left side of the graph (shifting the old graph to the right)
- right side of the graph (shifting old graph to the left)
The CPU monitors that I know from the PC are adding data at the right end and are shifting old data left.

2.) what is the scale of the x-axis? It seems like 24h with 1h ticks, 6h main + moving 0:00 marker.
- How does this scale shift (right or not at all?)
- does it shift synchronous with the data drawn (from my casual observation it does not)?
- why does the 0:00 marker not shift along with the other scale (the intersection shows the current time?)

3.) what is the scale of the y-axis (mA)?
- Is it depending on the maximum ever reached?
- can you indicate the absolute value (in mA)?
- I suppose high value means high discharge?
- what happens if charging is done in parallel, can I see this from the graph?

4.) Are you planning to add other graphs using the same timescale so you could browse through the graphs?
I could imagine the following:
- Battery % (weighted derived from Voltage I think?)
- Battery voltage (would reflect charge + discharge, bottom value should not be 0 but correlate to 0% capacity)
- Battery charge current draw (in the same graph as discharge but different scale?)
- CPU usage
-

thanks for the tool anyway :-)

bye
tobbbie
:-)

Just made 4 screenshots that show that the graph data are simply unchanged and the 0:00 marker moves right.
Attached File  batplug_10_03.jpg   30.99K   33 downloads Attached File  batplug_10_36.jpg   30.46K   26 downloads
Attached File  batplug_12_06.jpg   31.87K   27 downloads Attached File  batplug_17_43.jpg   33.97K   26 downloads

I noticed a slight change in the graph for the last picture, but there is no moving graph as I would expect.

My XML in the homescreen is:

<!-- Here is the BatteryLife plugin -->
StatFilename="\My Documents\BLifeHistory.dat"
HighCPULoadPercent="70"
RefreshTimeout="120000"
MaxHistoryDays="30"
FlushTimeoutHours="1000" >


I checked the datafolder which I have set to "My Documents" and it contains the file BLifeHistory.dat looking like:

[version 1]
2007.6.25.13:0
2007.6.25.23:3,1,1,0,1,2,0,3,1
2007.6.26.11:0,0
2007.6.26.20:2,2,0,1,0,1,2,0,1,1,2,0,1,1,1,0,1
2007.6.27.20:1,1,1,0
2007.6.28.2:3,1,1,0,3,0,2,1
2007.6.28.15:6,0
2007.6.28.22:4,1,2
2007.6.29.2:3,1,1,2,5
2007.6.29.9:5,3,4,4,4,4,3,1,3,1,1
2007.6.30.10:2,1,4,3,1,1,2,0,2
2007.6.30.20:2,5,5
2007.7.1.12:3,1,2,1,1,2,0,1,1
2007.7.2.0:4,0,1,1,1,2,1
2007.7.2.12:1
2007.7.2.15:5,1
2007.7.3.0:2,2,1,0,2,1
2007.7.3.7:3,4
2007.7.3.22:2,1,1,1,3,0,1,2,5,2,1
2007.7.4.14:4,0

Initially there was a huge block intermitted (between 2007.6.27 and 28) from the date 2005.10.4.... with a lot of 0 behind it. This was due to a battery-removal when I lost the current time/date. I have deleted these lines from the file, did a reboot, but nothing has changed since then.

Any hint what I can do?

bye
tobbbie
:-)

Edited by tobbbie, 04 July 2007 - 04:31 PM.


#14
tobbbie

tobbbie

    Regular

  • Members
  • PipPip
  • 106 posts
  • Location:Germany
  • Devices:Tornado (+ see signature)
I have deleted the history file and now I see that the graph is drawn left to right and the moving marker seems to indicate the current time on the 24h scale. Looking at the values drawn however, I cannot detect a correlation to the device activities, ecpecially not for interactive use of the device.

Can you tell please how you derive the average current draw from the battery?
- Is it an average (from how many samples?) of the "BatteryAverageCurrent" value?
- how many samples are you keeping where (in memory?) for the graph?
- can you detect values when the homescreen is not in foreground, i.e. other applications are?
- how long does it take until I can see a current draw from the battery on the graph (e.g. I start listening to music)?

bye
tobbbie
:-)


#15
tobbbie

tobbbie

    Regular

  • Members
  • PipPip
  • 106 posts
  • Location:Germany
  • Devices:Tornado (+ see signature)
I wonder if the calulation is usefull if you derive it as well from the time that the device is connect AND charging.

As you account only the dis-charge rate for estimations, but the device is not loosing battery-power while beeing charged, the data may not be reflecting the truth, especially if you have the device connected to the PC via USB during the day.

This leads to two effects:

- the discharge is high as constant sync is happening. This alone will decrease the remaining time of availabilty dramatically
- the charge via USB is not accounted for in the graph

Consequently the graph is not giving a represenation what is going on with the battery in reality.
As well is the estimated time until battery-empty too short, as it is based on the current draw while connected.
So both "pages" of information deliver data of limited quality in my case.

Hm... I think I will observe a little more and then remove the plugin again as it does not cover my use-habits.

bye
tobbbie
:-)


#16
tobbbie

tobbbie

    Regular

  • Members
  • PipPip
  • 106 posts
  • Location:Germany
  • Devices:Tornado (+ see signature)
OK, so finally I dropped the plugin due to missing information on how the logic is working; however I derived the following:

1.) There is only one (1) value per hour calculated and stored
2.) The values from previous days are averaged with the current day, so the graph shows the average day consumption and NOT the last 24 hours

Its a pity, but well there is room for improvement...
bye
tobbbie
:-)


#17
tobbbie

tobbbie

    Regular

  • Members
  • PipPip
  • 106 posts
  • Location:Germany
  • Devices:Tornado (+ see signature)
I finally found a program that tracks the thing right (and a lot more) acbtaskman.
You find it at: http://www.acbpocketsoft.com/
bye
tobbbie
:-)





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users