Only at extremely high cost.
The ability to tie this all into the grid is not feasible at this time. Perhaps it can be in the future. The problem is in shutting down the grid and bringing it back up. You have to be able to shut down each contributor to the grid and isolate them from the grid. It is very difficult in practice, though it sounds easy.
I have one of those systems. It generates more than I use. It is tied into the grid. When the grid goes down, the system is shut down. Including battery charging into the system is expensive, and not so easy to do. Not impossible, but currently, residential systems which are tied into the grid are shut down when the grid goes down, so as to prevent repair crews from being fried.