{"id":19615569,"url":"https://github.com/jariz/homeassistant-basestation","last_synced_at":"2025-04-28T02:31:33.082Z","repository":{"id":72601907,"uuid":"355590848","full_name":"jariz/homeassistant-basestation","owner":"jariz","description":"Read and manage power states for your Valve Index® Base Stations in Home Assistant.","archived":false,"fork":false,"pushed_at":"2024-07-15T08:21:57.000Z","size":32,"stargazers_count":52,"open_issues_count":5,"forks_count":17,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-26T15:52:33.090Z","etag":null,"topics":["basestation","hmd","home-assistant","home-automation","index","lighthouse","steamvr","valve","vr"],"latest_commit_sha":null,"homepage":"","language":"Python","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/jariz.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}},"created_at":"2021-04-07T15:15:25.000Z","updated_at":"2025-04-15T00:20:34.000Z","dependencies_parsed_at":"2024-07-15T10:12:17.630Z","dependency_job_id":null,"html_url":"https://github.com/jariz/homeassistant-basestation","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/jariz%2Fhomeassistant-basestation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jariz%2Fhomeassistant-basestation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jariz%2Fhomeassistant-basestation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jariz%2Fhomeassistant-basestation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jariz","download_url":"https://codeload.github.com/jariz/homeassistant-basestation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251238053,"owners_count":21557391,"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":["basestation","hmd","home-assistant","home-automation","index","lighthouse","steamvr","valve","vr"],"created_at":"2024-11-11T10:57:21.647Z","updated_at":"2025-04-28T02:31:32.817Z","avatar_url":"https://github.com/jariz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Valve Basestation integration for Homeassistant\n\nRead and manage power states for your Valve Index® Base Stations (also referred to as 'Lighthouse V2') through [BLE](https://en.wikipedia.org/wiki/Bluetooth_Low_Energy).\n\n![](https://jari.lol/TYc7q1qt9E.png)  \n\n## Installation\n\n- Ensure [HACS](https://hacs.xyz) is installed.\n- Go to Community -\u003e Frontend -\u003e press the three dots (top right corner of screen) -\u003e Custom repositories and add the following information: \n  - Add custom repository URL: https://github.com/jariz/homeassistant-basestation \n  - Category: `Integration` \n  - Press add.\n  - Now in the repository overview, click install next to this repo.\n\n## Will it run?\n\nBefore configuring Home Assistant you need a Bluetooth backend and the MAC address of your basestation. Depending on your operating system, you may have to configure the proper Bluetooth backend for your system:\n\n- On [Home Assistant](https://home-assistant.io/hassio/installation/): integration works out of the box.\n- On [Home Assistant Container](https://home-assistant.io/docs/installation/docker/): Works out of the box with `--net=host` and properly configured Bluetooth on the host.\n- On other Linux systems:\n  - Install the `bluepy` library (via pip). When using a virtual environment, make sure to install the library in the right one.\n\n## Scan for devices\n\nStart a scan to determine the MAC addresses of your basestations (you can identify a basestation by looking for entries starting with `LHB-`, for example: `LHB-F27AE376`) using this command:\n\n```bash\n$ sudo hcitool lescan\nLE Scan ...\n1B:BE:05:0D:B0:5C (unknown)\nF3:C7:68:BB:23:0B LHB-60B5777F\nF7:8A:B0:FD:08:B5 LHB-F27AE376\n[...]\n```\n\nOr, if your distribution is using bluetoothctl use the following commands:\n\n```bash\n$ bluetoothctl\n[bluetooth]# scan on\n[NEW] Controller \u003cyour Bluetooth adapter\u003e [default]\n[NEW] Device F3:C7:68:BB:23:0B LHB-60B5777F\n```\n\nIf you can't use `hcitool` or `bluetoothctl` but have access to an Android phone you can try `BLE Scanner` or similar scanner applications from the Play Store to easily find your sensor MAC address. If you are using Windows 10, try the `Microsoft Bluetooth LE Explorer` app from the Windows Store.\n\n## Configuration\n\nTo use your basestation(s) in your installation, add the following to your `configuration.yaml` file:\n\n```yaml\n# Example configuration.yaml entry\nswitch:\n  - platform: basestation\n    mac: \"xx:xx:xx:xx:xx:xx\"\n```\n\n### More expansive example\n\nSince you'll probably be adding more than 1 basestation, it's a good idea to use the [group integration](https://www.home-assistant.io/integrations/group) to group them together and control them all at once.\n\n```yaml\ngroup:\n  basestations:\n    name: Basestations\n    entities:\n      - switch.lhb_1\n      - switch.lhb_2\n\nswitch:\n  - platform: basestation\n    mac: \"xx:xx:xx:xx:xx:xx\"\n    name: \"LHB 1\"\n  - platform: basestation\n    mac: \"xx:xx:xx:xx:xx:xx\"\n    name: \"LHB 2\"\n```\n\n## Automation ideas\n\n- Turn the airco on when your VR equipment activates.\n- Turn your basestations off/on when you turn off/on the lights\n- Turn your basestations off if there's no motion detected in the room anymore, or if you've left the house.\n- Start your computer (wake on lan), VR equipment, and screen (power plug) all at once.\n\n## Final notes\n\n- Yes, BLE does not conmmunicate well over long range.  \n  If this integration becomes any popular, ~~I'm willing to write a gateway app [like miflora has](https://github.com/ThomDietrich/miflora-mqtt-daemon) at some point.~~. I more or less did this with ESP32: [read here](https://blog.jari.io/tracking-valve-index-basestation-power-state-with-esphome/).\n- Largely inspired by [the miflora integration](https://github.com/home-assistant/core/tree/dev/homeassistant/components/miflora), thanks!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjariz%2Fhomeassistant-basestation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjariz%2Fhomeassistant-basestation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjariz%2Fhomeassistant-basestation/lists"}