-
Open HACS in Home Assistant.
-
Go to Integrations.
-
Click the ⋮ (top right) → Custom repositories.
-
Add this repository URL:
https://github.com/Sjnaaf/bleBoxSmartWindowBox -
Choose Category: Integration.
-
Click Add.
-
Search for BleBox smartWindowBox in HACS and install it.
-
Restart Home Assistant.
-
Add the integration via: Settings → Devices & Services → Add integration.
A fully featured custom Home Assistant integration for the BleBox smartWindowBox (API level 20180604).
This integration provides:
- ✅ Cover entity (open / close / stop)
- ✅ Emulated set position (0–100%)
- ✅ Favorite position support
- ✅ Next step support
- ✅ Rain sensor as binary sensor
- ✅ Real-time movement metadata
- ✅ Progress %, remaining time & direction tracking
- ✅ Proper Home Assistant entity services with UI selectors
The smartWindowBox motor is exposed as a standard Home Assistant cover entity:
OpenCloseStopSet position (0=open, 100=closed)
Since the official BleBox API does not support direct position setting, this integration emulates it by:
- Sending open or close command
- Polling device state
- Stopping the motor once the target position is reached
This method is precise and tuned for real-world motor timing.
While the window is moving (open, close, favorite, or manual movement), the following attributes are available:
| Attribute | Description |
|---|---|
moving |
True while motor is active |
move_direction |
opening or closing |
move_target_position |
Desired target |
move_start_position |
Starting position |
move_elapsed_s |
Seconds since movement started |
estimated_total_s |
Estimated full travel time |
estimated_remaining_s |
Remaining estimated time |
move_progress_pct |
Movement progress (0–100%) |
These update live during movement.
The built-in rain sensor is exposed as a:
binary_sensor.<device_name>_rain
- ON = Rain detected
- OFF = No rain
Additional attributes:
trendelapsedTimeSstateiconSet
The integration registers proper entity services with UI selectors:
| Service | Description |
|---|---|
blebox_smartwindowbox.favorite |
Move to configured favorite position |
blebox_smartwindowbox.next_step |
Perform next-step movement |
blebox_smartwindowbox.set_position |
Move to specific position (0–100) |
These appear in Developer Tools → Services.
- Download or clone this repository.
- Copy the folder:
custom_components/blebox_smartwindowbox/
into your Home Assistant configuration directory:
config/custom_components/
Your final structure should look like:
config/
└── custom_components/
└── blebox_smartwindowbox/
├── __init__.py
├── api.py
├── binary_sensor.py
├── config_flow.py
├── const.py
├── coordinator.py
├── cover.py
├── manifest.json
├── services.yaml
├── strings.json
└── translations/
└── en.json
-
Restart Home Assistant:
- Settings → System → Restart
After restart:
- Go to Settings → Devices & Services
- Click Add Integration
- Search for:
BleBox smartWindowBox
- Enter the IP address or hostname of your device
- Finish setup
The integration will automatically detect:
- The motor
- The rain sensor
The device appears as a standard cover entity:
cover.motor_1
You can:
- Open
- Close
- Stop
- Drag the position slider
Position scale:
0 = Fully Open
100 = Fully Closed
Go to:
Developer Tools → Services
Select:
blebox_smartwindowbox.favorite
Choose your cover entity and run.
Service:
blebox_smartwindowbox.set_position
You will get a slider selector (0–100).
Example:
Position: 60
The integration will:
- Move in correct direction
- Track progress
- Stop exactly at the target
Go to:
Developer Tools → States
Open your cover entity and watch:
move_progress_pctestimated_remaining_smove_elapsed_s
These update live while the window moves.
Movement precision is controlled by:
POSITION_TOLERANCE = 1
POLL_INTERVAL_SEC = 0.20Lower polling interval increases precision but increases API traffic.
Default polling interval while moving:
POLL_INTERVAL_SEC = 0.20This value has been tuned for reliable real-world accuracy.
| State | Meaning |
|---|---|
| 0 | Closing |
| 1 | Opening |
| 2 | Idle (intermediate position) |
| 3 | Idle (fully closed) |
| 4 | Idle (fully open) |
- BleBox smartWindowBox
- API level 20180604
- Single motor configuration (current version)
- Position control is emulated (not native in API)
- Accuracy depends on motor calibration
- Rapid repeated commands may slightly affect precision
- HACS support
- Multi-motor support
- Dedicated progress sensor entity
- Configurable precision via UI
- Automatic overshoot compensation tuning
MIT License