Dry contact switch automation

Hi all,

I’ve been looking for a solution for a while now but I can’t find one, or at least, I’m probably not experienced enough.

I renovated our house and used pulse switches in combination with eltaco relays. This allowed me to easily change the behavior of any switch in our home. Now comes the fun part, at least, that is my take on it, but I’m kind of stuck so I hope to find an answer here, or someone that can point me in the right direction.

I have a homebridge and home assistant running on a raspberry pi, this works fine for a lot of things in the house, pretty much everything, except for the lights. This is the final missing part that I want to integrate, but with maintinging the existing hardware setup. I have Vimar light switches (pulse switch) in combination with eltaco relays in the fuse box. Each time I press a switch, I send a small current ( lower than 24v) to the eltaco switch to change the relay status.

For this purpose I bought a Sonoff 4CH pro relay that I can put on the rail in the fuse box. This device has a NO connection which allows me to simulate the short press on the vicar light swith. I was able to connect Sonoff device using the ewelink integration and configure the device so when want to change the status of the relay via the NO contact, it only ‘pulses’, meaning I press the button so it changes to the ON status, and then after 0,5sec it goes off again automatically. This works perfectly to control the lights using HASS and the physical switches, but I’m f.e. not able to turn off the lights using a presence sensor, since I don’t know the current state of the light if it’s on or off. Since the switch is auto toggled again to off, it’s always off.
I’ve been thinking of using the lux sensor in the occupancy presence sensor, but I seem not able to combine both occupancy and lux value in one automation. Tips are welcome.


hardware used:

  • M100 ceiling mounted presence/occupancy sensor
  • Sonoff 4CHPRO relay
  • Vimar pulse switch
  • Eltaco pulse relay

Unfortunately this is going to be problematic for you. While you can infer state in HA, it’s going to be hard to keep it properly synced.

Start by creating a switch template. Use the lux sensor to determine switch state. Hook in the script to pulse the Sonoff into the on / off methods.

This way your automations / dashboard will use the switch to turn lights on/off, rather than dealing with pulsing.

Alternatively, do yet another rewire and put in smart switches.