maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Pybattery - battery statusbar applet with candies (https://talk.maemo.org/showthread.php?t=24905)

lemmyslender 2009-01-07 14:06

Re: Pybattery - battery statusbar applet with candies
 
Thanks, that did the trick. I don't know why but none of the versions have ever saved the settings for me. Only a minor annoyance.

412b 2009-01-13 12:29

Re: Pybattery - battery statusbar applet with candies
 
0.3.5-rc1
- ADDED: autoupdate for almost all updatable items
- FIXED: Some minor bugfixes
- WARNING: Candidate version with quite large cpu consumption

It is neither a stable version nor recommended update.
I just want to get some feedback about improvements and cpu consumption.

412b 2009-01-14 18:16

Re: Pybattery - battery statusbar applet with candies
 
0.3.5-rc2
- ADDED: autoupdate for almost all updatable items
- FIXED: Some minor bugfixes
- ADDED: Light sensor support for N810
- UPDATED: Acceptable CPU consumption now

It is neither a stable version nor recommended update.
I just want to get some feedback about improvements and cpu consumption.

allnameswereout 2009-01-14 20:15

Re: Pybattery - battery statusbar applet with candies
 
If I replace my original Nokia battery with Mugen, is the battery estimate then still right? What if I replace them back? Or back and forth?

412b 2009-01-14 20:35

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by allnameswereout (Post 257603)
If I replace my original Nokia battery with Mugen, is the battery estimate then still right? What if I replace them back? Or back and forth?

It's an interesting question. No testing and feedback are available yet. It all depends on HAL and battery module. I hope, they can get the things right.
So it would be really great, if you test it ;)

Benson 2009-01-14 20:58

Re: Pybattery - battery statusbar applet with candies
 
Since it uses the same estimate as the Nokia applet, it doesn't give valid times remaining. % capacity is largely correct, but it doesn't know capacity is over 2x as much hours.

412b 2009-01-14 21:17

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by Benson (Post 257616)
Since it uses the same estimate as the Nokia applet, it doesn't give valid times remaining. % capacity is largely correct, but it doesn't know capacity is over 2x as much hours.

Added to Fix-It for 0.3.5

Benson 2009-01-14 21:26

Re: Pybattery - battery statusbar applet with candies
 
Is 0.3.5 going to use its own algorithm for estimating runtime left, then? Or am I missing something?

allnameswereout 2009-01-14 21:40

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by 412b (Post 257609)
It's an interesting question. No testing and feedback are available yet. It all depends on HAL and battery module. I hope, they can get the things right.
So it would be really great, if you test it ;)

That is what I'm doing right now, but this is hard to do objectively because the usage paterns differ. :(

412b 2009-01-14 21:53

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by Benson (Post 257632)
Is 0.3.5 going to use its own algorithm for estimating runtime left, then? Or am I missing something?

I'm still thinking about own time left algorithm (TLA)... On the one hand it would great not to deal with Nokia's time left stuff anymore, on the other hand... On the other hand AP is splitting into 2 packages:
- Advanced Power Monitor (APM) (a daemon (still written in Python, but C looks more and more attractive), which gets all the info and uses D-Bus to notify about changes and get values). Mainly for cross-project and cross-application usage. I want to keep APM lightweight as much as it can be using Python for such things.
- Advanced Power (GUI's statusbar item).
That splitting is my #1 at the moment. To my mind implementing a statistics based TLA is the thing to be done, but I'm not sure, if it gonna be in APM-0.3.5, may be in APM-0.3.6.
In fact ideas about other possible algorithms are welcomed ;)

412b 2009-01-14 21:57

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by allnameswereout (Post 257637)
That is what I'm doing right now, but this is hard to do objectively because the usage paterns differ. :(

Can you post the output of
Code:

hal-device /org/freedesktop/Hal/devices/bme | grep reporting.design
command?

allnameswereout 2009-01-14 22:25

Re: Pybattery - battery statusbar applet with candies
 
stock battery,
battery.reporting.design = 1540 (0x604) (int)
mugen,
battery.reporting.design = 1546 (0x60a) (int)

BrentDC 2009-01-15 00:25

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by 412b (Post 257642)
I'm still thinking about own time left algorithm (TLA)... On the one hand it would great not to deal with Nokia's time left stuff anymore, on the other hand... On the other hand AP is splitting into 2 packages:
- Advanced Power Monitor (APM) (a daemon (still written in Python, but C looks more and more attractive), which gets all the info and uses D-Bus to notify about changes and get values). Mainly for cross-project and cross-application usage. I want to keep APM lightweight as much as it can be using Python for such things.
- Advanced Power (GUI's statusbar item).
That splitting is my #1 at the moment. To my mind implementing a statistics based TLA is the thing to be done, but I'm not sure, if it gonna be in APM-0.3.5, may be in APM-0.3.6.
In fact ideas about other possible algorithms are welcomed ;)

Heh, kinda funny. Just the other day, in another thread, I have taken up the task of writing a better battery_level and time_left algorithm; it is being written in python, also.

At this point I just wrote a simple script that polls retu every minute and records the data into an Openoffice importable csv file (so I can graph results). All of this is for research purposes so I can better understand how the battery works so I can better predict how long it'll last.

I'll let you know if I come up w/something.

edit: here's the aforementioned mentioned thread: http://internettablettalk.com/forums/showthread.php?p=257324

pton 2009-01-15 03:58

Re: Pybattery - battery statusbar applet with candies
 
Hi, one feature suggestion. I would like to be reminded to charge the battery when it fall under a certain percentage, say 25%. If you could change the battery icon (say different color or something prominent), then it would be easy for me to tell whether its time to charge or not. :) Oh, it would be best if you could make the 'Reminder to charge' value changeable by end user.

davidgro 2009-01-15 04:17

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by pton (Post 257717)
Hi, one feature suggestion. I would like to be reminded to charge the battery when it fall under a certain percentage, say 25%. If you could change the battery icon (say different color or something prominent), then it would be easy for me to tell whether its time to charge or not. :) Oh, it would be best if you could make the 'Reminder to charge' value changeable by end user.

Adding to this suggestion, I would prefer a loud sound -- it should even max out the volume temporarily -- and with repetitions if ignored (perhaps once every 5% drop unless I acknowledge it?). Most of the time my tablet is in a coat pocket, (which I am usually not even wearing) so sound is the only way to get attention.

Also, the icon color change would would hard to do for those of us using the other themes (Thank you 412b for that by the way, it works great - especially "Use GTK theme" which I noticed keeps the charging animations)

tso 2009-01-15 14:02

Re: Pybattery - battery statusbar applet with candies
 
one thing tho, from what i have noticed, the battery warning sound will basically not play while the screen is of, as that makes the applet sleep, and therefor not register battery changes...

Benson 2009-01-15 14:44

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by davidgro (Post 257720)
Adding to this suggestion, I would prefer a loud sound -- it should even max out the volume temporarily -- and with repetitions if ignored (perhaps once every 5% drop unless I acknowledge it?). Most of the time my tablet is in a coat pocket, (which I am usually not even wearing) so sound is the only way to get attention.

If added, that had better be a configurable option. I'd hate to be listening to music on earphones with the volume set to ~20%, and have the tablet suddenly cranked up to max just to deliver an ear-shattering beep. And indeed, if I have my tablet muted, or turned way down, because I'm in a meeting, I might not want it screaming about it's battery through the speakers, either...

ciroip 2009-01-16 14:51

Re: Pybattery - battery statusbar applet with candies
 
Im completely new to the batteries business and relative tla algorithms (+ the tablet uses are probably really different from a traditional laptop and relative power optimizations), anyway I like the idea to have a graph (like brent). I already have a working graphic battery status with samples every minute in my flipclock (its lovely watch the consume patterns) but I was thinking to cross the battery numbas with the status of the cpu (I know the cpu% change too fast for a 1 minute samples but at least maybe it will enough to recognize a particular intensive tablet use (watching movie/listen audio/ streaming audio/gps,,, and so on), Ill keep you update.
I dont understand anyway why my battery % is always a bit different from the advpow. Im using the code from pybatterystatus and I didnt try to analyze it at all (just happy to have some numbers to show). Note that the actual version in garage just show some dummy numbers

412b 2009-01-16 23:46

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by tso (Post 257776)
one thing tho, from what i have noticed, the battery warning sound will basically not play while the screen is of, as that makes the applet sleep, and therefor not register battery changes...

O_o
Just in inactive mode battery drain is much less and battery changes are not so frequent...

So... Summarizing all the things above...
|AP (Advanced Power) 0.3.6|
1. Gonna be added configurable battery alert notification:
- With turning alert on/off
- With choosing sound for playing
- With option to turn on/raise volume on battery alert (also with on/off option)
- Icon will be changed to appropriate, when AP alerts
2. (or 0.3.7) User controlled event handling (e.g what progs to run on charger in, battery low, some other...).
3. (or 0.3.7) Commands executing and creating shortcuts for commands.

|APM (Advanced Power Monitor) 0.4.1|
1. Perhaps, new experimental TLA (time left algorithm) for battery.
2. Some more info, perhaps.


AP 0.3.5 and APM 0.4.0 will be released in a hour.

412b 2009-01-17 00:56

Re: Pybattery - battery statusbar applet with candies
 
Advanced Power 0.3.5:
- ADDED: autoupdate for almost all updatable items
- FIXED: Some minor bugfixes
- ADDED: Light sensor support for N810

Advanced Power Monitor 0.4.0:
- Initial release.

tso 2009-01-17 01:00

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by 412b (Post 258186)
O_o
Just in inactive mode battery drain is much less and battery changes are not so frequent...

quite possible...

i guess that whats confusing me is when i pick up the tablet after not using it for a night and is greeted by the red battery icon and a warning sound...

ciroip 2009-01-17 04:40

Re: Pybattery - battery statusbar applet with candies
 
as I said I love the idea t have a fast way directly on the tablet to visualize the battery recent history. I have this working on last release (Im not sure how reliable are these numbers) but at least I can see when some app use 'too much' power and have an idea of recharging time in different 'real life' situations.
https://garage.maemo.org/frs/downloa...tterygraph.jpg

412b 2009-01-17 10:46

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by ciroip (Post 258230)
as I said I love the idea t have a fast way directly on the tablet to visualize the battery recent history. I have this working on last release (Im not sure how reliable are these numbers) but at least I can see when some app use 'too much' power and have an idea of recharging time in different 'real life' situations.

Well, now you can play a bit with APM as it provides battery changes in single D-Bus signal and simple iface to get value. I'm thinking of logging battery history too. In a bit different way, but still much common to your goal.

ciroip 2009-01-17 15:00

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by 412b (Post 258252)
Well, now you can play a bit with APM as it provides battery changes in single D-Bus signal and simple iface to get value. I'm thinking of logging battery history too. In a bit different way, but still much common to your goal.

great, in case I could 'steal' your log data and stop caring about the 'quality' of my numbers. The tablet's left (menu) bar seem perfect for this kind of infos weird i could not find a lot of info about accessing that space but as traspare from my post in not a programmer so I probably missed something.

vinc17 2009-01-21 16:36

Re: Pybattery - battery statusbar applet with candies
 
There's a major problem with advanced-power. After upgrading omweather, each time I rebooted, I got the following error: Operation temporarily disabled due to low memory, and a white background. Removing omweather did not solve the problem (so, it wasn't the cause). No problem after removing advanced-power (and the boot is also much faster).

412b 2009-01-21 16:41

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by vinc17 (Post 259072)
There's a major problem with advanced-power. After upgrading omweather, each time I rebooted, I got the following error: Operation temporarily disabled due to low memory, and a white background. Removing omweather did not solve the problem (so, it wasn't the cause). No problem after removing advanced-power (and the boot is also much faster).

I have no telepathy skills ;)
Device? OS version? AP, APM version?

vinc17 2009-01-21 17:07

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by 412b (Post 259074)
Device? OS version? AP, APM version?

N810, 5.2008.43-7. But I don't remember the AP version. Probably 3.4-2.

EDIT: The latest version (0.3.5 / 0.4.0) doesn't seem to have the memory problem (for the moment), but the boot is still much slower.

pelago 2009-01-21 18:47

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by 412b (Post 257642)
AP is splitting into 2 packages:
- Advanced Power Monitor (APM)...
- Advanced Power (GUI's statusbar item)...

I suppose it's quite old now so maybe it's not too much of a problem, but whenever I read APM (especially in relation to power), I think of the thing on PCs before ACPI. I can't think of a better name right now, though.

tso 2009-01-21 20:01

Re: Pybattery - battery statusbar applet with candies
 
the boot is slower simply because this is a python app, so the system have to first load the interpreter...

412b 2009-01-21 20:25

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by pelago (Post 259118)
I suppose it's quite old now so maybe it's not too much of a problem, but whenever I read APM (especially in relation to power), I think of the thing on PCs before ACPI. I can't think of a better name right now, though.

And I can't figure out a better name, too...
So it's called APM at the moment, may be later it can change name.

prk60091 2009-01-21 20:45

Re: Pybattery - battery statusbar applet with candies
 
I have noticed an increase in posts about battery related issues in the past several weeks.

After pulling my remaining hairs trying everything including a reflash and putting no applications on the n810 and when my problems didnt go away I bit the bullet and bought a new battery.
my tablet started having issues when the battery was about 10 months old (or new)

since replacing it with an oem battery purchased on amazon i have not had a single issue. i bought my tablet end of november 2007-

just an idea to pursue....

tso 2009-01-21 21:45

Re: Pybattery - battery statusbar applet with candies
 
im considering it as i bought my N800 used. but im not sure what battery exactly is in it, as i had a wsod 770 that had the same type of battery, and i tried to swap them around for a while...

could maybe do that again, but its quite possible that i have damaged the stored battery as i left it on low charge (not sure, been a while).

vinc17 2009-01-21 22:15

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by tso (Post 259147)
the boot is slower simply because this is a python app, so the system have to first load the interpreter...

I doubt that 15 seconds are needed to load the interpreter. Or is python so inefficient?

tso 2009-01-21 22:24

Re: Pybattery - battery statusbar applet with candies
 
iirc, yes it could very well be. but im no expert on the subject...

qwerty12 2009-01-23 17:58

Re: Pybattery - battery statusbar applet with candies
 
@412b

I've made debian source packages for advanced-power & advanced-power-monitor for the Mer project:
http://repository.mer.tspre.org/pool...dvanced-power/
http://repository.mer.tspre.org/pool...power-monitor/

If you have any plans to get it in extras, thought it may help. Also, I've made it use the proper method (well, I guess one clean method) of introducing new gconf keys to the system - a schema file. dh_gconf run as part of rules adds entries to postinst etc automatically which imports the schema file when installed.

advanced-power-monitor is basically like your original package except I get dh_installinit to add entries to the postinst which make the symlinks in rc2.d etc to start apmd up automatically instead of having raw symlinks in the package.

bunanson 2009-01-28 02:47

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by prk60091 (Post 259161)
I have noticed an increase in posts about battery related issues in the past several weeks.

After pulling my remaining hairs trying everything including a reflash and putting no applications on the n810 and when my problems didnt go away I bit the bullet and bought a new battery.
my tablet started having issues when the battery was about 10 months old (or new)

since replacing it with an oem battery purchased on amazon i have not had a single issue. i bought my tablet end of november 2007-

just an idea to pursue....

Try run mplayer or media player or any av files, mine would battery would go belly up very soon.... How long can your NEW battery run, try leave it on WorldTV99, after a complete fresh charge up?
TIA,

bun

prk60091 2009-01-28 03:01

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by bunanson (Post 260345)
Try run mplayer or media player or any av files, mine would battery would go belly up very soon.... How long can your NEW battery run, try leave it on WorldTV99, after a complete fresh charge up?
TIA,

bun

i will let you know tomorrow- i will start it up when i get to work and see what happens

attila77 2009-01-28 13:56

Re: Pybattery - battery statusbar applet with candies
 
Just for comparison, my battery that came with the unit is 9 months old, the backup (original nokia) 6, I don't swap that often (maybe once a week), and get a very similar performance from both, about 4 hours of mplayer video playback (with my admittedly re-encoded avis).

thorbo 2009-01-28 15:05

Re: Pybattery - battery statusbar applet with candies
 
Good to know. I have my original battery (bought my n800 the day before they were released) and I generally play high quality videos or streaming audio at work. It will only play audio for a couple of hours, and if I try to download a file via the network from one of my shares, I will almost kill the battery for 500 MB download. So, perhaps time for a new battery. Granted this is all quite anecdotal, but I have noticed that "it sure isn't what it used to be".

prk60091 2009-01-28 16:15

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by prk60091 (Post 260349)
i will let you know tomorrow- i will start it up when i get to work and see what happens

i got to work late this am (snow bad traffic etc) when i put my n810 on my desk at 9:30 (chicago time) according to advanced power applet i had 96% of battery left 7 hours active time and 10d idle

i connected via wifi to our new router (office now has wifi- yea!) and connected via WorldTV99 to CNN and i am letting it run after 42 minutes advanced power says: 71.5% battery 8d idle time and 2h active time.


i will check back later this am


All times are GMT. The time now is 20:48.

vBulletin® Version 3.8.8