A manual installation on Windows, macOS, or Linux is the most flexible option, suited to development or custom setups. It requires a Python environment.
- Python: Use Python 3.10 or newer (see CONTRIBUTING.md). You can download Python from the official Python website.
- Configuration: Create a
config.inifile in the root directory of the project and add the appropriate configuration as described in the Configuration reference.
-
Open a terminal / command prompt
- Windows: Press
Win + R, typecmd, press Enter - macOS: Press
Cmd + Space, typeTerminal, press Enter - Linux: Use your preferred terminal emulator
- Windows: Press
-
Navigate to the project directory
cd path/to/astrameter -
Install uv (dependency manager).
-
Install dependencies and run
uv sync uv run astrameter
With dev tools (tests, ruff, mypy):
uv sync --extra dev. See CONTRIBUTING.md for the full workflow.
All commands above work across Windows, macOS, and Linux. The only difference is how you open your terminal.
When the script is running, switch your Marstek battery to "Self-Adaptation" mode to enable the powermeter functionality.
Use systemd to create a service:
- Create a unit file (e.g.,
/etc/systemd/system/astrameter.service) - Set
ExecStartto your startup command - Enable and start:
sudo systemctl enable astrameter && sudo systemctl start astrameter