Just a note of caution.
I had some work done on my place that required updating my electric service.
The local Edison guys came out to upgrade the in-ground transformer at that time too. BTW, one of the most professional group of workers I have ever seen.
I mentioned to one of the workers that my neighbor had just installed a generator that would kick in automatically if/when the power would go down.
They made a quick trip next door to make sure the work was done right and it wouldn't energize the main line rather than the neighbors house.
I guess if you bubba it, you can mis wire something that could cause damage and/or injury.
When we had our whole-house generator installed, our city-owned electric utility had to do the final inspection and approval.
This is our electrical service connection before the installation:
And after:
The big box contains the all-important automatic transfer switch to prevent backfeeding into the city's electrical system. It also contains load shed relays to keep the generator from being overloaded, plus an emergency shutdown switch. Despite the latter, our city also requires a second, external "Big Red Button" shutdown switch. Impressive, eh? Not a job for amateurs!