{"id":19768484,"url":"https://github.com/litui/esphome-components","last_synced_at":"2025-04-30T17:30:24.319Z","repository":{"id":41355351,"uuid":"467329992","full_name":"litui/esphome-components","owner":"litui","description":"Litui's ESPHome Components repository - NeewerLight","archived":false,"fork":false,"pushed_at":"2025-03-15T00:52:39.000Z","size":36,"stargazers_count":11,"open_issues_count":3,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-24T23:13:06.701Z","etag":null,"topics":["ble","bluetooth","bluetooth-le","bluetooth-low-energy","control-lights","esp32","esphome","home-assistant","homeassistant","neewer-lights"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/litui.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":"2022-03-08T02:10:56.000Z","updated_at":"2025-03-15T00:51:55.000Z","dependencies_parsed_at":"2025-03-10T03:40:41.804Z","dependency_job_id":"81121b71-4e22-491d-844f-d0a65c85d665","html_url":"https://github.com/litui/esphome-components","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litui%2Fesphome-components","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litui%2Fesphome-components/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litui%2Fesphome-components/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litui%2Fesphome-components/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/litui","download_url":"https://codeload.github.com/litui/esphome-components/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251751024,"owners_count":21637842,"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":["ble","bluetooth","bluetooth-le","bluetooth-low-energy","control-lights","esp32","esphome","home-assistant","homeassistant","neewer-lights"],"created_at":"2024-11-12T04:38:38.545Z","updated_at":"2025-04-30T17:30:24.303Z","avatar_url":"https://github.com/litui.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Litui's ESPHome Components\n\n\u003e [ESPHome](https://esphome.io/) is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.\n\nESPHome, happily, also supports [3rd party components](https://esphome.io/components/external_components.html).\n\nTo add all my components at the current release version to any of your ESPHome-configured devices, use the following syntax in your ESP32 device's .yaml file:\n\n```yaml\nexternal_components:\n- source: github://litui/esphome-components@v1.0.1\n```\n\nTo add the main development tree instead, replace `v1.0.1` with `main`.\n\n## NeewerLight Support\n\n### Kudos\n\n* Big props to Xu Lian ([keefo](https://github.com/keefo)) for their [NeewerLite](https://github.com/keefo/NeewerLite) OS X swift app which helped me through understanding the particulars of Neewer's strange BLE approach and quirks. My ESPHome component is a reimplementation of parts of their approach in C++.\n\n### Rationale\n\nWhy make a Neewer Light BLE light component in ESPHome?\n1. The official Neewer app is only available on iOS and Android, and is, in a word, terrible at its job. I have never been able to maintain connection to the lights using my Android phone. Additionally their app requires a Neewer login connected to my email address.\n2. I don't have a personal OS X system or I would probably have just used keefo's NeewerLite.\n3. Trying to control BLE devices from Windows was like pulling teeth and I couldn't for the life of me get it to stay connected.\n4. I had similar luck trying to figure out a full-featured BLE implementation in Python on Raspbian that would serve my purposes.\n5. I've recently been playing with Home Assistant, ESPHome, and ESP32 boards, and discovered (much to my amazement) that the ESP32's BLE stack/hardware can actually stay connected to the Neewer-RGB660.\n\n### Supported Devices\nThe only device I've spent any time trying to support is my own Neewer RGB660. So the list, if you insist on one, looks like this:\n\n* Neewer RGB660\n\nOther Neewer RGB/Colour Temperature devices will likely work with all or a subset of these BLE commands but I haven't tailored the support. Feel free to fork and try things out.\n\n### Usage\n\nTo add only the NeewerLight support to your ESPHome instance (in case I add more components later), use the following syntax in your ESP32 device's .yaml file.\n\n```yaml\nexternal_components:\n- source: github://litui/esphome-components@v1.0.0\n  components: [ neewerlight_ble, neewerlight ]\n```\n\nSimilar to the [Airthings BLE implementation](https://github.com/esphome/esphome/tree/dev/esphome/components/airthings_ble), the `neewerlight_ble` component will simply draw your attention to the Neewer-RGB660 devices detected by `esp32_ble_tracker`. From there, you'll need to copy/paste or otherwise record the Bluetooth MAC addresses of your devices. After that point, `neewerlight_ble` becomes unnecessary.\n\nTo control your light in Home Assistant, you'll need to set up the `ble_client` with your MAC address and an ID, then set up a `light` block with the platform `neewerlight`.\n\nIt should look as follows:\n\n```yaml\nesp32_ble_tracker:\n\n### Commented out after initial detection:\n# neewerlight_ble:\n\n### Added the following blocks with the detected\n### mac addresses:\nble_client:\n- mac_address: AA:AA:AA:AA:AA:AA\n  id: nw660_ble_1\n- mac_address: BB:BB:BB:BB:BB:BB\n  id: nw660_ble_2\n\nlight:\n- platform: neewerlight\n  name: \"NW660 RGB Light 1\"\n  ble_client_id: nw660_ble_1\n  gamma_correct: 1.0\n  default_transition_length: 0s\n\n- platform: neewerlight\n  name: \"NW660 RGB Light 2\"\n  ble_client_id: nw660_ble_2\n  gamma_correct: 1.0\n  default_transition_length: 0s\n```\n\nSet `gamma_correct` as you desire; 1.0 makes the most sense for me. I **highly** recommend setting `default_transition_length` to `0s` to prevent spamming the wonky Neewer BLE implementation with far too many instructions at once. I've had my lamps suddenly stop responding to requests when overwhelmed (they overwhelm easily) and I needed to physically turn them off and on again.\n\n### Todo:\n\nI'm still working on learning the ropes of the ESPHome Python validations. The current set is not very strict.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitui%2Fesphome-components","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flitui%2Fesphome-components","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitui%2Fesphome-components/lists"}