Outline ·
[ Standard ] ·
Linear+
Controlling DC Moto Gate with Homekit, Xiaoyan Smart Module
|
TSvincent_ng86
|
Sep 23 2022, 04:47 PM, updated 2y ago
|
|
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.
This post has been edited by vincent_ng86: Sep 23 2022, 05:03 PM
|
|
|
|
|
|
vin6
|
Sep 23 2022, 05:12 PM
|
Getting Started

|
FOR DC MOTOR only option is 1 relay control - open and close same button - (I set button to device mode momentary.)
|
|
|
|
|
|
TSvincent_ng86
|
Sep 23 2022, 05:24 PM
|
|
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
|
Sep 23 2022, 11:07 PM
|
|
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
|
Sep 23 2022, 11:10 PM
|
|
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
|
Sep 24 2022, 01:56 AM
|
|
QUOTE(vincent_ng86 @ Sep 23 2022, 11:10 PM) 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
|
Sep 24 2022, 09:26 PM
|
|
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
|
Sep 26 2022, 05:03 AM
|
|
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
|
Sep 26 2022, 10:16 AM
|
Getting Started

|
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
|
Sep 27 2022, 12:20 PM
|
|
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
|
Sep 27 2022, 12:21 PM
|
|
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
|
Sep 28 2022, 12:52 PM
|
New Member
|
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
|
Oct 18 2022, 11:08 AM
|
Getting Started

|
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
|
Nov 13 2022, 05:23 PM
|
|
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
|
Nov 26 2022, 05:06 PM
|
Getting Started

|
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
|
Nov 26 2022, 06:53 PM
|
|
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
|
Sep 6 2023, 09:07 PM
|
New Member
|
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
|
Sep 6 2023, 11:03 PM
|
|
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
|
May 26 2024, 10:55 PM
|
New Member
|
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?
|
|
|
|
|
|
TSvincent_ng86
|
May 27 2024, 09:45 AM
|
|
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?  I bought this and has been using it fine since. https://item.taobao.com/item.htm?_u=r2m455s...8681409:3622544
|
|
|
|
|