Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 Controlling DC Moto Gate with Homekit, Xiaoyan Smart Module

views
     
TSvincent_ng86
post Sep 23 2022, 04:47 PM, updated 2y ago

Regular
******
Senior Member
1,659 posts

Joined: Feb 2005


Hi all,

I would like to explore the possibility to set up my electric gate as a "Garage Door" with the Home app on my iOS device.
I have purchased a Xiaoyan Switch Module 2 Gang and the electric gate has been installed. Details as per attached.

Can anyone guide me how do I go about wiring it up and configuring it?

Thanks.

Attached Image Attached Image

This post has been edited by vincent_ng86: Sep 23 2022, 05:03 PM
TSvincent_ng86
post Sep 23 2022, 05:24 PM

Regular
******
Senior Member
1,659 posts

Joined: Feb 2005


QUOTE(vin6 @ Sep 23 2022, 05:12 PM)
FOR DC MOTOR only option is 1 relay control - open and close same button - (I set button to device mode momentary.)
*
I am now using this but can only open/close it via the ewelink app.

Hoping to have it appeared on CarPlay as a garage door.


TSvincent_ng86
post Sep 23 2022, 11:10 PM

Regular
******
Senior Member
1,659 posts

Joined: Feb 2005


QUOTE(simmarjit @ Sep 23 2022, 11:07 PM)
Box box
I have a digicraft gate as well as an ewelink relay in the autogate box, L use home assistant to bridge it to HomeKit and I have it shown on CarPlay and in the home app.
*
Can you share how?
TSvincent_ng86
post Sep 24 2022, 09:26 PM

Regular
******
Senior Member
1,659 posts

Joined: Feb 2005


QUOTE(simmarjit @ Sep 24 2022, 01:56 AM)
I connected the relay to the push button switched in your diagram, i powered the relay with the autogate backup battery, used the sonoff ewelink integration and exposed in to homekit as a gate which can be see in carplay when you reach near your home. If you are using home assistant, let me know, i will share my code to expose it as a gate. I also used an aqara door and window sensor to check if the gate is open or close. So in the home app, if i click once it will open both sides fully, but if i click again while it is opening it will stop, and then i click again to close. You cant open one side with this.

Another way you can do is, use a relay with the gate remote, you will need to solder.
*
Thanks for your help, yes, I am using Home Assistant. I also have a Terncy door sensor available, how do you protect it from the outdoor weather.

Appreciate if you can share with me the code.

TSvincent_ng86
post Sep 27 2022, 12:20 PM

Regular
******
Senior Member
1,659 posts

Joined: Feb 2005


QUOTE(simmarjit @ Sep 26 2022, 05:03 AM)
There is a locking mechanism on the gate right? At least mine has (DC moto one) so i put my sensor below it and i also used electrical tape to put around all the edges apart from the one that magnet comes into "contact" with. Its been 2 years now that i have it and still no issues, and i am surprised that i havent needed to change the battery as well.

CODE

cover:
 - platform: template
   covers:
      gate:
          device_class: gate
          friendly_name: "Gate"
          value_template:     "{{ is_state('binary_sensor.door_and_window_sensor_ac2f', 'on') }}"
          open_cover:
               service: switch.turn_on
               data:
                    entity_id: switch.sonoff_gateopen
          close_cover:
             service: switch.turn_on
             data:
                 entity_id: switch.sonoff_gateclose
          stop_cover:
             service: switch.turn_on
             data:
                 entity_id: switch.sonoff_gateopen
          icon_template: >-
           '{% if states('binary_sensor.door_and_window_sensor_ac2f') == "on" %}
             mdi:gate-open
           {% else %}
             mdi:gate
           {% endif %}'
           



Replace the binary sensor and those entity IDs (the relay) with whatever you have.
*
Thanks!

TSvincent_ng86
post Sep 27 2022, 12:21 PM

Regular
******
Senior Member
1,659 posts

Joined: Feb 2005


QUOTE(vin6 @ Sep 26 2022, 10:16 AM)
Im using it with alexa so far no issues.
*
I will be using it within the iOS environment.
TSvincent_ng86
post May 27 2024, 09:45 AM

Regular
******
Senior Member
1,659 posts

Joined: Feb 2005


QUOTE(luckystar86 @ May 26 2024, 10:55 PM)
i have the same pcb, but my t2 did not work. even i connect to the battery L and N , the t2 did not have response and light up… any idea?

user posted image
*
I bought this and has been using it fine since.

https://item.taobao.com/item.htm?_u=r2m455s...8681409:3622544

 

Change to:
| Lo-Fi Version
0.0169sec    0.34    7 queries    GZIP Disabled
Time is now: 25th November 2025 - 07:12 AM