Red to 1, yellow to 3, neutral to 2. Earth to LHS terminal marked with the striped downward arrow earth sign. This assumes that the wires you describe are in fact connected to live, switched wire and neutral at the other end (at programmer or wiring centre ( If in doubt, with the suply safely...