{"id":49253067,"url":"https://github.com/kixel-cz/ha-onecontrol-ble","last_synced_at":"2026-05-02T22:08:17.637Z","repository":{"id":351194889,"uuid":"1209965626","full_name":"kixel-cz/ha-onecontrol-ble","owner":"kixel-cz","description":"Home Assistant integration for 1Control SoloMini BLE gate opener","archived":false,"fork":false,"pushed_at":"2026-04-24T23:43:54.000Z","size":308,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-25T01:35:23.230Z","etag":null,"topics":["ble","bluetooth","gate","hacs","home-assistant"],"latest_commit_sha":null,"homepage":"","language":"Python","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/kixel-cz.png","metadata":{"files":{"readme":"README.md","changelog":"changes.txt","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-14T00:48:50.000Z","updated_at":"2026-04-24T23:42:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kixel-cz/ha-onecontrol-ble","commit_stats":null,"previous_names":["kixel-cz/ha-onecontrol-ble"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/kixel-cz/ha-onecontrol-ble","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kixel-cz%2Fha-onecontrol-ble","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kixel-cz%2Fha-onecontrol-ble/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kixel-cz%2Fha-onecontrol-ble/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kixel-cz%2Fha-onecontrol-ble/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kixel-cz","download_url":"https://codeload.github.com/kixel-cz/ha-onecontrol-ble/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kixel-cz%2Fha-onecontrol-ble/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32437111,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T17:34:55.123Z","status":"ssl_error","status_checked_at":"2026-04-29T17:34:45.749Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ble","bluetooth","gate","hacs","home-assistant"],"created_at":"2026-04-25T01:09:57.579Z","updated_at":"2026-04-29T18:00:59.840Z","avatar_url":"https://github.com/kixel-cz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 1Control SoloMini BLE for Home Assistant\n\n[![HACS Custom][hacs-badge]][hacs-url]\n[![License: MIT][license-badge]][license-url]\n[![HA Version][ha-badge]][ha-url]\n\nLocal Home Assistant integration for **1Control SoloMini** via Bluetooth. No cloud dependency during operation — everything works directly over BLE.\n\n## Features\n\n- ✅ Open garage door / gate with one tap\n- ✅ Fully local operation — no cloud, no internet required after setup\n- ✅ Works with any HA Bluetooth adapter (built-in or USB dongle)\n- ✅ HACS installation\n\n---\n\n## Prerequisites\n\nTo set up the integration, you need to extract security keys from the 1Control cloud **once** during initial configuration. This requires capturing a mitmproxy log while the 1Control app opens your gate. The keys are permanent and do not change — you will not need to repeat this process.\n\n---\n\n## Installation via HACS\n\n[![Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=kixel-cz\u0026repository=ha-onecontrol-ble\u0026category=integration)\n\nOr manually:\n\n1. Open **HACS** → **Integrations**\n2. Click ⋮ (top right) → **Custom repositories**\n3. URL: `https://github.com/kixel-cz/ha-onecontrol-ble`, Category: **Integration**\n4. Click **Add** → find **1Control SoloMini BLE** → **Install**\n5. Restart Home Assistant\n\n---\n\n## Getting security keys (one-time setup)\n\nThe integration requires three keys extracted from the 1Control cloud: **LTK**, **Session Key**, and **Session ID**. These are permanent and tied to your device pairing.\n\n### Method: mitmproxy\n\n1. Install [mitmproxy](https://mitmproxy.org/) on your computer - see [installation documentation](https://docs.mitmproxy.org/stable/overview/installation/)\n2. Configure your phone to use your computer as an HTTP/HTTPS proxy (Settings -\u003e Wi-Fi -\u003e current network -\u003e HTTP proxy: manual ...). Turn the WiFi off and on again to make sure new settings were applied (turn off any VPN if enabled).\n3. Install the mitmproxy CA certificate on your phone - [instructions](https://docs.mitmproxy.org/stable/concepts/certificates/)\n4. Start `mitmdump -w onecontrol.log` on your computer\n5. Open the 1Control app and trigger a gate open\n6. Stop mitmproxy — the log file `onecontrol.log` now contains the keys\n\nYou can then either:\n- **Paste the log directly** into the integration setup (it will extract the keys automatically), or\n- **Use the extraction script** from the `tools/` folder:\n\n```bash\npython3 tools/parse_mitm_log.py onecontrol.log\n```\n\nOutput:\n```\nLTK:         xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nSession Key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nSession ID:  xxxxxxxxxxxxxxxx\n```\n\n---\n\n## Configuration\n\n1. **Settings → Devices \u0026 Services → Add Integration**\n2. Search for **1Control SoloMini BLE**\n3. **Step 1 — mitmproxy log** (optional): paste the log contents for automatic key extraction, or leave empty to enter keys manually\n4. **Step 2 — Device data**: enter the BLE address and security keys\n5. Click **Submit**\n\nA **Cover** entity is created which you can add to your dashboard or use in automations.\n\n### Where do I find the BLE address?\n\n- In the 1Control app: device detail → info\n- On the label on the SoloMini device itself\n- In HA: **Settings → System → Bluetooth** → list of visible devices\n\n---\n\n## Automation example\n\n```yaml\nautomation:\n  - alias: \"Open gate on arrival\"\n    trigger:\n      - platform: zone\n        entity_id: person.me\n        zone: zone.home\n        event: enter\n    action:\n      - service: cover.open_cover\n        target:\n          entity_id: cover.solomini_gate\n```\n\n---\n\n## Troubleshooting\n\n| Issue | Solution |\n|---|---|\n| Device not visible in HA | Check HA Bluetooth adapter, restart integration |\n| Gate doesn't open | Verify the security keys — they must match the paired device |\n| Integration disconnects | Normal — SoloMini is wake-on-demand over BLE |\n\n---\n\n## Technical details\n\n\u003cdetails\u003e\n\u003csummary\u003eBLE protocol (for enthusiasts)\u003c/summary\u003e\n\nReverse-engineered from `it.onecontrol.apk` v2.6.4 and iOS btsnoop captures.\n\n### BLE characteristics\n\n| UUID | Direction | Type |\n|---|---|---|\n| `D973F2E1-B19E-11E2-9E96-0800200C9A66` | HA → device | Write |\n| `D973F2E2-B19E-11E2-9E96-0800200C9A66` | device → HA | Indicate |\n\n### Communication flow\n\n```\n1. SESSION (every connection):\n   HA → device:  [00][0A][90][02][randomA_8B]        (StartSession)\n   device → HA:  [00][0A][90][00][randomB_8B]\n   our_sessionID  = SHA256(randomA || randomB)[0:8]\n   our_sessionKey = SHA256(LTK || our_sessionID)[0:16]\n\n2. PROBE (discover current device CC counter):\n   HA → device:  [00][0F][01][AES-CCM(our_sk,cc=1)][uid_2B][0001000000]\n   device → HA:  [00][0E][01][...][uid_2B][current_CC_4B]\n\n3. OPEN (using server session key + current CC):\n   server_sessionKey = SHA256(LTK || server_sessionID)[0:16]\n   nonce   = server_sessionID || (current_CC+1) as uint32 LE   (12 B)\n   aad     = [userID 2B] || [(CC+1) uint32 LE] || [0x01]       (7 B)\n   CCM_out = AES-CCM-128(server_sessionKey, nonce, aad,\n               plaintext=[0x01, action], mac_len=6)             (8 B)\n   packet: [00][0F][01][CCM_out_8B][userID_2B][CC+1_4B]\n```\n\n### Key insight\n\nThe device stores a permanent **Session ID** from the initial cloud pairing. It only accepts open commands encrypted with `SHA256(LTK || stored_sessionID)`. This key is available from the 1Control cloud API (`/security/{serial}`) and does not change.\n\n### Key APK source files\n\n| File | Description |\n|---|---|\n| `w2.java` | StartSession — session key derivation |\n| `d9/e.java` | AES-CCM packet builder (`e.h()`) |\n| `StartSessionRequest.java` | Session packet format |\n| `OpenAccessRequest.java` | Open command format |\n| `ControlSecurityRequest.java` | Base class for all encrypted commands |\n\n\u003c/details\u003e\n\n---\n\n## License\n\nMIT — see [LICENSE](LICENSE)\n\n[hacs-badge]: https://img.shields.io/badge/HACS-Custom-orange.svg\n[hacs-url]: https://hacs.xyz\n[license-badge]: https://img.shields.io/badge/License-MIT-blue.svg\n[license-url]: LICENSE\n[ha-badge]: https://img.shields.io/badge/HA-2024.4%2B-green.svg\n[ha-url]: https://www.home-assistant.io\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkixel-cz%2Fha-onecontrol-ble","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkixel-cz%2Fha-onecontrol-ble","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkixel-cz%2Fha-onecontrol-ble/lists"}