dvm-mesura - Home Automation Monitoring Suite
A robust, unified monitoring solution for home automation systems. It tracks energy usage (HomeWizard), weather data (OpenWeatherMap), and heating/room temperatures (Honeywell Evohome) while storing everything in a centralized SQLite database.
Table of Contents
- Installation
- Setup Wizard & Configuration
- Usage & CLI Options
- macOS Background Daemon
- Auxiliary Utilities
- Testing
📦 Installation
This project uses uv for high-performance dependency management.
Method 1: Global Tool (Recommended)
Install dvm-mesura as a global CLI tool on your system:
uv tool install dvm-mesura
Method 2: Local Development
Clone the repository and sync dependencies:
uv sync
🛠 Setup Wizard & Configuration
The suite requires configuration for API keys and credentials. You can handle this easily using the interactive Setup Wizard.
Running the Wizard
# If installed as a tool
mesura-all --setup
# If running locally
uv run mesura-all --setup
The wizard will guide you through:
- Energy Meter: API URL and polling interval.
- Weather: OpenWeatherMap API Key, coordinates, and interval.
- Evohome: Username/Email, Password, and interval.
- Data Storage: Preferred directory and database mode (Unified vs. Separate).
Configuration Variables
All settings are stored in a .env file in the project directory.
| Environment Variable | Description | CLI Override | Default |
|---|---|---|---|
DATA_DIR |
Directory for databases/CSVs | --data-dir |
data |
ENERGY_API_URL |
HomeWizard P1 API URL | --energy-api |
http://p1meter-231dbe.local./api/v1/data |
ENERGY_INTERVAL |
Polling frequency | --energy-interval |
1m |
OPENWEATHER_API_KEY |
OpenWeatherMap API Key | --weather-key |
[None] |
WEATHER_INTERVAL |
Polling frequency | --weather-interval |
10m |
LATITUDE |
Site latitude | --lat |
50.83172 |
LONGITUDE |
Site longitude | --lon |
5.76712 |
EVOHOME_USERNAME |
Honeywell TCC Username | --evohome-user |
[None] |
EVOHOME_PASSWORD |
Honeywell TCC Password | --evohome-pass |
[None] |
EVOHOME_INTERVAL |
Polling frequency | --evohome-interval |
5m |
SEPARATE_DBS |
Store data in separate files | --separate |
false |
🚀 Usage & CLI Options
Running the Suite
The primary entry point is mesura-all, which starts all configured monitors concurrently.
# Start all monitors
mesura-all
# Run with overrides
mesura-all --energy-interval 30s --separate
Individual Monitors
You can also run monitors independently:
mesura-energy: Only Energy Metermesura-weather: Only OpenWeatherMapmesura-evohome: Only Honeywell Evohome
Inspecting Data
Use mesura-show to quickly view recent database records in CSV format.
# Show last 5 rows of all tables
mesura-show
# Show last 10 rows of weather data
mesura-show --table weather -n 10
🖥 macOS Background Daemon
To run mesura-all continuously in the background (even after restarts), use the built-in mesura-daemon tool.
1. Installation
During installation, the wizard will run to ensure your variables are correct. It will also ask if you want to embed settings directly into the system plist (useful for headless environments).
# Standard install
mesura-daemon --install
# Install if using uvx
uvx dvm-mesura mesura-daemon --install --uvx
2. Management Commands
| Command | Action |
|---|---|
mesura-daemon --check |
Verify if the daemon is running |
mesura-daemon --logs |
Tail the last 20 lines of daemon output/errors |
mesura-daemon --unload |
Temporarily stop the daemon |
mesura-daemon --start |
Restart an unloaded daemon |
mesura-daemon --uninstall |
Completely remove the daemon from macOS |
mesura-daemon --env-check |
Troubleshoot: Show .env path and active variables |
3. Troubleshooting: "Operation not permitted"
macOS TCC (Privacy Protections) blocks background daemons from reading sensitive folders like ~/Documents, ~/Desktop, or ~/Downloads.
If your logs show PermissionError: [Errno 1] Operation not permitted, move your project folder to a non-protected location:
mv ~/Documents/projects/monitor ~/mesura
cd ~/mesura
mesura-daemon --install
4. Troubleshooting: SSL Errors / DigiCert CA
On older versions of macOS, the DigiCert High Assurance Root CA might be missing from the system keychain, leading to SSL errors when connecting to tccna.resideo.com (Evohome).
If you see SSL/TLS certificate verification warnings:
- Ensure the
SSL_CERT_FILEenvironment variable is set to yourcertifibundle path. - Manually append the DigiCert CA to your bundle:
# Append DigiCert CA to the certifi bundle
curl -L https://cacerts.digicert.com/DigiCertHighAssuranceEVRootCA.pem >> $(uv run python -c "import certifi; print(certifi.where())")
The mesura-daemon tool automatically configures SSL_CERT_FILE in the background for you, and the setup wizard (--setup) will check if this certificate is present.
🛠 Auxiliary Utilities
Migration Tools
mesura-combine-db: Migrates historical data from legacy.dbfiles (weatherdata.db, etc.) into the unifiedmonitor.db.mesura-combine-csv: Imports existing CSV logs into the SQLite database while skipping duplicates.
Export Tools
mesura-export-csv: Extract SQLite data back into original CSV format for backups or external analysis.
🧪 Testing
Run the comprehensive test suite using pytest:
uv run pytest
The suite includes coverage for polling logic, database schema evolution, and API mocking.
Metadata
Release files for dvm-mesura 1.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dvm_mesura-1.1.6.tar.gz | 17.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dvm_mesura-1.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 44.9 kB
Release files / dvm_mesura-1.1.6.tar.gz
| Download URL | dvm_mesura-1.1.6.tar.gz |
|---|---|
| Size | 17.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f1168b93d057a2398d7a74a9b34dfdbcacf9b1426de56cdf1bfe7c371457e628
|
|
BLAKE2b-256 checksum How to use checksums |
c69f17e8dcade43361a12bf808948986aa712639db4f9ec1c7e8435c9041e79e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 23, 2026.
Transparency logRelease files / dvm_mesura-1.1.6-py3-none-any.whl
| Download URL | dvm_mesura-1.1.6-py3-none-any.whl |
|---|---|
| Size | 27.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
73c792796a399fe9d276c4d3556de17252684404d637f02a3c827092851ab724
|
|
BLAKE2b-256 checksum How to use checksums |
130ec8c21e2fb5fbe41d4c42fb0b19d945c70c1595c999afaad9dff528656404
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 23, 2026.
Transparency log