Project overview
AgilePi is my home-built energy monitoring and management system. It combines solar generation, EcoFlow battery storage, household energy information and Octopus Agile electricity pricing.
The system runs on a Raspberry Pi 3 Model B+ and uses a collection of Python applications to gather information, store historical readings, analyse prices and coordinate battery operation.
Hardware installation, application architecture, data collection, automated control, historical records, backups and general maintenance.
Equipment and components
The project uses a small collection of energy equipment and computing hardware. Each component supplies information or provides a function used by the wider system.
How the applications fit together
I've separated the software into smaller applications so that data collection, storage, analysis and presentation can each be managed independently.
The applications are managed using Linux services and scheduled tasks. This allows important processes to run independently and restart automatically when required.
Read the software overview →The AgilePi controller
The controller is responsible for planning battery operation. It considers several inputs rather than making charging decisions using electricity price alone.
Automated control affects real electrical equipment. Any installation or configuration changes must be tested carefully, with appropriate device safeguards retained.
Data collection and storage
Historical information is important because a live reading only tells me what's happening at that moment. Storing readings allows me to look back at performance and understand longer-term patterns.
SQLite is used to store readings and other project information locally. Python applications collect and retrieve data, while the web applications make selected historical information available for analysis.
Historical monitoring includes battery state of charge, solar generation, power flows and energy-related information.
Protecting the project
A database containing months of energy readings is worth protecting. The backup process creates a consistent SQLite snapshot and an archive of selected system files.
The backup process is managed by systemd, allowing scheduled backups as well as manual runs when significant changes have been made.
sudo systemctl start agilepi-backup.serviceThis command runs a one-off backup without changing the regular schedule.Keeping sensitive information private
The project uses API credentials, device access information and other local configuration. These are kept separate from the public source code.
Never publish API keys, passwords, tokens, account identifiers, private network details or live operational data. Example configuration files should use placeholders rather than real credentials.
Public documentation describes the architecture and general setup without revealing private installation details.
Troubleshooting and development
Like most home-built systems, AgilePi occasionally needs investigation and adjustment. Logs and service status provide useful information when something doesn't behave as expected.
I'll add more detailed, step-by-step guides here as the project documentation develops.