I have read that WRT54Gs do have a TTL serial port header on the circuit board. However, you can not attach real world devices to a serial port. So you need something to read voltage data, turn on lights, pumps etc and be able to communicate via RS232. I've seen various RS232 analog and relay boards on the web like www.controlanything.com
but a bit pricy.
There are many different microcontroller options as suggested but with little electronics knowledge this may not be a real option. Depending on the design the WRT54G may be eliminated altogether.
There are lots of single board computers that can run linux with ADCs and other output capabilities etc but again probably do not fall within your budget. http://www.embeddedarm.com/