The security light comes on when the light falls below a certain level (set in the program although with the addition of a preset potentiometer, it could be adjustable. Once the light has come on, it stays on for a fixed period (see previous comment) then continues on for a (pseudo) random period. It then goes off for a fixed period. Then it waits for the light level to rise above a threshold (if night hasn’t ended already) before the whole process starts again. To reset, turn off the power (at the original wall switch) and if the light is dim enough, the light will come on.
The general costruction details are shown right. I have connected to the 230v supply with an in line plug and socket so that I can easily remove the lantern with its circuit for any work which may be necessary.