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?
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.
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.
You must be logged in to reply to this topic.