The Powerwall can be configured a full offgrid mode and you can charge the powerwall with some generators. You need to contact tesla in order to provide you with the list of generators that allow this. For this cases, you need at least two powerwalls and you cannot connect the system to the grid.