My main problem is identify when the Lamp is High when used by Switch. I cant get the current lamp status.
Does someone have idea/documentation how todo this? Some pages mean to use optocoupler, but I have no idea.
best regards,
Carlos




You must have additional components to safely isolate the mains from your RPi. I think the light sensor suggestion is probably easiest to implement safely.carloscesario wrote: My idea is not usage additional components in curent environment. Eg add Sensors in each environmet.
Probably more than one component per room. Enough components to determine the lamp status by measuring light, applied mains voltage, etc) and to signal that back to your Pi in a safe manner -- safe for humans and computers. You could detect the voltage at the relay common contact, but you MUST isolate that and convert it to a safe voltage (Pi inputs need 3.3V). Probably the simplest way is a mains operated relay which mimics the lamp, switching a GPIO input with an internal pull-up to ground. But be very careful.carloscesario wrote:Hmmm, but with tis I will need add one component in each room.
Does exist another alternative ?