two reds go to loop. one black is neutral on black is switched live (make sure u id this as live ie red tape).
switch red to COM, black to L1 ( again id this as live)
fan cable, red to loop, yellow to switched live ( id as live), blue to neutral, make sure these are the same in the fan and...