Control existing hallway lights with openHAB?

This is not really an openHAB questions, but maybe you can help me to get the right kind of device.

The scenario: my entry hall has 6 lights, right now “dumb” GU10 LED lamps, and a push button on the wall next to each door to switch the lights on or off. With each press on any one of the wall buttons the lights are toggled (quite audibly) by a relay in my fuse box. I believe this is a quite common setup in Germany for hallways.

I now want to be able to switch the lights on/off via openHAB, but I also want to retain the function of the existing buttons on the wall.

Is it possible to “simulate” the input (aka button press) to the relay with some openHAB controlled device?
Or should I replace the entire relay with something “smart”? Maybe some Tasmota flashed device which I can control via MQTT, but if that’s not possible I could also handle Z-Wave or Zigbee.

The second choice is probably better if I want to add a motion sensor and want to dim the lights according the the time of day. To be able to dim the light I would replace the dumb bulbs with some IKEA TRÅDFRI bulbs or something similar.

Any ideas? Thanks!

@sihui in Germany may have some suggestions.

Yes, that’s simple.
Almost essential, but more difficult to arrange, is a means for openHAB to monitor the on/off state of the lights. You’re really restricted in this kind of setup if openHAB does not know if lights are on or off.

There are a few existing threads on various DIY ways to do this, example

Maybe, but you will probably want to retain the existing wallswitches which adds some limitations of choice.
Look at Shelley products, for an example.

I second the Shelly I believe it could do what you want.

You can replace your relay in the fuse box by a shelly device, that‘s quite easy. You also might find some DIN rail mounts for the shelly or even print it yourself if you have a 3d printer.
The shelly can be controlled via MQTT or the native Shelly binding, which is under review and might be part of openHAB 2.5 release.
Your physical switches can still be used.

Would this device work for this purpose? SONOFF Mini DIY.
I ordered a couple of them a few days ago and they seem to be able to react to a connected light switch. Maybe I can hook it up to all wall buttons?

I have a couple of other SONOFF devices at home, once they are flashed with the Tasmota firmware they are very easy to control from openHAB :slight_smile:

Don’t think so. AFAIK, these devices switch on/off when physical switch powers the input.
In your case, I will have just buttons, no switches, so your relay will just get a short power impulse and switches the light. Shelly inputs can be set to momentary inputs so they will definitely work.

With the Tasmota firmware I can control what happens with the output when a connected switch is pressed, released or toggled.
I still I’ll have to check the wiring of the wall buttons in my home, I really don’t know right now what wires are available and how they are connected to the relay in my fuse box.

Your case sounds like a typical German “Treppenhausschaltung”, where buttons are used, connecting the load input to output whenn pressed. When the button is released, there is no load on output.

You might find n-wires connected to your relay input, where n is the number of your hallway buttons.
So the only interesting part is in your fusebox. Whetehr you use a Shelly or a SONOF, Input from your relay goe to the input of the smart device, same for output.
You just have to make shure that the smart device will react on a short load at input to switch on or off.

1 Like

I have seen the guys at homeassist have found a way to manage the sonoffs without flashing:

I like these devices, but my soldering has killed several :frowning:

I use the to switch the lights on and off with a rule to switch off every puls after 250millisec.And for the state i use 1 contact of the puls relay in the electric cabinet and let them switch this digital input.The modules work with the modbus binding.And i have a set of rules for the state so google home also know the state of the lights.It is working very well.If you want i can share my config and rules.

I try to avoid soldering, the Sonoff Minis can be flashed with Tasmota via Wifi :wink:

Sadly this is no longer the case with the newer firmware versions :grimacing: since 1.6.1 I think - unless this changed recently again?

The Sonoff Mini DIY are supposed to be able to be flashed via WiFi, they even have a jumper on the board to enable the flash mode. I know for sure this evening!

Either that, or the relay will be activated whenever any momentary switch (all connected in parallel) is pressed. The momentary switches are then often operated at a lower voltage (e.g. 24VDC) provided by an external power supply (e.g. doorbell transformer).

The issue is that you need to:
(A) detect when the relay is open/closed to be able to report its state to openHAB.
(B) operate the relay from openHAB

The hard bit is (A), you get (B) from many available solutions today.

For (A) I created something similar as a nice side-effect.

Living in an old rented flat in Germany, I could not fit any of the smart relays behind the wall switch plate, because there was not enough space and there was no neutral wire (N). So I placed a “Deckenanschlussdose” (ceiling connection enclosure) directly beneath the lamp. I re-routed the cables from the lamp into the enclosure, put a Z-Wave Dimmer (which also monitors power) in there and routed the switched/actuated cables back into the lamp. You can’t even see the connection but you have to live with a white box near your lights.

Google Image search for “Deckenanschlussdose”

Of course you don’t want to switch with that relay, because you would cut off all other physical wall switches, but you can use this to monitor the power consumption and derive an ON or OFF state based on this consumption.

In my setup flipping the physical switch just kills power to the relay and all automation is dead. But (and that is a huge BUT!): The automation of the lights is so well done now and uses so many different sensors and assumptions that we didn’t touch that light switch in years. So maybe you don’t need those light switches after all. :wink:

Happy to explain my setup or show you round if you happend to live near Hamburg.