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
vin6
post Sep 23 2022, 05:12 PM

Getting Started
**
Junior Member
200 posts

Joined: May 2016
FOR DC MOTOR only option is 1 relay control - open and close same button - (I set button to device mode momentary.)
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.


simmarjit
post Sep 23 2022, 11:07 PM

Enthusiast
*****
Junior Member
980 posts

Joined: Dec 2011


QUOTE(vincent_ng86 @ Sep 23 2022, 05:24 PM)
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.
*
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.
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?
simmarjit
post Sep 24 2022, 01:56 AM

Enthusiast
*****
Junior Member
980 posts

Joined: Dec 2011


QUOTE(vincent_ng86 @ Sep 23 2022, 11:10 PM)
Can you share how?
*
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.
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.

simmarjit
post Sep 26 2022, 05:03 AM

Enthusiast
*****
Junior Member
980 posts

Joined: Dec 2011


QUOTE(vincent_ng86 @ Sep 24 2022, 09:26 PM)
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.
*
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.
vin6
post Sep 26 2022, 10:16 AM

Getting Started
**
Junior Member
200 posts

Joined: May 2016
QUOTE(vincent_ng86 @ Sep 23 2022, 05:24 PM)
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.
*
Im using it with alexa so far no issues.
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.
mascot123
post Sep 28 2022, 12:52 PM

New Member
*
Junior Member
32 posts

Joined: Jan 2020
I have the same terncy module, havent install yet. But i see one guy here install it like this, see thread below


https://forum.lowyat.net/topic/4955227/+40
epicure
post Oct 18 2022, 11:08 AM

Getting Started
**
Junior Member
229 posts

Joined: Sep 2009
Hey OP,

I’ve got a 2 channel works with ewelink module installed. Previously only able to use it via ewelink app and voice (Siri or Google assistant). However, i wanted also to use it within Apple Homekit. I realised that i have many other smart home devices that i wanted to unify under Homekit. So i got myself a raspberry Pi, and installed Homebridge. Then i added the ewelink plugin to get autogate into Homekit. I wasnt satisfied yet, because athough i could use the autogate in homekit, it wasnt showing as a garage door. So i installed the garage door plugin and linked it to the ewelink switch. Tada. Now when i drive home, on my carplay screen, i can tap the garage door, and my gate opens.

TLDR : Get Raspberry Pi, Install Homebridge, install plugins, and switch becomes garage door in Homekit.
jep
post Nov 13 2022, 05:23 PM

Regular
******
Senior Member
1,182 posts

Joined: Jan 2003
From: Key Ell, Blkg



QUOTE(epicure @ Oct 18 2022, 11:08 AM)
Hey OP,

I’ve got a 2 channel works with ewelink module installed. Previously only able to use it via ewelink app and voice (Siri or Google assistant). However, i wanted also to use it within Apple Homekit. I realised that i have many other smart home devices that i wanted to unify under Homekit. So i got myself a raspberry Pi, and installed Homebridge. Then i added the ewelink plugin to get autogate into Homekit. I wasnt satisfied yet, because athough i could use the autogate in homekit, it wasnt showing as a garage door. So i installed the garage door plugin and linked it to the ewelink switch. Tada. Now when i drive home, on my carplay screen, i can tap the garage door, and my gate opens.

TLDR : Get Raspberry Pi, Install Homebridge, install plugins, and switch becomes garage door in Homekit.
*
Hi bro,

Can I get the specific name of the plugin in Homebridge that you used? I also installed the 2 channel ewelink relay but I'm trying to find the way for homebridge to detect it as a Garage instead of a Switch. Thanks!
epicure
post Nov 26 2022, 05:06 PM

Getting Started
**
Junior Member
229 posts

Joined: Sep 2009
QUOTE(jep @ Nov 13 2022, 05:23 PM)
Hi bro,

Can I get the specific name of the plugin in Homebridge that you used? I also installed the 2 channel ewelink relay but I'm trying to find the way for homebridge to detect it as a Garage instead of a Switch. Thanks!
*
For Homebridge, to get the ewelink 2 channel swtich working, i used the official ewelink plugin. For the garage door, i used Dummy Garage plugin. Then i linked the switch to the dummy garage. But since i only use the dummy garage in carplay, i dont really have a problem about false status. But if you are inclined, you can install a door sensor on the gate, and then u can use a shortcut and automations to ensure that there are no false statuses of your gate.


celciuz
post Nov 26 2022, 06:53 PM

10k Club
********
All Stars
14,033 posts

Joined: Nov 2004
Your DC moto can trigger via an inching switch right? Since you using Terncy, the switches can have inching feature too? Would that work?

I’m about to build my smart home too and I have Terncy system bought previously to play around. But gonna shift to Aqara due to being more budget friendly.
boya_g
post Sep 6 2023, 09:07 PM

New Member
*
Newbie
1 posts

Joined: Jul 2018
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.
*
Can I add another channel of the relay to the lamp controller. If yes, how do it make the connection?

This post has been edited by boya_g: Sep 6 2023, 09:09 PM
simmarjit
post Sep 6 2023, 11:03 PM

Enthusiast
*****
Junior Member
980 posts

Joined: Dec 2011


QUOTE(boya_g @ Sep 6 2023, 09:07 PM)
Can I add another channel of the relay to the lamp controller. If yes, how do it make the connection?
*
Isnt the autogate board not going to act as a relay to that, i am not sure because i didnt use that.
luckystar86
post May 26 2024, 10:55 PM

New Member
*
Junior Member
13 posts

Joined: Jan 2009
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
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

2 Pages  1 2 >Top
 

Change to:
| Lo-Fi Version
0.0229sec    0.96    6 queries    GZIP Disabled
Time is now: 24th November 2025 - 10:19 PM