HomeCore is a modular smart home automation hub built with Python. It provides a unified platform for managing IoT devices and integrations through a plugin-based addon system.
Core Components:
- FastAPI Backend (
main.py): REST API server running onlocalhost:8000 - Streamlit Dashboard (
Dashboard.py): Web-based UI for device control and addon management - Addon System (
addon_manager.py): Plugin architecture for extending functionality with smart home integrations
Supported Integrations (Pre-built Addons):
- Philips Hue - Smart lighting control
- Sonoff - WiFi switches and sensors
- MQTT Broker - Universal IoT messaging
- Z-Wave - Mesh network devices
- Homebridge - HomeKit compatibility
Architecture:
HomeCore/
├── main.py # FastAPI REST API
├── Dashboard.py # Streamlit UI
├── addon_manager.py # Plugin management system
├── addons/ # Addon modules with manifest.json
└── tests/ # Pytest test suite
- Python 3.10+
- Virtual environment recommended (
venv/)
pip install -r requirements.txtpython main.py
# or
uvicorn main:app --host 127.0.0.1 --port 8000 --reloadstreamlit run Dashboard.pypytest
# or with verbose output
pytest -v- Python with type hints where applicable
- Classes use docstrings for public methods
- Test files follow
test_*.pynaming convention
- Uses
pytestwith fixtures for setup/teardown - Test classes group related tests (e.g.,
TestAddonManager,TestMainRoutes) - Temporary directories used for filesystem tests
- Test coverage includes success, failure, and edge cases
Addons are directories under addons/ containing a manifest.json:
{
"name": "Addon Name",
"description": "Description",
"version": "1.0.0",
"author": "Author",
"requirements": ["dependency1", "dependency2"],
"config_flow": true
}"My hub. My rules." - Local-first, user-controlled smart home automation.