I was sent to work on a lighting control system on a multi million dollar house that overlooks the San Francisco bay. The last thing that I ever expected to open the door and find was this little home built beauty. It seems like it would have been a lot less trouble for the electrician to just buy a real lighting panel.
The guy that built this thing and wired the house has since disappeared and can't be reached.
The cans at the bottom appear to be standard low voltage lighting control relays. Those are usually dual coil latching relays--one coil is pulsed on to turn the lights on, and the other is pulsed to turn them off.
The enclosure may be homebrew (not even sure about that), but that PC board sure isn't. There should be a manufacturer's name or model number on it somewhere, and a Google search might find info on it.
The input and output wiring, while messy, should be easy enough to trace out once you have an idea how the PC board and the relays function.
Well they tried, at least there is a rubber grommet ( thats falling out) on the bottom left that most of the wires are passing through instad of a sharp edged hole... but man, what a mess! that wooden " backplate" has to go too LOL
Wood backplates are sometimes seen in low voltage/telecom enclosures. They certainly make mounting additional components in the field easy (no drilling/tapping, and no worries about wayward chips shorting anything out).
Hoffman provides them in some of their datacom cabinets. I have installed a bunch of these: