You've already got a solution, and often the cheapest solution is the one you already have.
There's no technical reason a generator + battery (and solar?) setup couldn't be configured to run off battery till the battery reaches a preconfigured state of charge then call for the generator.