There is a Smart Battery specification which most laptop battery manufacturers follow. It's all hooked into the system management bus (A subset of I2C basically) and you should be able to access the battery via the ACPI interface that way.

Using a 12V light bulb overnight isn't a good idea with newer batteries with this amount of intelligence. If the microcontroller in the battery gets confused then it will lose it's calibration data. Some of it can be regenerated by the battery but some can only be calculated by the factory.

Deep cycling Li-Ion batteries will damage them. They won't be able to hold a charge. A prime example is the morons at Compaq that decided to make it possible to totally drain the batteries in iPaq's which in turn kills the PDA...

- Trevor