The black wire seemingly going to nowhere at the top of the second picture concerns me.
The 12 AWG in the same terminals as what seems to be ~3AWG concerns me too. I don't know where the ~3AWG is going to or coming from, but if that 12AWG ever wants to take the load of 3AWG, things will not go all that well. The good news is that it seems to all be staying in the panel box so if it burns your house might not go with it.
BINGO ! Somehow you got it all right. Why we have two meters is beyond me. Also the left meter, between the 10kw system is required, and I had to pay for it! My main problem is of course the power company. Sometime after they started gathering renewable energy credits, they realized they had given away their profit. Ever since then, they had been lowering the payback for excess power... When it gets to the point where I have to pay ANYTHING, batteries will flow into the system and they will flow OUT! 73 Dick
This is a fascinating setup and I have studied it a bit.
I think this is how it works:
The larger wires, which the OP says are 6 AWG, pass through the safety switch and then go to the Tesla Wall Connector, passing through a current sensing device in the second box, which when current is passing turn on a relay.
The 12 AWG wires, which are hanging loose in the photo showing the box with the relay, come from his 4 KW solar system inverters, and just pass through the bottom of the safety switch on their way to the solar box, then are connected to 15 amp fuses (not shown in photo), then to one side of the double pole relay (through the WAGOs), which then feeds the energy back to the load side of the safety switch through additional 12 AWG wires. (His photos are before all this was finished being hooked up.)
This way he avoids problems with his POCO which has a ~10 kW limit on the amount of power he can send to them. He is producing more power than he is using, but of course has to use power from the POCO at night.
Switching on the 4 KW system only when his Tessie is charging ensures that he will never send more than the ~10 KW that his POCO allows. I think he could have connected the 4 KW system up at his main panel as long as when it is operating the Tessie is charging which would ensure that he would never send more than ~10 KW to the POCO, but there might be some POCO reason, or something, that would make doing that not desirable.
My solar is a little simpler, my two 7.8 kW inverters just connect, through a fused safety switch, to the load side of my electric meter. Since we have net metering here in Florida, which is trued up annually, and my solar does not produce even 1/2 of the power we use, I just feed excess power to FP&L when it is making more power than I use (which is not very often!), and take power from FP&L for everything including the power I use to charge our Tessies.
So for every kWh of energy I send to my POCO, I get a 1:1 credit for every kWh of energy I take from my POCO, unless at the end of the year I have sent the POCO more than I have taken for the entire year, which in my case will not happen.
In summary, I really send my POCO very little energy. My solar mainly reduces the energy I buy from my POCO, but again, any energy I do send to the POCO during the few times it is producing more energy than we are using at that instant in time nets against the energy from the POCO on an 1:1 basis.
Whilst the exact electrons I am using to charge our two Tessies do not necessarily come from my solar system, it does not matter in my situation because it is netted. Were I to be producing more solar energy than I could use, it would matter because if you produce more power than you consume in Florida, FP&L only pays the generation cost, not the retail cost, of the power at the annual true-up. In that event I would try and use all the power that I was generating by shifting my usage to the times I was producing the most solar energy, or bank it in some Tesla Power Walls.
At least this is how I understand it works in Florida.