Read and manage power states for your Valve Index® Base Stations (also referred to as 'Lighthouse V2') through BLE. This is a Combined fork from @jariz, @TCL987 and the Patch from @Azelphur
- Ensure HACS is installed.
- Go to Community -> Frontend -> press the three dots (top right corner of screen) -> Custom repositories and add the following information:
- Add custom repository URL: https://github.com/minetech13/homeassistant-basestation
- Category:
Integration
- Press add.
- Now in the repository overview, click install next to this repo.
Before 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:
- On Home Assistant: integration works out of the box.
- On Home Assistant Container: Works out of the box with
--net=host
and properly configured Bluetooth on the host. - On other Linux systems:
- Install the
bluepy
library (via pip). When using a virtual environment, make sure to install the library in the right one.
- Install the
Start 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:
$ sudo hcitool lescan
LE Scan ...
1B:BE:05:0D:B0:5C (unknown)
F3:C7:68:BB:23:0B LHB-60B5777F
F7:8A:B0:FD:08:B5 LHB-F27AE376
[...]
Or, if your distribution is using bluetoothctl use the following commands:
$ bluetoothctl
[bluetooth]# scan on
[NEW] Controller <your Bluetooth adapter> [default]
[NEW] Device F3:C7:68:BB:23:0B LHB-60B5777F
If 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.
To use your basestation(s) in your installation, add the following to your configuration.yaml
file:
# Example configuration.yaml entry
switch:
- platform: basestation
mac: "xx:xx:xx:xx:xx:xx"
Since you'll probably be adding more than 1 basestation, it's a good idea to use the group integration to group them together and control them all at once.
group:
basestations:
name: Basestations
entities:
- switch.lhb_1
- switch.lhb_2
switch:
- platform: basestation
mac: "xx:xx:xx:xx:xx:xx"
name: "LHB 1"
- platform: basestation
mac: "xx:xx:xx:xx:xx:xx"
name: "LHB 2"
- Turn the airco on when your VR equipment activates.
- Turn your basestations off/on when you turn off/on the lights
- Turn your basestations off if there's no motion detected in the room anymore, or if you've left the house.
- Start your computer (wake on lan), VR equipment, and screen (power plug) all at once.
- Yes, BLE does not conmmunicate well over long range.
- Largely inspired by the miflora integration, thanks!