Here is a simple Automatic Porch light controlled by an LDR and Triac. It automatically turns on in the evening and turns off in the morning. The circuit is too simple and uses Mains voltage directly. It can be enclosed in a plug in type adapter box.
1. Capacitor power supply converts 230 volt AC to around 12 volt DC.
2. When light falls on LDR, it conducts , so Triac will not get gate current and remains off
3. When the light on the LDR ceases, its resistance increase and Triac gets triggering voltage and fires. Lamp then turns on.
4. Lamp should be an incandescent bulb. CFL, Fluorescent lamp etc cannot be used in Triac controlled circuits since they may flicker and damage.
5. Place the unit outside the home where sunlight is available. Light from the lamp should not fall on the LDR.
Caution : High voltage Circuit and Shock Hazard. Do not construct this circuit unless you are experienced in handling AC circuits. 230 Volt AC is directly flowing into the circuit. Do not touch or trouble shoot when it is connected to mains. Power it only after enclosing in a plastic case.