Hey, just a suggestion but you could also just unplug the camera from the Pi's USB rather than turning it on and waiting the 5 seconds. If it's unplugged, gphoto won't detect it. You could then even splice in a switch to the Vcc line on the USB cable and turn it on, off when you want.