Starting an Home Automation project

a relay is used to turn on / off lights, isn't it?

Often a relay is a good choice yes.

And if I'm not wrong I can also check if the relay is turned on or off.

Use a double-pole relay and use the spare pole to read the relay status, or keep a variable in RAM that tells you what the current state is.

Where can I found an example code about it?

DigitalWrite (relayPin, HIGH); should about do it.

how can I control the power of the light to make them more ligher or less?

I assume we're talking AC mains. Normally a Triac can be used to adjust the brightness. It can also be used to turn on/off the light so in this case it's a better choice than a relay.

However, a normal triac is not isolated from the mains (that's bad) but you can get opto-isolated versions that are or just use an opto-coupler.

I can use relay but I don't understand if it's a standard eletronic component or if I need to build one like this:

You need to do as the PDF says or something equivalent. But that's not "building a relay", it's just controlling one.

How can I develop and manage them? What do I need to do that (the elettronic parts). Are there some "already made" (something that is developed for arduino) parts to use?

You need to develop a "network" of some kind. Given the number of times we get asked this I'm surprised nobody is ever interested in posts about new networks :), maybe there's already too many around.


Rob