A couple of things.
The shutoff is often on the positive as if there is a short to ground, your ground shut off switch will not shut off the power. I believe for Lithium batteries, one should have a switch to disconnect the shunt from the battery due to an issue with a full discharged battery and the small amperage draw of the shunt/metering system. I do not believe this is an issue for lead acid batteries.
The AC wires are hot (black), common or neutral (white) and ground (green or bare) for typical ROMEX wire. You can/should connect the AC ground to the battery negative terminal. You can ground it through the frame or via a bus bar or using the ground bus bar in the distribution panel.
Check this site for transfer switch wiring diagram.
There is also a great topic on the pd4045 (
http://tnttt.com/viewtopic.php?f=30&t=6 ... 5#p1241628) - connecting AC, shore, converter to the battery, etc.
The 30 AMP outlet is a 30 amp inlet and should connect transfer switch (one AC input).
The inverter's AC side should also be connected to the transfer switch (second AC input).
The transfer switch has an AC connection to the distribution panel (the transfer switch's AC output; the distribution panel AC input)
Your transfer switch is selecting between one of two power sources. You are either using the 30 amp inlet (shore power or a generator) or the inverter.
The inverter is also connected to the battery. I would add a fuse on the positive side just before the inverter. You also want to have a switch for the battery positive to the inverter, so you can turn off the inverter when not in use. Inverters do draw power even without an AC load.
You should read up on inverters here. Lots to think about in terms of power draw, type of inverter ie sine vs square wave, etc. Due to the small size of the batteries, people often do not attempt to run the AC side via an inverter. An inverter can be plugged in via a DC outlet to run small AC devices for short periods. And unplugged when not in use.
I would also add a fuse on the positive terminal of the battery.
Grounding to the frame is fine. However be aware, if the trailer is screwed together, different parts of the frame may not be electrically connected to each other. People often use two wires for each DC appliance. Not really that much more expensive and it ensures a ground.
I would use only GFCI AC outlets. The cost differential is pretty small. Think like you are using AC power in a bathroom. Running water everywhere. One might think about GFCI circuit breakers - belt and suspenders solution.