A lightweight, asynchronous service for monitoring Hoymiles microinverters via Bluetooth Low Energy (BLE), supporting any model covered by the hiflow-ble library.
This project was implemented by AI, supervised by a human.
- Real-time Monitoring: Multi-channel PV and AC grid metrics.
- Web Interface: OpenDTU-inspired dashboard using
aiohttpandHTMX. - MQTT Bridge: Publishes live inverter data to your MQTT broker (e.g. for Home Assistant).
- OpenDTU-compatible Live Data Endpoint: A simple
/api/livedata/statusendpoint emulating OpenDTU's API, for tools like the Homepage dashboard's OpenDTU widget. - Diagnostics: Integrated system console and Raspberry Pi health monitoring.
- Robust: Automatic reconnection and persistent configuration.
- A Bluetooth-capable device (e.g. Raspberry Pi) to run the service on.
- Python 3 and
git. - A Rust toolchain (
rustc,cargo) andpkg-config, needed to build dependencies likepydantic-coreandcryptographyfrom source on platforms without prebuilt wheels. - System build packages:
build-essential,libffi-dev,libssl-dev,python3-dev. uvfor Python environment and package management (on DietPi, install viadietpi-software, option 217).
The service is designed for deployment on a Raspberry Pi. The installation is split into two phases:
- Create a directory and download the setup script:
Note: On a Raspberry Pi 1, most dependencies are not available as pre-compiled binaries and will be compiled from source during installation. This process can take about 8 hours with a decent SD card.
mkdir openhms && cd openhms curl -sSL https://raw.githubusercontent.com/MichaelMay81/openhms/master/setup_app.sh -o setup_app.sh chmod +x setup_app.sh ./setup_app.sh
- Download and run the systemd setup script:
curl -sSL https://raw.githubusercontent.com/MichaelMay81/openhms/master/setup_systemd.sh -o setup_systemd.sh chmod +x setup_systemd.sh sudo ./setup_systemd.sh
The scripts will:
- Verify system dependencies and resources.
- Create a virtual environment and install the service from GitHub.
- Configure the systemd service with dynamic paths and user detection.
For a more security-hardened example — running the service under a dedicated, no-login system user in /opt — see DIETPI_SETUP.md.
To update an existing installation to the latest version:
cd /opt/openhms # or wherever you installed it
source .venv/bin/activate
uv pip install --refresh git+https://github.com/MichaelMay81/openhms.git
sudo systemctl restart openhmsIf openhms.service itself has changed (e.g. new systemd directives), also re-apply it before restarting:
sudo ./setup_systemd.shSettings are managed in config.json (created in the installation directory). You can modify these via the Settings tab in the Web UI, which also includes a button to restart the service to apply changes.
Note: Only a single inverter can be configured at this time.
- BLE Layer: Polls the inverter for raw metrics.
- State Layer: Normalizes and stores data in a structured, thread-safe container.
- Web/MQTT Layer: Serves the UI and forwards metrics to your broker.
Due to older rustc versions available on target platforms like DietPi/Raspberry Pi 1, some dependencies (e.g., pydantic-core, cryptography) are pinned to versions compatible with rustc 1.85.0. These versions are locked in uv.lock to ensure build stability. If you upgrade your system's Rust toolchain, you may be able to update these dependencies.