Home automation monitoring suite for energy (HomeWizard), weather (OpenWeatherMap), and heating (Honeywell Evohome)
Project description
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dvm_mesura-1.1.6.tar.gz.
File metadata
- Download URL: dvm_mesura-1.1.6.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1168b93d057a2398d7a74a9b34dfdbcacf9b1426de56cdf1bfe7c371457e628
|
|
| MD5 |
520405a9ce4fddbf4fa05f821188473f
|
|
| BLAKE2b-256 |
c69f17e8dcade43361a12bf808948986aa712639db4f9ec1c7e8435c9041e79e
|
Provenance
The following attestation bundles were made for dvm_mesura-1.1.6.tar.gz:
Publisher:
publish.yaml on divyavanmahajan/monitor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dvm_mesura-1.1.6.tar.gz -
Subject digest:
f1168b93d057a2398d7a74a9b34dfdbcacf9b1426de56cdf1bfe7c371457e628 - Sigstore transparency entry: 983485260
- Sigstore integration time:
-
Permalink:
divyavanmahajan/monitor@b35df16010d4b98ac9e8cb4820b45a7c65c58e0b -
Branch / Tag:
refs/tags/v1.1.6 - Owner: https://github.com/divyavanmahajan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@b35df16010d4b98ac9e8cb4820b45a7c65c58e0b -
Trigger Event:
push
-
Statement type:
File details
Details for the file dvm_mesura-1.1.6-py3-none-any.whl.
File metadata
- Download URL: dvm_mesura-1.1.6-py3-none-any.whl
- Upload date:
- Size: 27.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73c792796a399fe9d276c4d3556de17252684404d637f02a3c827092851ab724
|
|
| MD5 |
b2f735954a588a241ae2bf4c1803242f
|
|
| BLAKE2b-256 |
130ec8c21e2fb5fbe41d4c42fb0b19d945c70c1595c999afaad9dff528656404
|
Provenance
The following attestation bundles were made for dvm_mesura-1.1.6-py3-none-any.whl:
Publisher:
publish.yaml on divyavanmahajan/monitor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dvm_mesura-1.1.6-py3-none-any.whl -
Subject digest:
73c792796a399fe9d276c4d3556de17252684404d637f02a3c827092851ab724 - Sigstore transparency entry: 983485285
- Sigstore integration time:
-
Permalink:
divyavanmahajan/monitor@b35df16010d4b98ac9e8cb4820b45a7c65c58e0b -
Branch / Tag:
refs/tags/v1.1.6 - Owner: https://github.com/divyavanmahajan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@b35df16010d4b98ac9e8cb4820b45a7c65c58e0b -
Trigger Event:
push
-
Statement type: