shelly-homekit icon indicating copy to clipboard operation
shelly-homekit copied to clipboard

Bouncing switch by using Shelly1 as Garage opener

Open stivie882 opened this issue 2 years ago • 21 comments

I am using the Shelly 1 as garage opener. It works really great except for one little thing. My switch that detect the closed state of the door bounces. I get always three messages when the door got closed.

  1. Garage door closed
  2. Garage door opened
  3. Garage door closed

It would be great if a small delay of about 1 sec could be implemented before new messages are sent as garage opener.

stivie882 avatar Sep 19 '22 15:09 stivie882

This issue is stale because it has been open 30 days with no activity. Comment or this will be closed in 7 days.

github-actions[bot] avatar Oct 20 '22 03:10 github-actions[bot]

Would be Great if someone of the developers could care absolut. @andyblac @timoschilling @rojer

stivie882 avatar Oct 20 '22 04:10 stivie882

I have exactly the same problem with my two garage doors. It seems that the reed switches for open/close detection cause the issue, with a simple contact switch there is no issue. It would be great if the scanning rate of the switch input could be lowered somehow.

Stoischo avatar Nov 03 '22 07:11 Stoischo

I also have the same problem.

Koplinjp avatar Nov 19 '22 18:11 Koplinjp

I solved adding a magnetic sensor on the my gate.

simonfield76 avatar Nov 27 '22 13:11 simonfield76

I also have that problem. It’s caused due to having only one reed contact on a Shelly 1. E.g. when your reed contact is attached to the open position and you open the garage door, then Shelly will push an open message but the reed contact remains open until the garage door is opened fully. So HomeKit pushes a close message to your phone as long as the garage door moves, then pushes again the open message when the door is opened and the reed contact closes. I think someone can solve this with a delay as long as the garage door moves (movement time is already set in the settings), when shelly operates in garage door mode.

therealmightyx avatar Dec 11 '22 21:12 therealmightyx

This issue is stale because it has been open 30 days with no activity. Comment or this will be closed in 7 days.

github-actions[bot] avatar Jan 11 '23 02:01 github-actions[bot]

Can some how have this issue please test what's happen if you increase or decrease the "Movement Time" setting.

timoschilling avatar Jan 16 '23 16:01 timoschilling

Can some how have this issue please test what's happen if you increase or decrease the "Movement Time" setting.

I did do that, decrease from 35 to 30 and 25, and also increased to 40,45 and 50. Same issue.

Koplinjp avatar Jan 16 '23 16:01 Koplinjp

I did a few tests with different movement times an also different pulse times, which had no effect.

therealmightyx avatar Jan 16 '23 16:01 therealmightyx

3AC637EF-0ACA-47B8-86D6-AEACB5C84594 I’ve a similar problem!

I try to decrease the movement time to 9 seconds (my garage door is really fast) but the time to response don’t save!

When the door is closed, the feedback works great without a problem, but when the sensor goes to open (is Normally Closed by the magnetic), the feedback shows open but with the “waiting” status for so long…

Someone can help?

rubensx avatar Feb 16 '23 16:02 rubensx

Having this issue as well on an electric gate with Shelly 1 plus. The SW port is connected to a 24v ground connection L is ground and N is the +24V.

When Gate opens I get numerous messages. image

bobf41 avatar May 26 '23 18:05 bobf41

3AC637EF-0ACA-47B8-86D6-AEACB5C84594 I’ve a similar problem!

I try to decrease the movement time to 9 seconds (my garage door is really fast) but the time to response don’t save!

When the door is closed, the feedback works great without a problem, but when the sensor goes to open (is Normally Closed by the magnetic), the feedback shows open but with the “waiting” status for so long…

Someone can help?

My solution is, put in 10 seconds, anything under 10 don't work... but my garage gate still are fastest than the counter

rubensx avatar May 27 '23 01:05 rubensx

Hello, i look for help. How do you had a magetic sensor on shelly 1 in 220v ?

sdaudet avatar Jun 01 '23 07:06 sdaudet

IMG_4269

If you use 220v, put one fase through the sensor! All are ok

rubensx avatar Jun 01 '23 09:06 rubensx

…and be sure to buy a reed sensor (reed contact switch) with 220/230V!

therealmightyx avatar Jun 01 '23 11:06 therealmightyx

Thanks it is working when i use 24v my sensor is limit to 220 thanks

sdaudet avatar Jun 03 '23 13:06 sdaudet

Having this issue as well on an electric gate with Shelly 1 plus. The SW port is connected to a 24v ground connection L is ground and N is the +24V.

When Gate opens I get numerous messages. image

I noticed my switch input is actually a pulse. So that matches the number of signals. It would be nice if some kind of delay can be set. Like 2 seconds no signal is off.

bobf41 avatar Jun 27 '23 20:06 bobf41

This is probably not the correct way to solve this (might not work correctly when the door reopens because there's something in the way after it's in range of the reed sensor? I haven't tested), but I have a pass at debouncing the open event here: https://github.com/mccahan/shelly-homekit/commit/3817f0bdaf4e948b1589b05b64f07048ffd1500b .

The logs looked like this, you can see the extra "Tgt State: closed -> open" and "Cur State: closed -> opening" toggles in the middle that trigger the extra notification: Screenshot 2023-08-06 at 11 34 58@2x

I tried setting a higher debounce time for mgos_gpio_set_button_handler in shelly_input_pin.cpp but didn't have any luck there.

mccahan avatar Aug 06 '23 18:08 mccahan

I had the same issue with a gate opener. While moving I got a "flashing" signal, when stopped and open it was a continues signal.

I have added a small timer from Amazon which holds a relay for a set amount of time, I did 0.9sec. Then when the gate is closed again within 0.9 sec Shelly knows it is closed.

Used this one in the end. Fafeicy Relay Module with Time Delay, 5 V, 12 V, 24 V, 0.01 s-9999 min, Delay-Off Cycle Timer, LCD Display, One-Button Emergency Stop Function (Stop Button) https://amzn.eu/d/bl5VBjf

bobf41 avatar Aug 06 '23 19:08 bobf41

I had the same problem and this is how I resolved it…

My garage takes 8-9sec to move from open to close.

I set movement time to 10sec AND pulse time to 11000ms (11sec).

RxJock avatar Feb 05 '24 21:02 RxJock