Mosfet relay behaving not as expected (Shelly Uni)

Hi folks,

I managed some time ago to control opening/closing my garage door via Node-RED, by installing a Shelly Switch plus 1 (relay) in parallel with the existing physical wall-mounted switch:

The "control" pin is norrmally high (24 VDC), and the garage door status changes (between open/close) as soon as that pin gets a falling edge. So I first close (via mqtt) my Shelly switch relay and 500 msecs later I open it again, to generate a short pulse.

And that has been working fine! I could open/close the garage door both via the physical switches, and via Node-RED.

Recently I wanted to go one step further, by also measuring the (microswitch) sensors from my garage door opener. That way I could determine in Node-RED whether my garage door is open or closed. Via another discussion I learned that I could use a Shelly Uni for this purpose. And yes: I installed an Uni, and via the Uni's digital inputs 1 and 2 I can now read both garage door sensors. That also works fine now!

But it was a bit silly that I needed both a Shelly switch plus 1 to open/close my garage doors, and a Shelly Uni to read the garage door sensors. Since the Shelly Uni also has 2 (Mosfet) relay ouputs. So I removed my Shelly Switch 1 and used the Mosfet relay output instead:

Again I generate a short pulse (via mqtt) by closing the mosfet relay and after 500 msec open it again.

However this does NOT always work:

  1. I can open/close the garage door via Node-RED.
  2. But then the physical switch does not respond anymore: you can click on it but nothing happens.
  3. If I send a pulse to my Shelly Uni nothing happens.
  4. If I send a second pulse to my Shelly Uni, then the garage door starts moving again.

I assume that I am abusing somehow the Mosfet relay, but I have completely no clue what I am doing wrong :flushed:

Does anybody has some tips I could try? I already enlarged the pulse to 1 second, but doesn't seem to help. And I don't want to add again another relay device - controlled by the Shelly Uni - if possible, because I have now a simple setup without too much of electronics. Want to keep it as simple as possible...


BTW the mosfet relay is only able to switch currents up to 100 mA maximum. But I had measured in advance the current when I closed the physical switch, and that was only 1,3 mA if I am not mistaken. Not sure if that can be of any help...

It looks like you are powering the shelley from the garage door. Have you tried a separate power supply to the shelley to see what happens?

Hi @gerry,
Good question. No not tried yet. Will search for a 24 VDC source and try it.

Hmm, not sure whether I can damage something that way in my garage door opener.

I measure the sensors (door open & door closed) also via the Shelly Uni.
Something like this:

The 24 VDC voltages on those sensors/microswitches are delivered by the garage door opener.

Or a small 24vac wall wart xformer

Could be a problem

Still might be worth your while to disconnect sensors and see if behavior changes. I suspect some kind of spike on pwr inputs, hook up shelley to separate power and contact to relay only and see

1 Like

I'm a bit confused by this -

  • I can open/close the garage door via Node-RED.

  • If I send a pulse to my Shelly Uni nothing happens.

Have you measured the voltage at the control pin to see what happens with pulse and switch to check it does actually go low ?

I think you are right. When I do it that way, the mosfet relay seems to be working fine. I tried all kind of sequences (with physical switches and relay), but it all works fine now.

So next question: does anybody know an easy way to solve this? I would like to keep using the Vcc of the garage door opener to keep the setup simple.

Yes last weekend I asked the lady to toggle the physical switch while I was measuring the voltage in my basement. And it went from 24V down. But I am not confident anymore at the moment if the measurement was correct. I suspect that the garage door was working correct during her intervention...

Do I perhaps need to install an RC snubber between Vcc and GND?

Reaching way back now into memory, I think the 24vac is taken to ground to toggle door. If you are running shelley from that power then every time door is toggled the power into shelley sees a large drop. This may be confusing device. This is all a guess of course but you do have options to troubleshoot. A snubber or RC network probably won't be stout enough to hold voltage if that is the case
Longer explanation: If you put a "snubber" in that line big enough to hold the shelley's input I doubt that the door will work as that will backfeed into the opener and hold that circuit up. Anything less and the shelley will still see the voltage bump when the opener runs. You could put isolators into the line to keep the snubber from backfeeding but pretty soon you will have more than you want to get into. You are wanting to hold down part count and there are probably easier roads to go down.

Connect GND of power supply to N(number 2) instead to data_gnd (number 6) and enjoy :wink:

Hey @markost,
Yes you are right. I had quickly drawn the diagram yesterday, and in a hurry a drawn it incorrectly.
My current GND wiring already is like you mentioned:

Well spotted...

Will try to test that today.
But if that is the case, then I don't understand why these Shelly Uni's don't fail to send the status of both sensors to Node-RED. I have been running that setup for more than a week (powered by the garagedoor opener Vcc) without problems. Very weird...

As far as I can remember, if the default UNI configuration for "Button type" is not changed, IN1&2 are used to control OUT1&2...
If this is the situation, then the current state of the garage door on IN1/2 can "override" the output...
I would try to disconnect IN1&2 and set the "Button type" to "Detached Switch" mode, then check if the UNI works as expected via MQTT and also via a physical switch.



That might indeed explain all the contradictionary behaviour I experienced. In my case it was set (default) to "Toggle switch".

When I change it to "Detached" the physical wall-mounted buttons work fine. But I cannot open/close it anymore via Node-RED. I will need to look tonight if I perhaps need to use other mqtt commands in detached button mode.

Seems that by during rewiring (to undo my experiment with the separate power supply), for one of the Uni wires - which are pretty thin - the isolation plastic got in between the terminal blocks. So there was no contact.

Both garage doors seem to be working fine now.

Thanks guys for solving my issue!!!!

I had one of those moments were everything seemed to fail. Now at least one of these is solved...


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.