I made a pcb to control a electric shutter. When it gets to dark outside it closes and when it’s back light enough it opens again. There are also 2 inputs for manual overwrite with a switch.
The light sensor is a LDR, the motor to operate the shutter is a 230V tube motor specially designed for this purpose (it has end stops build in).