Thats how I did it with the exception of the batteries. I have 16 Northstar Blue 210ah AGMs connected to 3 growatt 5000es inverters. 18000watts of used cheap solar panels and an 18kw generac. I run off solar, then battery, the grid. If the grid goes down and the batteries deplete after sundown, the generac starts up and runs everying and charges the batteries. Once the growatts see the batteries are charged, the generac will stop. Hopefully by then the grid or sun will be back up.
All my power runs through the growatts and the generac auto transfer switch. Grid power comes from the meter to a disconnect panel then to a sub panel with 30amp breakers to each growatt. Power comes out of each growatt to its own 30amp double breaker in another sub panel. Each auto transformer is connected to its own breaker in this same panel. This sub panel feeds the generac panel, and straight to the disconnect at the house. The way I put this together it backups the backup, and I can disconnect or isolate any part of the system. I switched my electric plan to txu free nights and solar days and use the timers on the growatts to take advantage of free off-peak electricity to run the house and charge the batteries.
I also have a separate system to power my water wells and keep my 50amp camper powered using 6kw of panels and an MPP Solar LVX 6048 hooked to a bunch of walmart deep cycle batteries.