My house has a load management switch (we call it HDO here), which means the company managing the electricity grid can turn on and off some devices, like water heater, when the demand is low or high. And in exchange I get cheaper electricity (when switched on). And although the schedule is known in advance, I was interested whether the switching happens also at unscheduled times (aka to get a little peek into what’s happening in the grid) and maybe also switch automatically other devices I have when the electricity is cheap. I could ask an electrician to install another contactor on my fuse board and connect “something” to it, but I was not into doing anything permanent and expensive, in case I’d change my mind about all of this in the future etc. I also wanted to get this information into my home automation system (Domoticz). Here’s my cheap solution I hacked together.
Because some wall sockets in the house are switched by the load management switch I knew I can plug something into this socket and I have the “data”. The problem is, when the socket goes off, the device will go off as well. I needed at least few seconds of battery backup to be able to send the change in state.
First I bought a flood sensor (Hank Flood Sensor). It is battery powered and has two contacts that, when connected – usually by water, report the status. Now it was just a question of connecting these contacts together when the wall socket is on. Obviously, I can’t put 230V onto the sensor contacts. So I bought a 5V relay on a board with optocoupler and used an 5V power supply (regular phone charger) to switch on the relay. The 5V switches the relay directly, no GPIO, etc. And subsequently the relay switches flood sensor’s contacts (I cut out the probe and used the wires directly).
Then I used an electrical box I had lying around and placed it inside. It looks like this (the box has normally lid on).
The flood sensor is a simple switch in Domoticz, thus I have a nice graph with history, I can send notifications, etc.
Now I can program scenarios to turn devices on and off based on this switch and I can, hopefully, understand a little what’s happening in the grid around my house. 😎