{"id":50942510,"url":"https://github.com/usimd/window-sensor","last_synced_at":"2026-06-17T16:15:03.985Z","repository":{"id":361906991,"uuid":"1256033431","full_name":"usimd/window-sensor","owner":"usimd","description":"BLE window sensor — nRF54L10 + BTHome v2 for Home Assistant","archived":false,"fork":false,"pushed_at":"2026-06-01T18:49:55.000Z","size":1045,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-01T20:17:17.353Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/usimd.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-01T11:57:13.000Z","updated_at":"2026-06-01T18:50:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/usimd/window-sensor","commit_stats":null,"previous_names":["usimd/window-sensor"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/usimd/window-sensor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usimd%2Fwindow-sensor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usimd%2Fwindow-sensor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usimd%2Fwindow-sensor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usimd%2Fwindow-sensor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usimd","download_url":"https://codeload.github.com/usimd/window-sensor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usimd%2Fwindow-sensor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34453839,"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-06-17T02:00:05.408Z","response_time":127,"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-06-17T16:15:03.172Z","updated_at":"2026-06-17T16:15:03.966Z","avatar_url":"https://github.com/usimd.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BLE window sensor for Homeassistant\n\n![License HW: CERN-OHL-W-2.0](https://img.shields.io/badge/license_HW-CERN--OHL--W--2.0-blue)\n![License FW: Apache-2.0](https://img.shields.io/badge/license_FW-Apache--2.0-blue)\n[![CI](https://github.com/usimd/window-sensor/actions/workflows/ci.yaml/badge.svg)](https://github.com/usimd/window-sensor/actions/workflows/ci.yaml)\n[![codecov](https://codecov.io/gh/usimd/window-sensor/branch/main/graph/badge.svg)](https://codecov.io/gh/usimd/window-sensor)\n[![Upload to AISLER](https://img.shields.io/badge/Upload_to_-AISLER-ff8000)](https://aisler.net/p/new?url=https://raw.githubusercontent.com/usimd/window-sensor/refs/heads/main/window-sensor.kicad_pcb\u0026ref=github)\n\nBLE window/door sensor built around the u-blox NORA-B226 (nRF54L10). Broadcasts open/closed/tilt state via BTHome v2 non-connectable advertising. MCUboot OTA-capable.\n\n![Rendered PCB](window-sensor.png)\n\n## Hardware\n\n- **MCU**: nRF54L10 (Cortex-M33, 1 MiB RRAM, 192 KB RAM) in u-blox NORA-B226-00B module\n- **Sensor**: TMAG5273 3D Hall-effect sensor for contactless magnet detection\n- **Power**: CR14250 (½AA) lithium cell, target multi-year battery life\n- **Enclosure**: 3D-printed case with magnet holder (FreeCAD, `case/`)\n\n## Firmware\n\nRust + Embassy async runtime, BLE via nrf-sdc + trouble-host.\n\n- Non-connectable BTHome v2 advertising (open / closed / tilt)\n- MCUboot bootloader with ed25519-signed OTA images\n- Host-side unit tests for classifier and gesture logic\n\n## Repository Structure\n\n| Path | Description |\n|---|---|\n| `*.kicad_*` | KiCad 10 schematic, PCB, and project files |\n| `lib/` | Local symbol/footprint libraries and 3D models |\n| `firmware/` | Rust firmware (Embassy, BLE, MCUboot support) |\n| `firmware/mcuboot/` | MCUboot config and partition overlay |\n| `case/` | FreeCAD enclosure design and 3MF exports |\n| `scripts/` | BLE scanner and dev utilities |\n| `sim/` | Magnetic simulation data |\n\n## Building\n\n```bash\n# Install toolchain\nrustup target add thumbv8m.main-none-eabihf\ncargo install just cargo-binutils\n\n# Build, lint, test\njust ci\n\n# Flash (requires probe-rs + debug probe)\njust run\n```\n\n## License\n\nDual-licensed: hardware under CERN-OHL-W-2.0, firmware under Apache-2.0. See [`LICENSE`](LICENSE).\n\n## AISLER discount\n\nIn case you want to build this (or any other) project at AISLER, here's a 10€ discount code for you: `MakeInEurope-ZDCTN`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusimd%2Fwindow-sensor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusimd%2Fwindow-sensor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusimd%2Fwindow-sensor/lists"}