Help with Europe style Light with multiple "relay" switches

I have a light that is controlled by 3 separate spring loaded rocker wall switches. However the light bulb is wired to a relay in the distribution board and that relay is what each wall switch operates. This is a typical wiring of such a light in Europe (France) so I wanted to ask any of the European OH users if they have a better way to handle such a light.

I have installed in place of one of the wall switches, a SONOFF T1 and through the expire binding, I have set up a 2 second delay so that when the SONOFF is operated either on of off the signal is only sent for 2 seconds and then the SONOFF turns off. This then releases the light relay in the distribution board so that the other 2 remaining “dumb” switches can operate the same light on or off. otherwise the relay is held closed and prevents any other switch from operating the light and the relay makes a humming noise as it is permanently energised.

{ mqtt=">[broker:cmnd/kitchen/power2:command:OFF:OFF], <[broker:stat/kitchen/power2:state:default]", expire="2s,command=OFF" }

The problem with this is that OH can loose track of the light status as the power line through the SONOFF is only operated for 2 seconds before turning off (which operates the relay that turns on or off the light). So for example if the light was on and OH server rebooted it would show the light as off but in fact it was on, the persistence cant work for that light as its last known state was off as the SONOFF turned the light on by itself being switched on and then off again after 2 seconds.

I have handled the OH Status icon by using a “Toggle” switch command:

{ mqtt=">[broker:cmnd/kitchen/power2:command:ON:ON], >[broker:cmnd/kitchen/power2:command:OFF:ON]" }

Has anyone handled one of these kinds of wired lights any better / differently and can share some ideas?

Thanx & regards
Chris

If I understand correctly, the only time you have an issue with this set up is when the OH server reboots?

Why don’t you place a sonoff JUST BEFORE the relay. The 3 switches would trigger the sonoff who would in turn drive the relay?

1 Like

I was thinking maybe a proxy item that used, in a rule, to track the last known value and could be persisted.

In fact, you should replace the relay with the Sonoff… the only remaining problem is, the wall buttons use 230 Volts where the Sonoff needs 3.3 Volts switch input :wink:
So maybe a T1 is not the best solution for this problem, as you need a 230 Volts switch input.

A completely different approach might to replace the latching mains relay with a two-pole version. The “spare” pole can carry low voltage to signal the state of the light to OpenHAB via some binary input. Is there a digital input that can be hacked on a Sonoff?
Your existing wall switches remain in place, fully working even if OpenHAB, or the Sonoff, or network dies.
A side benefit is that OpenHAB can detect someone using the wall switch manually, as the light changes state when OH didn’t command it.

Yes there is a spare GPIO

Not necessarily, as currently the light can be switched on by two original manual (dumb) switches that are only switching the relay, I have so far only replaced one of the three dumb switches with a SONOFF. (its difficult to get a Negative wire to every wall switch location that the Sonoff needs to operate).

So if the light is turned on by one of them then OH would not register the light was on.

I was considering to hook up a current meter to a Nodmcu to send back actual current flowing to the light and thereby using OH rule to set the OH Icon and switch position according to the current reading.

I have also heard of others who have installed SONOFF switches that do not actually control the light but only send the MQTT signal to the controller (OH) which in turn would turn on the light via the one SONOFF that is wired up to the light relay.

P.S. It was Vincent who has helped me so much in the past and did so with the toggle switch, expire and also recently with persistence / mapdb.

Thanx & Regards
Chris.

You could also use a photocell if your not interested in the actual current reading.

Not necessarily, if the switch wires go back to the panel, they will act as a simple switch on any voltage.
The three switches can we wired to three nodeMCU GPIOs to detect a toggle and report to OH. The Node MCU can also trigger the relay which will switch on the light so even if OH goes down it will still work.

Well, if you are willing to change much of your installation, you have many options :slight_smile:

  • use the old switches, change the relay with some “smart” relay with high voltage switch input
  • replace the relay with a sonoff, change all wall switches with T1 (They look nice, don’t they?), use the switching line for neutral, don’t switch anything at all with the T1, but send the button press as a mqtt command to your mqtt broker
  • use low voltage at the old switch wires and control a Sonoff instead of the relay.

By the way: Do the wall buttons swtich ON and OFF, or only ON (and OFF is switched by time)? Both versions will work with a Sonoff as a replacement for the relay.
You won’t need more than one Input, as all three buttons will switch the same Sonoff :slight_smile:

Thanx for all the suggestions…I will have to think each of the ideas through. My primary consideration when deciding to go automated at the house, was to ensure that everything could still work if the OH system/Network went down, hence why i purchased Sonoff switches. The challenge was to get a negative wire from the light back through the walls to the wall switch location. I have manage to do this on all the bedrooms and also a central point on the ground floor that houses 2 x dual gang switch blocks.

I had not anticipated the relay switching main light, but the idea of using the low voltage wire from each of the 2 remaining dumb switches could work to provide a neutral back up to each of the wall switch locations, then the new Sonoff wall switches would be powered up and could be used to send an MQTT signal to the server…but that wouldn’t work if the server was down…

I have just ordered some Shelly 4 Pro smart DIN rail mountable Wifi Operated relay switches so I might be able to use one channel to switch the main light and the Sonoffs to operate the wifi relay…this would possibly give me the option to have permanent power to the main light circuit and then persistence should work with OH as the main light would operate more like a conventional light and the switching circuit would always be powered when the light was on…I’m just not sure how to satisfy the continued function of this setup if the OH / Network goes down…

Sonoff switches do look nice in my opinion, they might not be for everyone though.

The old dumb switched are a spring loaded rocker switch so as soon as you press them they return back to the “open contact” status. The Sonoff sends a feed to the relay and then is open circuited again by the expire binding after 2 seconds. OH icon and switch status are tricked by the mqtt statements so they show “ON” even after the expire has triggered.

That’s a whizzy looking thing. I note from the spec sheet that you can use it standalone with wired momentary wallswitches i.e. just like your existing relay, independent of any server/network.
It also seems to provide an HTTP/REST interface, so you should be able to use it directly with OpenHAB and avoid any cloud service.
https://drive.google.com/file/d/0B57rshizIdcNNm0zMnllVGM3bE0/view

Thanx for clarification, I ordered those 4pro relays to allow all my electric/oil heaters to be automated so I think I should have a spare channel available for the main light and then I can leave the existing dumb switches as they are. I also ordered 2 of the smoke detectors which I’m also hoping to be able to tie in to OH…

FYI, there is also a Shelly 1 (and Shelly 2), and at least Shelly1 is already supported by tasmota: https://github.com/arendst/Sonoff-Tasmota/issues/2789.
There is a high voltage input for wall buttons and a relay power output, so you can simply replace your relay and that’s it.

Of course, if you want to use tasmota you have to flash it first.
Benefit of tasmota is MQTT for communication, which is more comfortable than to configure an http item to do the REST API access, but also this would be an option.

The module should work without any comunication just the same way the relay did, but is also controllable by openHAB.

Thanx Udo

I have also ordered 4 of those :slight_smile: Shelly looks interesting products and manufacture…

Very interesting topic. Can you show us images once it arrives, if its not too much trouble. :slight_smile:

Yes sure I can do that, they are not due to be dispatched until mid September and I will get home again at the end of the month so will post pictures then.

There is another small post about Shelley here, so would post the photos there: