wechselrichter zum tesent eingebunden
This commit is contained in:
@@ -18,9 +18,9 @@ class ShellyPro3m:
|
||||
self.client = ModbusTcpClient(self.ip, port=port)
|
||||
try:
|
||||
if not self.client.connect():
|
||||
print("Verbindung zur Wärmepumpe fehlgeschlagen.")
|
||||
print("Verbindung zum Shelly-Logger fehlgeschlagen.")
|
||||
exit(1)
|
||||
print("Verbindung zur Wärmepumpe erfolgreich.")
|
||||
print("Verbindung zum Shelly-Logger erfolgreich.")
|
||||
except KeyboardInterrupt:
|
||||
print("Beendet durch Benutzer (Ctrl+C).")
|
||||
finally:
|
||||
@@ -28,7 +28,7 @@ class ShellyPro3m:
|
||||
|
||||
def get_registers(self):
|
||||
# Excel-Datei mit den Input-Registerinformationen
|
||||
excel_path = "data/shelly_pro_3m_registers.xlsx"
|
||||
excel_path = "modbus_registers/shelly_pro_3m_registers.xlsx"
|
||||
xls = pd.ExcelFile(excel_path)
|
||||
df_input_registers = xls.parse()
|
||||
|
||||
@@ -45,7 +45,7 @@ class ShellyPro3m:
|
||||
for _, row in df_clean.iterrows()
|
||||
}
|
||||
|
||||
def get_data(self):
|
||||
def get_state(self):
|
||||
data = {}
|
||||
data['Zeit'] = time.strftime('%Y-%m-%d %H:%M:%S')
|
||||
for address, info in self.registers.items():
|
||||
|
||||
Reference in New Issue
Block a user