rpdom and grahamed, my grateful thanks. After a bit of fiddling, the controller is working perfectly, using a 4N25 optocoupler.
For the benefit of anyone else trying this, I have added a photo, showing one optocoupler wired up to my controller.
This is what I have found out.
It is not obvious from the datasheet of the 4N25 which way round it goes.
I found out by trial and error that, holding the 4N25 with the writing the correct way up, the top row, L to R, is Base, Collector, Emitter. My device is using the orange and yellow wires, connected to C and E. As my colleagues said, it is a 50/50 guess which way round these go. Don't
forget this fact, if it doesn't work first time.
The bottom row is then Anode, Cathode and erm, NC. I have connected GPIO pin 17 using a red wire through a resistor to the anode, cathode to ground on the Pi (black wire) and that's it.
Thanks again, rpdom and grahamed. Brilliant help.