A Home Assistant custom integration for controlling BlockBlueLight red light therapy devices via Bluetooth LE.
- 🔍 Automatic Discovery - Finds your device automatically via Bluetooth
- 🔌 ESPHome Bluetooth Proxy Support - Works with your existing proxies
- 💡 Switch Control - Simple ON/OFF control
- ⏱️ Built-in Auto-off Timer - Set duration (1-60 minutes) for therapy sessions
- 🔋 Smart Connection - Connects on-demand, auto-disconnects after 2 minutes
- 🎨 Config Flow UI - No YAML configuration needed
- Home Assistant 2024.1.0 or newer
- Bluetooth support (built-in adapter or ESPHome Bluetooth Proxy)
- BlockBlueLight device in Bluetooth range
- Open HACS in Home Assistant
- Go to Integrations
- Click the ⋮ menu (top right) → Custom repositories
- Add repository URL:
https://github.com/aitjcize/ha-blockbluelight - Category: Integration
- Click Add
- Click + Explore & Download Repositories
- Search for "BlockBlueLight"
- Click Download
- Restart Home Assistant
- Go to Settings → Devices & Services → Add Integration
- Search for "BlockBlueLight" and configure
- Copy the
custom_components/blockbluelightfolder to your Home Assistantconfig/custom_components/directory - Restart Home Assistant
- Go to Settings → Devices & Services → Add Integration
- Search for "BlockBlueLight" and configure
After installation, you'll have two entities:
- Entity ID:
light.block3cab725ef522(based on device name) - Controls: Turn the device ON/OFF
- Type: Red light therapy light
- Entity ID:
number.block3cab725ef522_timer_duration - Range: 1-60 minutes (default: 15)
- Purpose: Set how long the device stays on before automatically turning off
- Perfect for: Red light therapy sessions (typically 10-20 minutes)
automation:
- alias: "Red light therapy at sunset"
trigger:
- platform: sun
event: sunset
action:
- service: light.turn_on
target:
entity_id: light.block3cab725ef522automation:
- alias: "20-minute therapy session"
trigger:
- platform: time
at: "20:00:00"
action:
- service: number.set_value
target:
entity_id: number.block3cab725ef522_timer_duration
data:
value: 20
- service: light.turn_on
target:
entity_id: light.block3cab725ef522automation:
- alias: "Morning therapy - 10 minutes"
trigger:
- platform: time
at: "07:00:00"
action:
- service: number.set_value
target:
entity_id: number.block3cab725ef522_timer_duration
data:
value: 10
- service: light.turn_on
target:
entity_id: light.block3cab725ef522
- alias: "Evening therapy - 15 minutes"
trigger:
- platform: time
at: "21:00:00"
action:
- service: number.set_value
target:
entity_id: number.block3cab725ef522_timer_duration
data:
value: 15
- service: light.turn_on
target:
entity_id: light.block3cab725ef522type: entities
title: Red Light Therapy
entities:
- entity: light.block3cab725ef522
name: Power
- entity: number.block3cab725ef522_timer_duration
name: Session Durationtype: vertical-stack
cards:
- type: light
entity: light.block3cab725ef522
name: Red Light Therapy
- type: entities
entities:
- entity: number.block3cab725ef522_timer_duration
name: Auto-off Timer- Check Bluetooth is enabled in Home Assistant
- Verify ESPHome Bluetooth Proxy is working:
- Go to Settings → Devices & Services → ESPHome
- Check your proxy device is online
- Check device is in range of the Bluetooth proxy
- Restart Home Assistant and wait a few minutes for discovery
- Check logs: Go to Settings → System → Logs
- Look for errors related to
blockbluelight - Try removing and re-adding the integration
- Make sure no other device is connected to the BlockBlueLight device
Add to configuration.yaml:
logger:
default: info
logs:
custom_components.blockbluelight: debug
homeassistant.components.bluetooth: debugThen restart Home Assistant and check the logs.
- Device Name Pattern:
BLOCKfollowed by MAC address (e.g.,BLOCK3CAB725EF522) - Service UUID: 0000fff0-0000-1000-8000-00805f9b34fb
- Write Characteristic: 0000fff2-0000-1000-8000-00805f9b34fb (FFF2)
- Notify Characteristic: 0000fff1-0000-1000-8000-00805f9b34fb (FFF1)
Note: Characteristic naming is opposite of typical convention - FFF2 is for writing, FFF1 is for notifications.
- Turn ON:
3A 01 20 00 01 01 23 0A - Turn OFF:
3A 01 20 00 01 00 22 0A - Status Query:
3A 01 10 00 00 11 0A - Set Timer:
3A 01 31 00 02 [timer_high] [timer_low] [checksum] 0A
custom_components/blockbluelight/- Home Assistant integrationanalysis/- Protocol reverse engineering materialsBLE_PROTOCOL_ANALYSIS.md- Complete protocol documentationbtsnoop_hci.log- Captured HCI log- Python scripts for testing and analysis
-
Create GitHub repository named
ha-blockbluelight -
Push code:
git init git add . git commit -m "Initial release v1.0.0" git remote add origin https://github.com/YOUR_USERNAME/ha-blockbluelight.git git branch -M main git push -u origin main
-
Create release on GitHub:
- Tag:
v1.0.0 - Title:
v1.0.0 - Initial Release - Copy description from
CHANGELOG.md
- Tag:
-
Add to HACS as custom repository:
- HACS → Integrations → ⋮ → Custom repositories
- Add:
https://github.com/YOUR_USERNAME/ha-blockbluelight - Category: Integration
- Update version in
custom_components/blockbluelight/manifest.json - Update
CHANGELOG.md - Commit and push changes
- Create new release on GitHub
HACS will automatically detect new releases and notify users.
custom_components/blockbluelight/
├── __init__.py # Integration setup
├── config_flow.py # Config flow for UI setup
├── const.py # Constants (UUIDs, commands)
├── coordinator.py # BLE communication coordinator
├── manifest.json # Integration metadata
├── light.py # Light entity implementation
├── number.py # Timer duration entity
├── strings.json # UI strings
└── translations/
└── en.json # English translations
- Coordinator: Manages BLE connection, sends commands, handles notifications
- Light Entity: Provides ON/OFF control in Home Assistant UI
- Number Entity: Timer duration configuration
- Config Flow: Handles device discovery and setup
- Only supports ON/OFF control (no brightness, color, etc.)
- Requires Bluetooth to be in range
- One device connection at a time
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - See LICENSE file for details
Protocol reverse-engineered from Android HCI logs using Wireshark and Python. See analysis/ directory for complete reverse engineering details.
This is an unofficial integration and is not affiliated with or endorsed by the device manufacturer. Use at your own risk.