AC LINE VOLTAGE DETECTOR

I was willing to create a tool with arduino (home project) that it records the time (hours: minutes: seconds) when the lamp are turned off (off) and also when the lamp is turned on (on), which will the data log also directly recorded into SDCard / computer , it will record log data in 10 different rooms, please help what do I need to build such a device, thanks.

If you could, very carefully, tap off the Line and Neutral lines and pass them through a transformer and DC rectifier to drop it down to a DC voltage that won't have you ordering an Arduino, you could simply use the ADC to determine if the voltage is above a given threshold. Depending on how precise your timing requirements are you may want to grab a real time clock chip.

I would look into some adapter or pass through device that plugs into the wall outlet first, and then you plug your appliance into this adapter. That way you can still use your appliances later if you stop logging.

Be careful if you connect your PC to the Arduino while it's connected to line voltage. Make sure you know what you're doing with the electrical ground.