Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor updates #23

Merged
merged 4 commits into from
Oct 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 46 additions & 14 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 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 used 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 packages

```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 All @@ -53,12 +86,11 @@ There's also a possibility to use a example response message in a Docker environ
started up. For example: `http://localhost:8080/GetPowerFlowRealtimeData.fcgi`.

## Development
Development activities happen mainly in the [development](https://github.com/mdrocan/Fronius-stats/tree/development) branch when there's something ongoing.
The idea is to keep that branch active and also as a latest ~working solution.
Development activities happen in development branches. Once the feature/fix/something is ready the change(s) are merged into main branch.

## Next steps

- Improve documentation
- Improve the documentation
- Use created sample visualizations in premade config
- Create sample config for default bucket
- Improve the script
- Create more sample configs
- Further improvements to the the script by using also other Fronius API endpoints