{"id":23677104,"url":"https://github.com/frimtec/home-assistant-awning","last_synced_at":"2025-07-28T23:08:02.077Z","repository":{"id":40451169,"uuid":"416614270","full_name":"frimtec/home-assistant-awning","owner":"frimtec","description":"🏠Awning control for Home-Assistant.","archived":false,"fork":false,"pushed_at":"2025-03-22T10:02:08.000Z","size":1182,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T09:22:45.838Z","etag":null,"topics":["awning","esp32","esphome","home-assistant","home-automation","sensor","sunlight","wind"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frimtec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-10-13T06:23:05.000Z","updated_at":"2025-03-22T10:01:36.000Z","dependencies_parsed_at":"2025-01-25T13:18:07.042Z","dependency_job_id":"6143c667-e123-4457-ab53-342363802813","html_url":"https://github.com/frimtec/home-assistant-awning","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"c5550c9302240f0829491b10868380c7a8209698"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/frimtec/home-assistant-awning","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frimtec%2Fhome-assistant-awning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frimtec%2Fhome-assistant-awning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frimtec%2Fhome-assistant-awning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frimtec%2Fhome-assistant-awning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frimtec","download_url":"https://codeload.github.com/frimtec/home-assistant-awning/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frimtec%2Fhome-assistant-awning/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267600211,"owners_count":24113737,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["awning","esp32","esphome","home-assistant","home-automation","sensor","sunlight","wind"],"created_at":"2024-12-29T14:58:30.165Z","updated_at":"2025-07-28T23:08:02.071Z","avatar_url":"https://github.com/frimtec.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"## Home Assistant Awning\n\n[![License][license-shield]][license]\n\n![Project Maintenance][maintenance-shield]\n\n\"Home Assistant Awning\" can be used to manually build up a low cost but high functional awnings control system for the\nhome assistant platform.\nLow cost at least if you already have the mechanical installation of the awnings including the motors to move them.\n\nIn my case I control two independent awnings for the south and the west side of my winter garden. The installation is\nalready over 20 years old and the controller was a closed system not offering any connectivity.\n\n![Sunlight and wind sensor](images/winter-garden.jpg)\n\nEach awning is moved with a retractable awning motor having an 240V AC input for expand and one for retract.\nThe retractable awning motors are controlled by a [Zigbee blinds actuator from NEXENTRO][nexentro-documentation].\n\nOn the top of the winter garden two sensors are mounted:\n* Sunlight sensor (LDR - Light Dependent Resistor)\n* Mechanical wind sensor (simple impuls output)\n\n![Sunlight and wind sensor](images/sensors.jpg)\n\nA thermostat located in the winter garden can open and close the wire to the sunlight sensor.\nIf the temperatur threshold of the thermostat is reached, the wire is closed.\n\nThe scope of this project is the low power hardware and the configuration to integrate the sensors and awning actuator into\na home assistent instance.\n\n---\n**SAFTY WARNING**\n\n**Be aware that the installation of the awnings motors must be done by a trained electrician!**\u003cbr\u003e\nDon't risk your life or burn down the house.\n---\n\n## Hardware\n\nThe hardware consists of two parts:\n* Sensor adapter board\n* ESP32 with status LED\n\n### Bill of material\n* 1 x [Node MCU ESP32][conrad-esp32]\n* 1 x [RGB LED][conrad-rgb-led]\n* 4 x [Schottky Diodes][conrad-schottky-diode]\n* 2 x [100 Ohm resistor][conrad-100-resistor]\n* 4 x [1k Ohm resistor][conrad-1k-resistor]\n* 1 x [10k Ohm resistor][conrad-10k-resistor]\n* 2 x [2 or 3 pin connector][conrad-connector]\n* 1 x [4 pin header][conrad-4pin-header]\n* 8 x [Jumper cable][conrad-jumper-cable]\n* 1 x [Circuit board][conrad-board]\n* 3D printed case (see the [case](/case) folder)\n\n### Sensor adapter board\n![Sensor adapter board](images/sensor-adapter-board.jpg)\n\nThe sensor adapter board is quite simple and can be wired best on a [Circuit board][conrad-board] according the given schema.\nThe schottky diodes (SMD diodes) mounted on the backside, require good eyesight and a steady hand.\nThe diodes are important to protect the GPIO pins of the ESP32 from over or under volatge coming in via spikes over the potential long sensor wires.\n\nThe components placed on the board are:\n* J1: Connector to the wind sensor\n* J2: Connector to the sunlight sensor (with optional thermostat)\n* J3: Connector to the ESP32\n* R1: 10k ohm resistor\n* R2: 1k ohm (or other depending on the sunlight sensor LDR)\n* R3, R5: 100 ohm resistors\n* D1-D4: Fast schottky diodes with low forward volatge (e.g. Infineon BAT60A SOD-323-2 10 V)\n\n![Schema adapter board](images/home-assistant-awning_sensor-adapter.png)\n\n\n### ESP32 with status LED\n![ESP32 in case](images/ESP32.jpg)\n![ESP32 with LED](images/ESP32-LED.jpg)\n\nThe ESP32 including the RGB-LED fits perfectly into the [case](/case) that can be 3D printed.\n\n### Wiring instruction\n\n#### Sensor adapter board\nThe wiring can be done best with jumper cabels (e.g. [jumper-cable][conrad-jumper-cable]).\n\n| Sensor adapter board | ESP32        |\n|----------------------|--------------|\n| VCC                  | 3V3          |\n| GND                  | GND          |\n| SUN                  | A32 (GPIO32) |\n| WIND                 | D13 (GPIO13) |\n\n#### RGB LED\nIt is advisable to add a resistor of about 1k Ohm between each color pin of the RGB-LED and the ESP32 GPIO pin.\nYour best bet is to use a small piece of the circuit board.\n\n| LED    | ESP32      |\n|--------|------------|\n| RED    | D2 (GPIO2) |\n| GREEN  | D4 (GPIO4) |\n| BLUE   | D5 (GPIO5) |\n| GND    | GND        |\n\n#### Flash ESP32\n\nOnce you've connected all the hardware, we'll get started with the configuration for [ESPHome][esphome].\n\nIn this repository you will find the file [esphome/frimtec-awning-sensors.yaml][file],\nwhich you can copy into the `esphome` folder of your Home Assistant config.\nFinally go through the installation wizard of ESPHome and flash the ESP32.\n\n## Configuration\nThe automations to control the awnings are prepared in blueprints.\n\nFirst copy the complete folder structure [blueprints](/blueprints) into your Home Assistant config folder.\n\n\n### Awning sensor automations\nCreate two automations to integrate the sensor board from the blueprint [awning-sensor.yaml](/blueprints/automation/frimtec/awning-sensor.yaml)\nas follows, using threshold values and times as desired for your sensors:\n\n| Name               | Sensor                          | State light                  |\n|--------------------|---------------------------------|------------------------------|\n| Awning Sensor Sun  | sensor.awning_sensor_sun_light  | Awning Sensor - Status Green |\n| Awning Sensor Wind | sensor.awning_sensor_wind_speed | Awning Sensor - Status Red   |\n\n### Awning control automations\nCreate an automation for each awning to control.\nUse the blueprint [awning-control.yaml](/blueprints/automation/frimtec/awning-control.yaml)\nas follows:\n\n| Field               | Value                             |\n|---------------------|-----------------------------------|\n| Name                | Use a name to identify the awning | \n| Sun state sensor    | light.awning_sensor_status_green  | \n| Wind state sensor   | light.awning_sensor_status_red    | \n| Awning              | Select awning entity to control   |\n| Min/Max sun azimuth | Define Min/Max sun azimuth        |\n\n\n### Calibrate the wind sensor\nThe wind sensor reports the wind speed in km/h.\nTo have accurate results two characteristics of the used cup anemometer needs to be configured in the home assistant device:\n* radius: cup anemometer radius in millimeter (default value: 38 mm)\n* impulses_per_rotation: cup anemometer impulses per full rotation (default value: 1)\n\nThe wind speed is measured as impulses per minute (x) and then converted into km/h with the following formula:\n```\nv = x * ((2 * Pi * radius * 60) / (impulses_per_rotation * 1'000'000))   \n```\n\n### Calibrate the sunlight sensor\nThe sunlight sensor reports the illuminance in lx.\nTo have accurate results the measured value from the ADC can be adjusted by two parameters 'sunlight_additive' and 'sunlight_multiplicative'.\nThe illuminance is calculated with the following formula:\n```\ni = (x + sunlight_additive) * sunlight_multiplicative   \n```\nNegative values are clipped to zero.\n\n### Example Dashboard\n![Dashboard example](images/dashboard.png)\n\n# Credits\n* [klaasnicolaas][github-klaasnicolaas] for the 3D case provided in [home-assistant-glow][home-assistant-glow]\n\n\n[file]: /esphome/frimtec-awning-sensors.yaml\n[maintenance-shield]: https://img.shields.io/maintenance/yes/2024.svg\n[license-shield]: https://img.shields.io/github/license/frimtec/home-assistant-awning.svg\n[license]: https://opensource.org/licenses/Apache-2.0\n[nexentro-documentation]: https://cdn.competec.ch/documents2/4/5/5/194267554/194267554.pdf\n[esphome]: https://esphome.io\n[github-klaasnicolaas]: https://github.com/klaasnicolaas\n[home-assistant-glow]: https://github.com/klaasnicolaas/home-assistant-glow\n[conrad-esp32]: https://www.conrad.ch/de/p/joy-it-entwickler-platine-node-mcu-esp32-modul-1656367.html\n[conrad-rgb-led]: https://www.conrad.ch/de/p/kingbright-l-154a4surkqbdzgw-led-mehrfarbig-rot-blau-gruen-rund-5-mm-200-mcd-300-mcd-1300-mcd-60-20-ma-1-95-v-3-3-1050466.html\n[conrad-board]: https://www.conrad.ch/de/p/rademacher-wr-typ-710-2-platine-hartpapier-l-x-b-100-mm-x-75-mm-35-m-rastermass-2-54-mm-inhalt-1-st-529531.html\n[conrad-jumper-cable]: https://www.conrad.ch/de/p/joy-it-rb-cb3-025-jumper-kabel-raspberry-pi-banana-pi-arduino-20x-drahtbruecken-buchse-20x-drahtbruecken-buchse-25-0-1182193.html\n[conrad-4pin-header]: https://www.conrad.ch/de/p/connfly-stiftleiste-standard-anzahl-reihen-1-polzahl-je-reihe-40-ds1021-1-40sf11-1-st-1390109.html\n[conrad-schottky-diode]: https://www.conrad.ch/de/p/infineon-technologies-schottky-diode-gleichrichter-bat60a-sod-323-2-10-v-einzeln-tape-cut-154027.html\n[conrad-100-resistor]: https://www.conrad.ch/de/p/yageo-cfr-25jt-52-100r-kohleschicht-widerstand-100-axial-bedrahtet-0207-0-25-w-5-1-st-1417639.html\n[conrad-1k-resistor]: https://www.conrad.ch/de/p/yageo-cfr-25jt-52-1k0-kohleschicht-widerstand-1-k-axial-bedrahtet-0207-0-25-w-5-1-st-1417699.html\n[conrad-10k-resistor]: https://www.conrad.ch/de/p/yageo-cfr-25jt-52-10k-kohleschicht-widerstand-10-k-axial-bedrahtet-0207-0-25-w-5-1-st-1417697.html\n[conrad-connector]: https://www.conrad.ch/de/p/te-connectivity-282837-3-schraubklemmblock-1-40-mm-polzahl-num-3-gruen-1-st-1421685.html?gclid=CjwKCAjwzaSLBhBJEiwAJSRokh-6w8SD5mRbWpBqTB3dXs7ZV1in-iJpRmjEg686jQaoJfRHSNdqnBoCJiMQAvD_BwE\u0026utm_source=google-shopping-de\u0026utm_medium=search\u0026utm_campaign=shopping-online-de\u0026utm_content=shopping-ad_cpc\u0026WT.srch=1\u0026ef_id=CjwKCAjwzaSLBhBJEiwAJSRokh-6w8SD5mRbWpBqTB3dXs7ZV1in-iJpRmjEg686jQaoJfRHSNdqnBoCJiMQAvD_BwE%3AG%3As\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrimtec%2Fhome-assistant-awning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrimtec%2Fhome-assistant-awning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrimtec%2Fhome-assistant-awning/lists"}