Detecting lights on/off for home automation - Page 1
Forum section: electronics / beginners

author: symbianas
author_rank: Regular Contributor
timestamp: September 03, 2024, 01:35:56 pm
content: Hi, I want to detect light on/off events and send MQTT message. I discovered that "Shelly Plus PM Mini" power monitor device might be suited for this case, but sadly I have N and L wires available only after the switches and before lights, so I assume this device is not good for me? any other ideas how I could detect light on/off status?

author: themadhippy
author_rank: Super Contributor
timestamp: September 03, 2024, 01:45:52 pm
content: if its just on or off hows about measuring the current with a current tranformer

author: unseenninja
author_rank: Regular Contributor
timestamp: September 03, 2024, 05:54:44 pm
content: If you control the light with your home automation system, you already know if it is on or off.If you don't control the light with your home automation system, what use is knowing whether it is on or off when you can't change it?If you just want to know if there is light in a room or not, use a light sensor.

author: jzx
author_rank: Regular Contributor
timestamp: September 03, 2024, 06:39:18 pm
content: This Shelley Plus is a power meter, too complex if you only want to know the state of switches. But you can connect this meter before the switches, where there is power, if the switch is open, the current will be null, and you know that it is off.Another idea could be to put something in parallel with the lamps that send a periodical signal. If you receive the signal, the lamp has power, if not it is off. Of course, you have not great time resolution, and if you do not receive the signal, maybe is some loss of signal, not that it is in off state.Must be wifi? Perhaps something with an esp32.

author: BeBuLamar
author_rank: Super Contributor
timestamp: September 04, 2024, 06:38:23 pm
content: I see now. You need an N wire to the Shelly unit. You can get it from any where. You may have to run some wires.

author: symbianas
author_rank: Regular Contributor
timestamp: September 08, 2024, 09:40:00 am
content: Quote from: themadhippy on September 03, 2024, 01:45:52 pmYeah that's what I am thinking, but there is not much place I would need to add 3transformers (one for one light, another for another light and 3rd for esp32) and esp32 in such a small place... Also DIY might need protections fuses or other...Quote from: BeBuLamar on September 04, 2024, 06:38:23 pmI just made a renovation. The first switch is on concrete wall, not sure if I want to run a wire again...

author: BeBuLamar
author_rank: Super Contributor
timestamp: September 08, 2024, 12:19:12 pm
content: Where are the 2 hot wires coming from? Is there a location where it was near the N wire? If so you can connect your device there.

author: PGPG
author_rank: Frequent Contributor
timestamp: September 08, 2024, 01:15:41 pm
content: Quote from: symbianas on September 08, 2024, 09:40:00 amSolution to consider (not tested as permanently installed circuit). Should take less space than 3 transformers.Instead of measuring current detect AC voltage by using a piece of metal foil wrapped over the wire insulation and referred to any local GND. Need to do some experiments.I am using this when a bulb in a set of 100 Christmas tree lights burns out and the circuit shorting it won't work so no bulbs light. I couple to the wires between the lights by putting them between the fins of some old radiator and measure voltage at radiator to Neutral with digital multimeter. Successive divisions by 2 and...