inverter was included
This commit is contained in:
14
main.py
14
main.py
@@ -3,22 +3,26 @@ from datetime import datetime
|
||||
from data_base_csv import DataBaseCsv
|
||||
from data_base_influx import DataBaseInflux
|
||||
from heat_pump import HeatPump
|
||||
from pv_inverter import PvInverter
|
||||
from shelly_pro_3m import ShellyPro3m
|
||||
|
||||
# For dev-System run in terminal: ssh -N -L 127.0.0.1:8111:10.0.0.10:502 pi@192.168.1.146
|
||||
# For productive-System change port in heatpump to 502
|
||||
|
||||
interval_seconds = 10
|
||||
|
||||
db = DataBaseInflux(
|
||||
url="http://localhost:8086",
|
||||
url="http://192.168.1.146:8086",
|
||||
token="Cw_naEZyvJ3isiAh1P4Eq3TsjcHmzzDFS7SlbKDsS6ZWL04fMEYixWqtNxGThDdG27S9aW5g7FP9eiq5z1rsGA==",
|
||||
org="allmende",
|
||||
bucket="allmende_db"
|
||||
)
|
||||
|
||||
hp = HeatPump(device_name='hp_master', ip_address='10.0.0.10')
|
||||
hp = HeatPump(device_name='hp_master', ip_address='localhost', port=8111)
|
||||
shelly = ShellyPro3m(device_name='wohnung_2_6', ip_address='192.168.1.121')
|
||||
wr = SolarEdgeWechselrichter(device_name='wr_master', ip_address='192.168.1.112')
|
||||
wr = PvInverter(device_name='wr_master', ip_address='192.168.1.112')
|
||||
|
||||
controller = SgReadyController(hp, wr)
|
||||
#controller = SgReadyController(hp, wr)
|
||||
|
||||
while True:
|
||||
now = datetime.now()
|
||||
@@ -26,6 +30,6 @@ while True:
|
||||
db.store_data(hp.device_name, hp.get_state())
|
||||
db.store_data(shelly.device_name, shelly.get_state())
|
||||
db.store_data(wr.device_name, wr.get_state())
|
||||
controller.perform_action()
|
||||
#controller.perform_action()
|
||||
time.sleep(0.1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user