August 8, 2018 at 09:50 #25369
I’ve been pondering the idea of DIYing on/off status indication for Gen 1 wired light switches to show the correct on/off status in Domoticz. Because the Gen 1 wired light switches do not transmit a wireless signal when switched on or off manually, Domoticz is unaware of the status change.
I know that the Gen 2 switches provide on/off status, but I’d rather not change all of my switches. And, Gen 2 is not supported in Domoticz.
First off, has anyone done something similar?
My basic idea builds off something like this https://olimex.wordpress.com/2015/09/29/energy-monitoring-with-arduino-and-current-clamp-sensor/.
1. Sense current in the light circuit (so, knowing when lights are on) using a current transformer such as https://www.olimex.com/Products/Components/Sensors/SNS-CURRENT-CT013-100A/ clamped around a live wire feeding into one of the downlighters.
2. Connect the current transformer to a very-low-power Arduino with a 433MHz transmitter or transceiver, all powered by replaceable AA battteries or ideally a coin cell. I’ll need to work out the power budget.
3. When the lights are switched on (high current is sensed), transmit a certain code over 433MHz. When the lights are switched off, (As a possible future upgrade using a 433MHz transceiver, add the possibility to receive a code triggering the unit to resend the on/off status code.)
4. Receive the status codes with a RFXtrx433E (which I use instead of the LWRF Link) controlled by Domoticz
5. Use dummy slave switches in Domoticz to update the status of the actual (master) switches based on the received status codes.
Does this make sense? Any ideas for alternatives or improvements?
RonAugust 11, 2018 at 08:13 #25370btideyParticipant
General principle is OK but I’d worry a bit about using current sense method due to the dimming nature of the switches. One would need to be careful to distinguish between the background feeder current when the switch is off and an on but dimmed state. That particular current transformer is going to give a very low output with LED lamps. E.g. with 30W load dimmed to 5W ~20mA at 240V would produce 200uV output.
If one was willing to hack the switches then putting an opto-isoltaor across the blue led might be an alternative sensing method.
Or if one was willing to make a connection across the lamps then a rectified power signal detector could actual power up the MCU to send a signal.
I would use a ESP8266 wifi MCU rather than a arduino and use wifi to send straight inot Domoticz server.August 13, 2018 at 22:57 #25371
Thanks for your helpful thoughts. I did wonder about the dimmer feeder current, andv your other two methods are intriguing. I’ll do some experimenting and see how I get on.
Good tip for the ESP8266. That’s surely a better choice.September 7, 2018 at 17:16 #25385michael wardParticipant
I tinkered with the idea of just buying a day/night sensor, but I have no way of simply reading its state.
I would say using the arduino would be good, along with a simple opto device, however it would need to be close to a light source and shielded from ambient light or in fact a current sensor on the output of the switch. It wouldn’t matter how low the current was, as long as it was above the noise floor. It is only the current which is reduced not the Voltage level, as there is always going to be a minimum Voltage whenever a lamp is on, even if it is an LED.
The second method is just a case of how physically intrusive you want to get.
You must be logged in to reply to this topic.