You are not logged in.

#26 2009-03-21 12:25:52

genisis300
Member
From: Uk
Registered: 2008-01-15
Posts: 284

Re: Batterymon -- a simple battery monitor ideal for openbox etc

thats a very good point. i'll take a look at the battery_design as you did.

Regards
Matthew


"is adult entertainment killing our children or is killing our children entertaining adults?" Marilyn Manson

Offline

#27 2009-03-25 00:14:53

genisis300
Member
From: Uk
Registered: 2008-01-15
Posts: 284

Re: Batterymon -- a simple battery monitor ideal for openbox etc

I've now added 64bit support to the pkgbuild now and also changed from using the Charge_full to charge_design_full as pointed out. this should get a true reading now.

Let me know if you have any problems
Regards
Matthew


"is adult entertainment killing our children or is killing our children entertaining adults?" Marilyn Manson

Offline

#28 2009-03-25 13:22:20

nsb
Member
From: Switzerland
Registered: 2008-03-26
Posts: 57

Re: Batterymon -- a simple battery monitor ideal for openbox etc

Thank you for your effort!

But I observed something quite strange:

When charging or discharging the battery, suddendly charge_full becomes the refrence for battery_now instead of charge_full_design.

So I think the first way to solve the problem (just giving 100% back, if the status gets higher than 100%) seems to be the better way. Furthermore I discovered, that the output of "acpi -b" gives the information one really needs. So if you know how to extract information from this output, you might be able to save some effort to get the right number.

Regards

nsb

Offline

#29 2009-03-26 16:12:35

TheRedFox
Member
Registered: 2009-02-15
Posts: 36

Re: Batterymon -- a simple battery monitor ideal for openbox etc

my thinkpad also uses energy_full and energy_now. I edited the batterymon file in /usr/bin, and it seems to work fine now. gotta love python. lol.

Offline

#30 2009-03-27 12:36:40

daedhel
Member
From: Québec, Canada
Registered: 2009-01-17
Posts: 40
Website

Re: Batterymon -- a simple battery monitor ideal for openbox etc

This really is a great monitor. I like it much better than the one provided with LXDE. When I hover it with the mouse or when I left-click it, I only get the percentage of the battery remaining, not the time remaining. Is there a switch to add to the monitor command to have it?

Thanks,
Daedhel

Last edited by daedhel (2009-03-27 17:44:04)

Offline

#31 2009-03-27 13:26:47

genisis300
Member
From: Uk
Registered: 2008-01-15
Posts: 284

Re: Batterymon -- a simple battery monitor ideal for openbox etc

i'm working on that but i'm trying to work out the best way to-do it. i think the gnome panel work it out based on how long it takes to drop 1percent.

i'll see if i can work this out and get back to you.

Regards
Matthew


"is adult entertainment killing our children or is killing our children entertaining adults?" Marilyn Manson

Offline

#32 2009-03-27 17:25:15

MarCustomized
Member
From: Detroit, MI
Registered: 2008-09-05
Posts: 116

Re: Batterymon -- a simple battery monitor ideal for openbox etc

This would probably be at the very bottom of your todo list, but I would fly to wherever you are to shake your hand if you added optional use of libnotify.

Offline

#33 2009-03-27 21:47:49

genisis300
Member
From: Uk
Registered: 2008-01-15
Posts: 284

Re: Batterymon -- a simple battery monitor ideal for openbox etc

so you get the popup like every other power manager?

thats actualy not that hard to-do.

I've been a little busy the last couple of days but i'm planning on doing some work this weekend.

i'm very open to suggestion regarding improvments etc.

P.S i will fix the Thinkpad thing this weekend along wit the bug that NSB has reported.

Cheers
Matthew


"is adult entertainment killing our children or is killing our children entertaining adults?" Marilyn Manson

Offline

#34 2009-03-29 15:39:40

SiD
Member
From: Germany
Registered: 2006-09-21
Posts: 729

Re: Batterymon -- a simple battery monitor ideal for openbox etc

I get this error:

More than one battery was found please pass -b BAT[number]
using battery BAT0
 as default
/sys/class/power_supply/BAT0/status
Charging

Traceback (most recent call last):
  File "/usr/bin/batterymon", line 243, in <module>
    tray=systray()
  File "/usr/bin/batterymon", line 69, in __init__
    self.update()
  File "/usr/bin/batterymon", line 134, in update
    per = int(round(self.percent()))
  File "/usr/bin/batterymon", line 82, in percent
    FILE=open(batpath+BATnumber+"/charge_full_design","r")
IOError: [Errno 2] No such file or directory: '/sys/class/power_supply/BAT0/charge_full_design'

Ok, I checked it and the file /sys/class/power_supply/BAT0/charge_full_design does not exist on my system.

If I start it with the -b option I get this error with both -b BAT0 and -b BAT1

Traceback (most recent call last):
  File "/usr/bin/batterymon", line 243, in <module>
    tray=systray()
  File "/usr/bin/batterymon", line 69, in __init__
    self.update()
  File "/usr/bin/batterymon", line 133, in update
    cmd = self.status().strip()
  File "/usr/bin/batterymon", line 73, in status
    FILE=open(batpath+BATnumber + "/status","r")
IOError: [Errno 2] No such file or directory: '/sys/class/power_supply//status'

Seems the FILE=open line does not work correctly...

p.s.
I used the 0.5.8-3 PKGBUILD version.

Offline

#35 2009-03-29 16:19:42

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: Batterymon -- a simple battery monitor ideal for openbox etc

Would it be possible to include the remaining discharge time in the tool tip?


Website - Blog - arch-home
Arch User since March 2005

Offline

#36 2009-03-29 19:23:50

genisis300
Member
From: Uk
Registered: 2008-01-15
Posts: 284

Re: Batterymon -- a simple battery monitor ideal for openbox etc

Sid could you post the contents of /sys/class/power_supply/BAT0 for me?

pther that is on my to-do list.

Regards
Matthew


"is adult entertainment killing our children or is killing our children entertaining adults?" Marilyn Manson

Offline

#37 2009-03-29 21:21:32

SiD
Member
From: Germany
Registered: 2006-09-21
Posts: 729

Re: Batterymon -- a simple battery monitor ideal for openbox etc

ls -l /sys/class/power_supply/BAT0/

-rw-r--r-- 1 root root 4096 29. Mär 23:20 alarm
-r--r--r-- 1 root root 4096 29. Mär 23:11 capacity
-r--r--r-- 1 root root 4096 29. Mär 23:11 current_avg
-r--r--r-- 1 root root 4096 29. Mär 23:20 current_now
lrwxrwxrwx 1 root root    0 29. Mär 23:20 device -> ../../../ACPI0002:00
-r--r--r-- 1 root root 4096 29. Mär 23:11 energy_full
-r--r--r-- 1 root root 4096 29. Mär 23:20 energy_full_design
-r--r--r-- 1 root root 4096 29. Mär 23:11 energy_now
-r--r--r-- 1 root root 4096 29. Mär 23:20 manufacturer
-r--r--r-- 1 root root 4096 29. Mär 23:20 model_name
drwxr-xr-x 2 root root    0 29. Mär 23:20 power
-r--r--r-- 1 root root 4096 29. Mär 23:11 present
-r--r--r-- 1 root root 4096 29. Mär 23:11 status
lrwxrwxrwx 1 root root    0 29. Mär 23:20 subsystem -> ../../../../../../../../../../class/power_supply
-r--r--r-- 1 root root 4096 29. Mär 23:20 technology
-r--r--r-- 1 root root 4096 29. Mär 23:20 temp
-r--r--r-- 1 root root 4096 29. Mär 23:20 type
-rw-r--r-- 1 root root 4096 29. Mär 23:11 uevent
-r--r--r-- 1 root root 4096 29. Mär 23:20 voltage_min_design
-r--r--r-- 1 root root 4096 29. Mär 23:11 voltage_now

Offline

#38 2009-03-29 21:42:37

genisis300
Member
From: Uk
Registered: 2008-01-15
Posts: 284

Re: Batterymon -- a simple battery monitor ideal for openbox etc

Hi Sid,
do you own a thinkpad?

this has come up and is my 1st thing to fix.

should be an update in the next few days.

Sorry about the delay.


"is adult entertainment killing our children or is killing our children entertaining adults?" Marilyn Manson

Offline

#39 2009-03-29 22:12:46

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Batterymon -- a simple battery monitor ideal for openbox etc

Just take it cool, you'll do it when you get the time...


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#40 2009-03-29 23:48:16

genisis300
Member
From: Uk
Registered: 2008-01-15
Posts: 284

Re: Batterymon -- a simple battery monitor ideal for openbox etc

okay i think i have fixed both issues.
i've now added support for thinkpad Laptops (at least i think i have) if you could let me know if it works okay
i've also fixed the problem with the -b option that Sid was having but would affect anyone using the -b option.

let me know how you get on.

i'm going to start work on the time remaing part next.

Thanks
Matthew


"is adult entertainment killing our children or is killing our children entertaining adults?" Marilyn Manson

Offline

#41 2009-03-30 09:42:23

SiD
Member
From: Germany
Registered: 2006-09-21
Posts: 729

Re: Batterymon -- a simple battery monitor ideal for openbox etc

Hi,

The -b Option issue seems fixed.

But  there is a typo in line 91. I get this error.

  File "/usr/bin/batterymon", line 91, in percent
    FILE=open(batpath+BATnumber+"/engergy_now","r")
IOError: [Errno 2] No such file or directory: '/sys/class/power_supply/BAT0/engergy_now'

After changing

FILE=open(batpath+BATnumber+"/engergy_now","r")

to

FILE=open(batpath+BATnumber+"/energy_now","r")

it works here. wink

p.s.
My laptop is a AcerExtensa3001WLMi.

Last edited by SiD (2009-03-30 09:43:57)

Offline

#42 2009-03-30 12:09:16

genisis300
Member
From: Uk
Registered: 2008-01-15
Posts: 284

Re: Batterymon -- a simple battery monitor ideal for openbox etc

Thanks i'll fix that.

Regards
Matthew


"is adult entertainment killing our children or is killing our children entertaining adults?" Marilyn Manson

Offline

#43 2009-03-31 16:17:01

froli
Member
From: Germany
Registered: 2008-06-17
Posts: 455

Re: Batterymon -- a simple battery monitor ideal for openbox etc

Nice project, using it right now!

Last edited by froli (2009-03-31 17:14:06)


archlinux on Macbook Pro 10,1

Offline

#44 2009-03-31 23:08:25

genisis300
Member
From: Uk
Registered: 2008-01-15
Posts: 284

Re: Batterymon -- a simple battery monitor ideal for openbox etc

Thanks smile i'm working with kremso at the moment on a new and improved version smile


"is adult entertainment killing our children or is killing our children entertaining adults?" Marilyn Manson

Offline

#45 2009-04-01 00:11:40

MarCustomized
Member
From: Detroit, MI
Registered: 2008-09-05
Posts: 116

Re: Batterymon -- a simple battery monitor ideal for openbox etc

In the name of all that is righteous and pure, please don't stuff it full of Gnome deps.

Last edited by MarCustomized (2009-04-01 00:12:02)

Offline

#46 2009-04-05 07:38:59

iosonofabio
Member
From: Australia
Registered: 2008-10-09
Posts: 105

Re: Batterymon -- a simple battery monitor ideal for openbox etc

Hi! your project seems incouraging, but I would suggest to add support for AC-adapters.

When I start batterymon without a battery (i.e. only with AC plugged-in), the program won't start at all. It would be better to start it showing an icon of an adapter, or something similar. Info about presence of the adapter can be found (obviously) in /proc/acpi/ac_adapter/AC .

Cheers,
Fabio

Offline

#47 2009-04-05 10:29:56

genisis300
Member
From: Uk
Registered: 2008-01-15
Posts: 284

Re: Batterymon -- a simple battery monitor ideal for openbox etc

Hi,
me and tomas are currently rewritting most of the program at the moment. It now uses the hal interface to get all it's infomration like ac adaptor status time remainging etc.
it now also has optinal notification support and the gnome icon them. as soon  as we are finished i will let everone on here know. it's looking promising and is still realy light on dependancies.

Regards
Matthew


"is adult entertainment killing our children or is killing our children entertaining adults?" Marilyn Manson

Offline

#48 2009-04-06 07:08:40

froli
Member
From: Germany
Registered: 2008-06-17
Posts: 455

Re: Batterymon -- a simple battery monitor ideal for openbox etc

Can't wait for the next release! Continue your nice job guys!


archlinux on Macbook Pro 10,1

Offline

#49 2009-04-06 15:49:12

Lars Stokholm
Member
From: Denmark
Registered: 2009-03-17
Posts: 223

Re: Batterymon -- a simple battery monitor ideal for openbox etc

Nice app, but as it is /sys/class/power_supply doesn't seem to take something like tp_smapi into account (at least I think that's it):

/sys/class/power_supply/BAT0/status:Full <-- this is wrong
/sys/class/power_supply/BAT0/energy_full_design:84240000
/sys/class/power_supply/BAT0/energy_now:38620000
/sys/devices/platform/smapi/BAT0/remaining_percent:47
/sys/devices/platform/smapi/BAT0/start_charge_thresh:40
/sys/devices/platform/smapi/BAT0/state:idle
/sys/devices/platform/smapi/BAT0/stop_charge_thresh:80

(using settings from here)
Perhaps using hal will take care of this, but in case it doesn't, now you know. smile

Offline

#50 2009-04-12 18:54:14

Eax
Member
From: Denmark
Registered: 2009-02-04
Posts: 40
Website

Re: Batterymon -- a simple battery monitor ideal for openbox etc

Hi there smile Awesome program that fills a gap wink

Just wondering, what's the "theme" name it's looking for? Is it just "default" or the gtk theme/openbox theme I use? smile

When using:

./batterymon.py -t default -b BAT1

I get:

Theme not found please check the name and try again!

Thanks in advance smile

Last edited by Eax (2009-04-12 18:57:05)

Offline

Board footer

Powered by FluxBB