This is a note for anyone trying to replicate or make sense of the factory trailer wiring harness.
I know there are easier ways of doing it (than replicating), but there isn't a better way of doing it than with the use of relays and all. However, trying to replicate the factory harness has been doing my head in every time I have looked at it in the last couple of months. So I eventually gave in last week and ordered the factory harness. I picked it up for a pretty penny or two ($320) on friday and noticed at the time that the bag had a large tear in it as if it had been opened but thought nothing of it as a quick look suggested all the bits were there.
Next morning I went out to install it and discovered that the plastic on three of the plugs was completely shatered so that they were unusable, it was like something really heavy had been dropped on it. I was pretty cheesed off as I wanted to get the wiring sorted on the weekend, which is why I went for the factory harness. Before taking it back I thought ... the package was already open so I might take a look at the install manual and see if it solves my questions. Sure enough the mystery was solved (more below). So I took the broken harness back to the dealer, the parts guy took one look at it and when I said I wanted to get it sorted out on the weekend there was no question about a refund. I went from there straight to Jaycar and bought most of the parts, an auto shop a few doors up solved the remaining parts and I made up the harness and installed it over the weekend.
The mystery I had was to do with powering the relays. I could work out what each of the pins controlled on the 8 pin plug at the rear where the factory harness plugs in, and I had established that the smaller 3 pin plug beside it powered the two relays. But for the life of me I couldn't work out how to get power into that 3 pin plug or which pin should have the power in it, was it the red or white wire? I've learnt to never start into something until I fully understand it, in case I'm missing something significant. Experience is a hard teacher. So yes I could have just run power to the rear but I wanted to understand.
The install manual (scan below) solves the problem, there are actually three harnesses to connect when you get a factory trailer wiring setup. The trailer harness proper at the back, a small harness in the passenger footwell and another short harness in the engine bay. These other two short harnesses make the red cable at the rear in the 3 pin plug go live (presume though I didn't test it). Step 10 below describes connecting a short harness and earth ring in the passenger footwell and step 11 and 12 connecting a short harness between the battery positive terminal and a plug behind the passenger headlight.
Now that I understood what was going on there was no need to frig around with the passenger footwell harness or engine bay harness. I ran a new cable in conduit through the passenger chassis rail that takes power to the rear and returns to an earth point near the back of the passenger headlight. In my slightly better than factory setup this powers 4 relays (better than factory 2 relays): left turn, right turn, stop, number plate (also thinking about a 5th for reversing lights). Each of the relays is switched from me tapping into and soldering wires onto the wires at the rear of the 8 pin plug that the factory harness goes into. All in all happy camper with a quality DIY job for about a third of what the dealer wanted. (parts list below image)
Parts
* 4 SPDT 30amp relays (30a is overkill but jaycar were out of 5a or 10a on the day - ideally I would have got SPST but again not available so I just blanked off the middle pin)
* small waterproof project box
* 16 female spade plugs to fit two sizes of pins on the relays
* 10m of 10mm conduit
* 6 pin waterproof auto connector (not necessary bu handy if I ever need to remove my harness from the ute)
* 12m of single core 18AWG cable (12m=2m x6m there and back, probably could have gone 1 size smaller on the cable but this will allow for reversing lights if I ever get around to it)
* terminal block for various connections in the project box
* 2 medium sized ring terminals
* inline mini blade fuse holder
* 10amp mini blade fuse
* 7 pin flat trailer plug (female) with 1m of 7 wire
* packet of cable ties
* roll of electrical tape