Slide gate automation

Hey guys, I’ve installed a slide gate, and the motor just arrived. I have an electrician coming to run power from the house to the motor. What device can I use to control the motor? I will be installing an internal push button in the garage that will open and close the gate, similar to the garage wall button.

My devices are home are all Z-wave. Can I use a switch module e.g. Aeotec dual nano switch or Fibaro dual switch and just connect it to the push button in the garage? how about a binary sensor? or should I use an Aeotec nano shutter? (I’ll have to run extra power cables, as I want to install it in the house behind a switch, rather than inside the motor, for signal coverage purposes)

Aeotec nano switch

The motor is 230V ac 550 W , see link below.
https://turtle-direct.co.nz/gate-openers-and-accessories/sliding-gate-opener/turtle-sliding-gate-opener-flood-proof/

Here’s the control board of the motor. Notice the push button option, my thinking is to use a light switch (Aeotec or Fibaro) and just connect it to this. I just want to be able to open and close the gate.

Hi @THE-ST1G21, for what it’s worth i have my gate operating with this : https://www.amazon.com/Wireless-Z-Wave-Multi-Input-Output-Contact/dp/B00B6RZ7MM/ref=sr_1_4?keywords=zwave+relay&qid=1556652912&s=gateway&sr=8-4 .

Works for me but YMMV…Best of luck.

Hey fellow kiwi (I guess, as you are buying from .co.nz site).

Is it like a garage door, press and release the button to open the gate, press and release it again and it closes. While in motion, press and release and it stops?

If so it is no different to a garage door, and there are plenty of examples. A relay connected to an esp8266 will work. In home assistant terms it is a “cover”.

Hope that helps.

Thanks for that. do u need esp8266 wifi module? Can I not just connect the relay switch to the push button? I’m not sure how the push button works but I think it’s very similar to garage door.

Looked at the Aeotec nano shutter and it seems straight forward and all the connections are there

No you don’t, it was just an idea of the common way to do it.

I am not familiar with the aeotech device. It looks as though it is designed to switch mains voltage which is NOT what you want. I may be wrong though. Damned expensive compared to an esp though.

Ok thanks. How did you connect it to ur motor’s control board? Was it connects to the push button connections?

That is how it normally works on a garage door.

Hello
Can you share more instructions on now you did the set up with the contact bridge?

Thank you

So, FWIW, I’m using the same MIMOlite (https://www.amazon.com/gp/product/B00B6RZ7MM) and also a magnetic alarm contact (https://www.amazon.com/gp/product/B00LYCUSBY)

Excuse the rudimentary image, but I’ve got it hooked up like this:

A - Wires to my power source (hooked it up to my gate battery)
B - Wires to the magnetic alarm contact
C - Wires to the gate panel that activates the open/close function.

I have the MIMOLite integrated via SmartThings which creates a BINARY SENSOR and SWITCH in HomeAssistant. I then built a Template Switch (https://www.home-assistant.io/integrations/switch.template/) to control it:

- platform: template
  switches:
    front_drive_gate:
      friendly_name: "Front Driveway Gate"
      value_template: "{{ is_state('binary_sensor.front_gate_contact', 'on') }}"
      turn_on:
        service: switch.toggle
        data:
          entity_id: switch.front_gate
      turn_off:
        service: switch.toggle
        data:
          entity_id: switch.front_gate
      icon_template: "mdi:gate"

I’m by no means an expert, but this works pretty well for me. Hopefully this helps!

In the end I went with Sonoff SV as the switch, connected to the wall toggle switch (I ran this cable when we installed the motor) and Xiaomi contact sensor instead of reed switch to tell me the status of the gate. I did both the garage and gate this way.

Glad to hear you found a solid solution. HA definitely has far more than one ‘right’ way to do things sometimes - so whatever you find that works for you - run with it. Nice work!

Thanks @Markus99

if anyone wants more details or needs a copy of my covers let me know.

Hi Fellow Kiwi! Hope you are ok during lockdown!? I am planning this same project. Can you explain how you used the xiaomi contact sensor and the SV switch. Would be interested in the hass config too! TIA

1 Like

Hey mate, apologies for the late response. I followed DrZzs video about adding Sonoff SV to HA using the new Sonoff integration, I used HACs to install the add-on. You can flash the Sonoff SV with Tasmota if you like, I chose to do it this way.

I used Xiaomi contact sensors instead of reed switch, its easier and not messy! I also used “inching” mode for the momentary switch option, its easier than using automation, you can set this up in the eWeLink app after you setup your Sonoff SV device. You need to use isolated mode for your Sonoff SV, look it up online, there are videos and instructions on how to do this on the Sonoff website.

Below are my two covers for garage and gate. I used a phone charger and cable to power the Sonoff SVs. The one for the garage is connected to the garage motor, and the one for the gate is connected to the wall switch, I put up this switch when I installed the gate motor. Let me know if you get stuck.



cover:
  - platform: template
    covers:
      garage_door:
        friendly_name: "Garage"
        value_template: "{{ states('binary_sensor.sensor_2')|regex_replace('on','open')|regex_replace('off','closed') }}"
        open_cover:
          service_template: >
            {% if is_state('binary_sensor.sensor_2', 'off') %} 
              switch.turn_on
            {% endif %}
          entity_id: switch.sonoff_garage
        close_cover:
          service_template: >
            {% if is_state('binary_sensor.sensor_2', 'on') %} 
              switch.turn_on
            {% endif %}
          entity_id: switch.sonoff_garage
        icon_template: >
          {% if is_state('binary_sensor.sensor_2', 'on') %}
            mdi:garage-open
          {% else %}
            mdi:garage
          {% endif %}
      gate:
        friendly_name: "Gate"
        value_template: "{{ states('binary_sensor.0x00158d00030394aa_contact')|regex_replace('on','open')|regex_replace('off','closed') }}"
        open_cover:
          service_template: >
            {% if is_state('binary_sensor.0x00158d00030394aa_contact', 'off') %} 
              switch.turn_on
            {% endif %}
          entity_id: switch.sonoff_gate
        close_cover:
          service_template: >
            {% if is_state('binary_sensor.0x00158d00030394aa_contact', 'on') %} 
              switch.turn_on
            {% endif %}
          entity_id: switch.sonoff_gate
        icon_template: >
          {% if is_state('binary_sensor.0x00158d00030394aa_contact', 'on') %}
            mdi:gate
          {% else %}
            mdi:gate
          {% endif %}

Hey thanks for all of this information - I have just spent the day today (while it was raining and my kids just wanted to play video games!) getting the motor working on my bench and seeing if I could do something with a Shelley 2.5 relay but have realised that I need an “isolated” dry contact realy type switch in order to do the momentary trigger so its all making sense now!

Do you think you could show me how you wired the SV to the switch and the DC power supply?

Not sure that image worked, but the wiring diagrams are here

https://www.itead.cc/sonoff-sv.html

Thanks nickrout huge help! The contact sensors you used did you just use a separate wireless set in order order to provide open/close state? E.g. not wired to the sonoff sv?

Yup you got it. I’ve been down the relay path too, don’t do it that way. This is the easiest way to do it. Connect it like the isolated diagram Nick shared.

I’ve attached my photos. The orange/black cable connect to the garage wall switch or motor (It doesn’t matter which way) you need to remove the two resistors off the Sonoff SV. The black and red wires connect to your USB wire (You only need the black and red cables)

Watch this video, the guy explains it well. https://youtu.be/osKyMUXwKpo

Thanks guys. Understand why this may be easier but what are the particular challenges. Also one thing i have been considering is that the sliding gate motor has a spring limit switch… ciuldnt this be used to integrate onto the sonoff todetermine open/ close? This whole thing could be mounted in the motor housing.