Skip to content

Commit

Permalink
minor improvements to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mdrocan committed Oct 15, 2023
1 parent 48da3e4 commit d2facb3
Showing 1 changed file with 42 additions and 9 deletions.
51 changes: 42 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
## Configure environment

- Use the [docker_compose.yml](docker_compose.yml) to start and setup your InfluxDB and Grafana environments.
- Launch the environment with, for example, 'docker compose -f docker_compose.yml up -d"
- Launch the environment with, for example, `docker compose -f docker_compose.yml up -d`

### Setup InfluxDB

- Create an user with password and a bucket to be used for saving the solar panel data.
- Create two APIs: 1) one for the script 2) one for Grafana. The script could have both read and write access rights, Grafana needs reading rights.
- Create a user with password, and a bucket to be used for saving the solar panel data.
- Create two APIs: 1) one for the Python script 2) one for Grafana. The script could have both read and write access rights, Grafana needs reading rights.

### Setup Grafana

Expand All @@ -30,13 +30,46 @@

## Script execution

- Create a virtual environment with 'python3 -m venv test_env'
- Activate the environment with 'source test_env/bin/activate'
- Install the required package with 'pip install -r requirements.txt'
- Setup the infrastructure, currently the setup uses Grafana and InfluxDB, which are running in separate Docker environments.
- Execute in the terminal with the following command: 'python3 fronius.py'
- Create a virtual environment

```code
python3 -m venv test_env
```

- Activate the environment

```code
source test_env/bin/activate
```

- Install the required package

```code
pip install -r requirements.txt
```

- Setup the infrastructure, like defined in Chapter "Configure environment". Currently the setup uses Grafana and InfluxDB, which are running in separate Docker environments.

- Run in terminal the following command

```code
python3 fronius.py
```

- You should see something like this in the terminal:

```code
Time: 09:07:45
Currently producing: 75 W
Setup utilization: 2 %
```

- After script execution the data is fetched from the inverter and processed. In the terminal you will see a trimmed output and if everything is setup correctly you can find the same information from InfluxDB.
- If you don't wish to keep the virtual environment then deactivate it with 'deactivate' command in the terminal.

- If you don't wish to keep the virtual environment then deactivate it with the following command:
```code
deactivate
```

## Architecture

Expand Down

0 comments on commit d2facb3

Please sign in to comment.