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

adding rpi support for prometheus + some supplementals #383

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
18 changes: 18 additions & 0 deletions tools/rpi/Dockerfile.basic
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM python:latest

LABEL maintainer Simoliv

USER root

RUN mkdir /hoymiles_exporter

COPY . /hoymiles_exporter

WORKDIR /hoymiles_exporter

RUN pip3 install --upgrade pip
RUN ls -la
RUN pip3 install -r requirements.txt
RUN pip3 install -r optional-requirements.txt

CMD python3 -um hoymiles --verbose --log-transactions --config ahoy.yml
59 changes: 59 additions & 0 deletions tools/rpi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,65 @@ Use basic command line tools to get an idea what you recorded. For example:

A brief example log is supplied in the `example-logs` folder.

Prometheus Exporter
-------------------
Python exporter for https://prometheus.io/

install requirements:

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

Systemd service:
----------------

in systemd you find a service file to (fe) run the exporter as a systemd service at boot time.

Adjust the user in it and copy it to /lib/systemd/system

Activate it:

```
sudo systemctl enable hoymiles.service
```

Start it

```
sudo service hoymiles start
```

After that, you should be able to open a website to http://ip-of-your-rpi:9233/ and see some stats

```
# HELP python_gc_objects_collected_total Objects collected during gc
# TYPE python_gc_objects_collected_total counter
python_gc_objects_collected_total{generation="0"} 304.0
python_gc_objects_collected_total{generation="1"} 124.0
python_gc_objects_collected_total{generation="2"} 0.0
```
and on the bottom :

```
string_voltage{panel="panel_3"} 39.4
# HELP string_current DC/Panel current
# TYPE string_current gauge
string_current{panel="panel_3"} 5.73
# HELP string_power DC/Panel power
# TYPE string_power gauge
string_power{panel="panel_3"} 225.4
# HELP string_energy_daily DC/Panel energy_daily
# TYPE string_energy_daily gauge
string_energy_daily{panel="panel_3"} 487.0
```
+ more stats

I added my dashboard to docker-sup../dashboard folder if you are interested

![dashboard_example1](docker-supplementals/dashboard/Selection_025.jpg)
![dashboard_example2](docker-supplementals/dashboard/Selection_027.jpg)




Expand Down
5 changes: 5 additions & 0 deletions tools/rpi/ahoy.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ ahoy:
topic: my_DTU_name # Name of DTU - default: hoymiles/{DTU-serial}
payload: "LAST-WILL-MESSAGE: Please check my HOST and Process!"

# adding prometheus exporter
prometheus:
disabled: false
port: 9233

# Influx2 output
influxdb:
disabled: true
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading