DPDT Toggle switch and Arduino timer

Apologies I've taken a photo of the basic schematic I've drawn for clarity.

The solenoid that is not controlled through the arduino is controlled directly through the switch and is coloured in Red. (Valve #1). That one works fine and performs as expected.

The one I am having the coding issues with is Valve #2 which runs though the relay.

Regards