Skip to content

Commit ea61654

Browse files
authored
Version 2.0
Changelog (summary) Introduced possibility to configure multiple input sources (kiosks, openapi meters/inverters and kenter meters) Implemented Huawei Northbound OpenAPI as data source for metrics Now supporting Kenter API v2 Removed currentPower kiosk property (fetched from powercurve API obj) in favor of realTimePower Removed functionality to write utility grid consumption (non-pv) to PVOutput (InfluxDB fully supported!) BREAKING CHANGE: Environment variables for config changed names and structure. Please review the configuration section in README for updated variable names Refactored class names and .py file structure Implemented pydantic to replace pvconf.py, now supporting non-environment variable based settings using config.yaml
2 parents 67846bf + 40e3593 commit ea61654

37 files changed

Lines changed: 2162 additions & 1244 deletions

.env.example

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# RENAME THIS FILE TO .env FOR IT TO TAKE EFFECT
2+
# SEE README.md for explanation of settings
3+
4+
debug_mode=False
5+
fetch_on_startup=True
6+
site_descriptive_name=my_site
7+
8+
fusionsolar_kiosk_module_enabled=True
9+
10+
fusionsolar_kiosks__0__descriptive_name=my_site_totals
11+
fusionsolar_kiosks__0__api_kkid=sdlew8h9hldshdsoidsuhidsu
12+
fusionsolar_kiosks__0__output_pvoutput=True
13+
fusionsolar_kiosks__0__output_pvoutput_system_id=123456
14+
15+
fusionsolar_open_api_module_enabled=True
16+
fusionsolar_open_api_user_name=MyUserName
17+
fusionsolar_open_api_system_code=MySecretPass
18+
fusionsolar_open_api_mqtt_for_discovered_dev=True
19+
20+
fusionsolar_open_api_inverters__0__descriptive_name=oa_inverter_01
21+
fusionsolar_open_api_inverters__0__dev_id=1004587964284137
22+
23+
fusionsolar_open_api_inverters__1__descriptive_name=oa_inverter_02
24+
fusionsolar_open_api_inverters__1__dev_id=1000045678978407
25+
fusionsolar_open_api_inverters__1__output_pvoutput=True
26+
fusionsolar_open_api_inverters__1__output_pvoutput_system_id=123457
27+
28+
fusionsolar_open_api_meters__0__descriptive_name=oa_composite_metering_01
29+
fusionsolar_open_api_meters__0__dev_id=1000564879541871
30+
31+
kenter_module_enabled=True
32+
kenter_clientid=api_1234_c3casa
33+
kenter_password=DFwh498h!!sdskljdss
34+
35+
kenter_metering_points__0__descriptive_name=main_building_overdrachtpunt
36+
kenter_metering_points__0__connection_id=871645687210007898
37+
kenter_metering_points__0__metering_point_id=6014587216
38+
kenter_metering_points__0__channel_id=16180
39+
40+
kenter_metering_points__1__descriptive_name=secondary_meter_1
41+
kenter_metering_points__1__connection_id=871645687210007898
42+
kenter_metering_points__1__metering_point_id=123468
43+
kenter_metering_points__1__channel_id=10180
44+
45+
kenter_metering_points__2__descriptive_name=secondary_meter_2
46+
kenter_metering_points__2__connection_id=871645687210007898
47+
kenter_metering_points__2__metering_point_id=564984
48+
kenter_metering_points__2__channel_id=10180
49+
50+
kenter_metering_points__3__descriptive_name=secondary_building_overdrachtspunt
51+
kenter_metering_points__3__connection_id=871687120000123458
52+
kenter_metering_points__3__metering_point_id=6546984
53+
kenter_metering_points__3__channel_id=16180
54+
55+
influxdb_module_enabled=True
56+
influxdb_host=svrdocker01
57+
influxdb_port=8428
58+
influxdb_is_v2=False
59+
influxdb_v1_username=myusername
60+
influxdb_v1_password=mysecretPassword
61+
influxdb_v2_protocol=http
62+
influxdb_v2_token=jlihw98rwh98hoids==
63+
influxdb_v2_org=mycompany
64+
influxdb_v2_bucket=mybucket
65+
66+
mqtt_module_enabled=True
67+
mqtt_host=mymqttserver
68+
mqtt_port=1883
69+
mqtt_auth=True
70+
mqtt_username=myusername
71+
mqtt_password=mypassword
72+
73+
pvoutput_module_enabled=True
74+
pvoutput_api_key=9847594832794874460d04c39

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,7 @@ dmypy.json
130130

131131
# Pyre type checker
132132
.pyre/
133+
134+
# Project specific ignores
135+
/config.yaml
136+
/cache/**/*.json

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.10-slim
1+
FROM python:3.13-slim
22
WORKDIR /code
33

44
ENV LANG=en_US.UTF-8
@@ -14,4 +14,4 @@ COPY requirements.txt requirements.txt
1414
RUN pip install -r requirements.txt
1515

1616
COPY . .
17-
CMD ["python", "-u", "pv.py", "-v"]
17+
CMD ["python", "-u", "main.py", "-v"]

Examples/docker-compose.yml

Lines changed: 0 additions & 112 deletions
This file was deleted.

0 commit comments

Comments
 (0)