Joel,
You can achieve this and it is actually more simple than you might expect. At a clients request, I installed an transfer switch, and an inverter/charger that had an internal transfer. Now, if there was shore power, the system would chose that, if there was no shore power, the inverter would fill the need, and if the house bank went down or the load exceeded that inverter's capacity, the genset would fire up and go on line. The only thing missing was that the inverter sense circuit didn't always want to turn off the genset and take up the load with the house bank.
Matt