Look at www.networkupstools.org.
This is a project aimed to support as much UPSes as possible under different platforms and architectures and provide a single interface to clients. It is very flexible. And it can be compiled for WL500g Premium. I use these tools with a USB UPS attached to my own router. (I'm also one of the developers.)
If you have any questions, feel free to discuss them in the project's mail lists:
http://www.networkupstools.org/lists/