2024-11-10 23:27:52 +01:00
|
|
|
% SPDX-License-Identifier: Apache-2.0
|
2024-10-10 08:33:21 +02:00
|
|
|
|
2024-11-10 23:27:52 +01:00
|
|
|
# Getting Started
|
2024-10-10 08:33:21 +02:00
|
|
|
|
2024-11-10 23:27:52 +01:00
|
|
|
## Installation
|
2024-10-10 08:33:21 +02:00
|
|
|
|
2024-11-10 23:27:52 +01:00
|
|
|
Good installation guide:
|
|
|
|
https://meintechblog.de/2024/09/05/andreas-schmitz-joerg-installiert-mein-energieoptimierungssystem/
|
2024-10-10 08:33:21 +02:00
|
|
|
|
|
|
|
The project requires Python 3.10 or newer.
|
|
|
|
|
2024-11-10 23:27:52 +01:00
|
|
|
### Quick Start Guide
|
2024-10-10 08:33:21 +02:00
|
|
|
|
|
|
|
On Linux (Ubuntu/Debian):
|
|
|
|
|
|
|
|
```bash
|
|
|
|
sudo apt install make
|
|
|
|
```
|
|
|
|
|
2024-11-10 23:27:52 +01:00
|
|
|
On MacOS (requires [Homebrew](https://brew.sh)):
|
2024-10-10 08:33:21 +02:00
|
|
|
|
|
|
|
```zsh
|
|
|
|
brew install make
|
|
|
|
```
|
|
|
|
|
|
|
|
Next, adjust `config.py`.
|
|
|
|
The server can then be started with `make run`. A full overview of the main shortcuts is given by `make help`.
|
|
|
|
|
2024-11-10 23:27:52 +01:00
|
|
|
### Detailed Instructions
|
2024-10-10 08:33:21 +02:00
|
|
|
|
|
|
|
All necessary dependencies can be installed via `pip`. Clone the repository and install the required packages with:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
git clone https://github.com/Akkudoktor-EOS/EOS
|
|
|
|
cd EOS
|
|
|
|
```
|
|
|
|
|
|
|
|
Next, create a virtual environment. This serves to store the Python dependencies, which we will install later using `pip`:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
virtualenv .venv
|
|
|
|
```
|
|
|
|
|
|
|
|
Finally, install the Python dependencies for EOS:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
.venv/bin/pip install -r requirements.txt
|
|
|
|
```
|
|
|
|
|
|
|
|
To always use the Python version from the virtual environment, you should activate it before working in EOS:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
source .venv/bin/activate
|
|
|
|
```
|
|
|
|
(for Bash users, the default under Linux) or
|
|
|
|
|
|
|
|
```zsh
|
|
|
|
. .venv/bin/activate
|
|
|
|
```
|
|
|
|
|
2024-11-10 23:27:52 +01:00
|
|
|
## Usage
|
2024-10-10 08:33:21 +02:00
|
|
|
|
|
|
|
Adjust `config.py`.
|
2024-11-10 23:27:52 +01:00
|
|
|
To use the system, run `flask_server.py`, which starts the server:
|
2024-10-10 08:33:21 +02:00
|
|
|
|
|
|
|
```bash
|
2024-11-10 23:27:52 +01:00
|
|
|
./flask_server.py
|
2024-10-10 08:33:21 +02:00
|
|
|
```
|