It is a long way between what is illegal and what people think is illegal.
The problem with solar these days is it feeds the grid directly. The grid goes down and you can still be feeding it. Therefore a lineman can get shocked. That may be why some solar setups are illegal. That does not include the endless home owner associations covenants.
In theory the same it true of a generator if you do not open the power company's main feed line at the fuse box.
If you have the type of solar power system that feeds a battery bank and uses and inverter to coverts the battery power to AC inside your house, you may be free standing and independent of the commercial lines, depending on how your system is set up.
There are numerous types of solar systems available these days, so it is hard to judge.
If your neighborhood is struck by a hurricane why would you expect a solar collector to withstand the storm. Likewise, a solar unit big enough to power your TT essentials is doable. A solar electric system big enough to power your TT's air conditioner in the Keys, may be not.
Without shade or electricity, in the sun my TT becomes a large Easy Bake oven. :)
Good Luck