{"id":24686912,"url":"https://github.com/ixy05/homespan-d5evo-gate","last_synced_at":"2025-07-14T10:08:05.436Z","repository":{"id":273279193,"uuid":"915100652","full_name":"ixy05/homespan-d5evo-gate","owner":"ixy05","description":"HomeKit gate controller for Centurion (Centsys) D5 Evo gate motor","archived":false,"fork":false,"pushed_at":"2025-03-29T13:06:09.000Z","size":2460,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-21T10:05:36.388Z","etag":null,"topics":["centsys","centurion","d5-evo","d5evo","esp32","esp32-s2","garage","garage-door-opener","gate","gate-opener","home-automation","homekit","homespan"],"latest_commit_sha":null,"homepage":"https://f.mcgr.gr/g/HSgate","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ixy05.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-11T01:09:39.000Z","updated_at":"2025-06-02T01:49:49.000Z","dependencies_parsed_at":"2025-01-20T00:19:58.691Z","dependency_job_id":"95281f13-e145-4f29-bba1-bf866220c28a","html_url":"https://github.com/ixy05/homespan-d5evo-gate","commit_stats":null,"previous_names":["ixy05/homespan-d5evo-gate"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ixy05/homespan-d5evo-gate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixy05%2Fhomespan-d5evo-gate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixy05%2Fhomespan-d5evo-gate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixy05%2Fhomespan-d5evo-gate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixy05%2Fhomespan-d5evo-gate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ixy05","download_url":"https://codeload.github.com/ixy05/homespan-d5evo-gate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixy05%2Fhomespan-d5evo-gate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265277659,"owners_count":23739431,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["centsys","centurion","d5-evo","d5evo","esp32","esp32-s2","garage","garage-door-opener","gate","gate-opener","home-automation","homekit","homespan"],"created_at":"2025-01-26T16:17:04.074Z","updated_at":"2025-07-14T10:08:05.427Z","avatar_url":"https://github.com/ixy05.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HomeKit Gate Controller for Centurion D5-Evo Gate Motor\n\n**HomeKit gate controller for Centurion (Centsys) D5 Evo gate motor**\n\nThis project implements a HomeKit-compatible gate controller using an ESP32 microcontroller and the HomeSpan library, specifically designed for Centurion (Centsys) D5-Evo gate motors. It enables remote control and status monitoring of the gate with Apple HomeKit.\n\n## Features\n- ✅ **HomeKit Integration:** Seamless control via the Apple Home app using the HomeSpan library.\n- ✅ **Gate Control:** Open and close the gate with a relay trigger.\n- ✅ **Status Detection:** Real-time detection of gate states (open, closed, opening, closing).\n- ✅ **Gate Status** Detects when gate opens/closes from a different source (e.g. remote control, intercom, keypad).\n\n## How It Works\nThe system uses an ESP32 microcontroller to manage a relay and monitor the gate's operational state:\n- **Relay Control:** The relay pin (GPIO 35) triggers the gate motor.\n- **Status Monitoring:** The status pin (GPIO 39) monitors the gate's operation based on pulse patterns sent by the gate controller.\n- **Flashing Patterns:** The gate signals its state using pulse patterns, where the duration of HIGH and LOW signals indicates whether the gate is opening or closing.\n- **Logic Level Conversion:** A logic level converter is used to shift the gate's 5V status signal to a 3.3V input suitable for the ESP32.\n\nThe `DEV_GATE.h` class implements:\n- `update()` – Triggered by HomeKit to open/close the gate.\n- `loop()` – Continuously monitors the gate's state based on the input pin.\n\n## Hardware Requirements\n- ESP32 microcontroller\n- Relay module (for gate control)\n- Logic level converter (5V to 3.3V signal conversion on status pin)\n\n## Wiring\n```\n+----------------------+\n|        ESP32         |\n|----------------------|\n| GND  ----------------|-----\u003e **Relay GND, Gate GND, LLC GND** \n| 3.3V ----------------|-----\u003e LLC LV\n| 5V ------------------|-----\u003e LLC HV, Relay VCC\n| GPIO 35 -------------|-----\u003e Relay IN\n| GPIO 39 \u003c------------|----- LLC LV OUT\n+----------------------+\n                                \n                                \n+------------------------+ \n|      RELAY MODULE      |\n|------------------------|\n| IN  \u003c---- GPIO 35      |\n| NO  -----\u003e Gate TRIG   |\n| COM -----\u003e GND         |\n| VCC \u003c---- 5V           |\n| GND \u003c---- GND          |\n+------------------------+\n\n\n +---------------------------+    \n | LOGIC LEVEL CONVERTER     |    \n |---------------------------|\n | HV  \u003c---- 5V              |\n | LV  \u003c---- 3.3V            |\n | GND \u003c---- GND             |\n | HV IN \u003c---- Gate Status   |\n | LV OUT ----\u003e GPIO 39      |\n +---------------------------+  \n\n\n+----------------------------+  \n|         GATE MOTOR         |\n|----------------------------|\n| GND  -----\u003e ESP32 GND      |\n| TRIG \u003c----- Relay NO       |\n| Status  -----\u003e LLC HV IN   |\n+----------------------------+\n\n\n\n```\n![428311938-f44cfe6e-a5c6-495d-8480-1c9bc4ff0227](https://github.com/user-attachments/assets/59c98669-cf6b-4768-b37a-f5637a8d8164)\n\nOnly three connections need to be made to the D5 Evo Gate Motor:\n1. Trig: this needs to be connected to ground for the gate to activate. I have connected this to a relay controlled by the ESP32\n2. Status: this needs to be logic-level-converted from 5V to 3.3V. Connect to a GPIO pin of the ESP32\n3. Com (ground, 0V): this is important for two reason: (1) status decoding and (2) triggering (activating) the gate. Because of (1), **the gate must share a ground with the esp32**. \n\n\n## Software Requirements\n- [HomeSpan Library](https://github.com/HomeSpan/HomeSpan)\n- Arduino IDE (for programming the ESP32)\n\n## Configuration\n- **Wi-Fi:** Set credentials in `main.ino`.\n- **HomeKit Pin:** Default pairing pin is `06533259`.\n- **Pins:** Adjust `statusPin` and `relayPin` if necessary.\n  \n## Installation\n1. Install the HomeSpan library in Arduino IDE.\n2. Download and open both `main.ino` and `DEV_GATE.h` in an IDE.\n3. Configure Wi-Fi credentials, HomeKit pairing code in `main.ino`.\n4. Upload the files to your ESP32.\n5. Pair the device with HomeKit using the code.\n\n## Future Improvements\n- **Obstruction Detection:** Currently not implemented.\n\n## License\nThis project is open-source under the MIT License.\n\n## Contributing\nContributions are welcome! Feel free to submit pull requests or open issues for improvements and bug fixes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fixy05%2Fhomespan-d5evo-gate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fixy05%2Fhomespan-d5evo-gate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fixy05%2Fhomespan-d5evo-gate/lists"}