How joshwarren/truely-smart-home works
This repository is a scheduled home-energy data collection and control proof of concept. Its principal workflow is a scheduler invoking weather, electricity-supplier, and solar-generation collectors that persist readings; tariff jobs also store tariff data and queue immersion-switch actions, while a separate scheduled action processor executes due commands. The README describes additional planned home systems and future optimization, but the supplied source does not show their implementations. The graph focuses on evidenced runtime behavior; the README documents the broader goals, and the source excerpts do not establish every external integration detail.
Main entry points: db.py SQL database · octopus_tariff_app.py Tariff services · dataCollector.py Job scheduler · config.py Configuration
Components 16
Scheduling
- Job scheduler
dataCollector.py
Data collection
- Weather collector
openWeather.py - Supplier collector
supply.py - Solar collector
microGeneration.py
Tariffs and control
- Tariff services
octopus_tariff_app.py - Action queue
action.py - Device dispatch
action.py - Sonoff switch
- Shelly switch
Shared platform
- SQL database
db.py - Configuration
config.py - Logging
logger.py
Other components
- OpenWeather API
- Octopus API
- Solax Cloud API
- Pushover
Connections 25
- Job scheduler → Weather collector: schedules
dataCollector.py - Job scheduler → Supplier collector: schedules
dataCollector.py - Job scheduler → Solar collector: schedules
dataCollector.py - Job scheduler → Tariff services: schedules
dataCollector.py - Job scheduler → Action queue: runs
dataCollector.py - Weather collector → OpenWeather API: requests forecast
openWeather.py - Weather collector → SQL database: writes forecast
openWeather.py - Supplier collector → Tariff services: uses tariff methods
supply.py - Supplier collector → SQL database: writes readings
supply.py - Tariff services → Octopus API: requests tariffs
octopus_tariff_app.py - Tariff services → SQL database: queues actions
octopus_tariff_app.py - Tariff services → Pushover: sends updates
octopus_tariff_app.py - Solar collector → Solax Cloud API: requests readings
microGeneration.py - Solar collector → SQL database: writes readings
microGeneration.py - Action queue → SQL database: reads and updates
action.py - Action queue → Device dispatch: dispatches commands
action.py - Device dispatch → Sonoff switch: controls device
action.py - Device dispatch → Shelly switch: controls device
action.py - Sonoff switch → SQL database
- Weather collector → Configuration: imports settings
openWeather.py - Supplier collector → Configuration: imports settings
supply.py - Solar collector → Configuration: imports settings
microGeneration.py - Tariff services → Configuration: imports settings
octopus_tariff_app.py - Action queue → Configuration: imports settings
action.py - SQL database → Logging
db.py