{"id":50384328,"url":"https://github.com/qb4-dev/esp-lampsmart-ble","last_synced_at":"2026-05-30T14:01:15.610Z","repository":{"id":350474046,"uuid":"1206996887","full_name":"QB4-dev/esp-lampsmart-ble","owner":"QB4-dev","description":"ESP-IDF component to control BLE lighting","archived":false,"fork":false,"pushed_at":"2026-04-10T14:20:06.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-10T15:24:37.415Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/QB4-dev.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-10T13:18:29.000Z","updated_at":"2026-04-10T14:18:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/QB4-dev/esp-lampsmart-ble","commit_stats":null,"previous_names":["qb4-dev/esp-lampsmart-ble"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/QB4-dev/esp-lampsmart-ble","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QB4-dev%2Fesp-lampsmart-ble","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QB4-dev%2Fesp-lampsmart-ble/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QB4-dev%2Fesp-lampsmart-ble/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QB4-dev%2Fesp-lampsmart-ble/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QB4-dev","download_url":"https://codeload.github.com/QB4-dev/esp-lampsmart-ble/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QB4-dev%2Fesp-lampsmart-ble/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33694714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"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":[],"created_at":"2026-05-30T14:01:14.324Z","updated_at":"2026-05-30T14:01:15.601Z","avatar_url":"https://github.com/QB4-dev.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# esp-lampsmart_ble (ESP-IDF component)\r\n\r\nESP-IDF component for pairing and controlling LampSmart BLE CCT lights using BLE advertisements.\r\n\r\n## Features\r\n\r\n- Pair and unpair command support\r\n- Turn on and turn off support\r\n- Cold/warm white level control (0-255)\r\n- Supports protocol variants: V3, V2, V1A, V1B\r\n\r\n## Installation\r\n\r\n### Using ESP Component Registry\r\n\r\n[![Component Registry](https://components.espressif.com/components/qb4-dev/esp-lampsmart-ble/badge.svg)](https://components.espressif.com/components/qb4-dev/esp-lampsmart-ble)\r\n\r\n```bash\r\nidf.py add-dependency \"qb4-dev/esp-lampsmart-ble=*\"\r\n```\r\n\r\n### Manual Installation\r\n\r\nClone this repository into your project's `components` directory:\r\n\r\n```bash\r\ncd your_project/components\r\ngit clone https://github.com/QB4-dev/esp-lampsmart-ble.git esp-lampsmart-ble\r\n```\r\n\r\n## ESP32 quick start\r\n\r\n1. In your ESP-IDF project, set the target:\r\n\r\n```bash\r\nidf.py set-target esp32\r\n```\r\n\r\n2. Initialize and pair in your `app_main()`.\r\n3. Build and flash:\r\n\r\n```bash\r\nidf.py -p /dev/ttyUSB0 flash monitor\r\n```\r\n\r\n## Minimal usage\r\n\r\n```c\r\n#include \"lampsmart_ble.h\"\r\n\r\nvoid app_main(void) {\r\n  lampsmart_ble_t light = NULL;\r\n  lampsmart_ble_config_t cfg = LAMPSMART_BLE_CONFIG_DEFAULT();\r\n\r\n  cfg.group_id = 0x12345678;          // shared group id used by your lamp(s)\r\n  cfg.variant = LAMPSMART_VARIANT_3;  // try other variants if needed\r\n  cfg.tx_duration_ms = 1000;\r\n\r\n  ESP_ERROR_CHECK(lampsmart_ble_init(\u0026light, \u0026cfg));\r\n\r\n  // Put the lamp in pairing mode (usually power-cycle and pair within a short window)\r\n  ESP_ERROR_CHECK(lampsmart_ble_pair(light));\r\n\r\n  ESP_ERROR_CHECK(lampsmart_ble_set_levels(light, 180, 30));\r\n  vTaskDelay(pdMS_TO_TICKS(3000));\r\n\r\n  ESP_ERROR_CHECK(lampsmart_ble_turn_off(light));\r\n}\r\n```\r\n\r\n## Notes\r\n\r\n- This component sends non-connectable BLE advertisements and does not open a BLE GATT connection.\r\n- BLE commands are queued internally and transmitted asynchronously, so control calls return once the advertisement job is queued.\r\n- Group addressing is used by this protocol, so multiple lamps in the same group can react together.\r\n- If your lamp responds with swapped warm/cold channels, set `reversed_channels = true` in the config.\r\n\r\n## References\r\n\r\nThanks to all people from this topic:\r\nhttps://community.home-assistant.io/t/controlling-ble-ceiling-light-with-ha\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqb4-dev%2Fesp-lampsmart-ble","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqb4-dev%2Fesp-lampsmart-ble","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqb4-dev%2Fesp-lampsmart-ble/lists"}