From b07c8336dd18a7d71bd2240ad51b70b1eb824690 Mon Sep 17 00:00:00 2001 From: Nils Reiners Date: Thu, 17 Apr 2025 15:23:05 +0200 Subject: [PATCH] auf read_input_registers umgestellt --- main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.py b/main.py index 0e0058d..91cdc8a 100644 --- a/main.py +++ b/main.py @@ -25,8 +25,7 @@ try: print(f"\n--- Neue Abfrage --- {time.strftime('%Y-%m-%d %H:%M:%S')} ---") for address, info in registers.items(): reg_type = info['type'] - result = client.read_holding_registers(address, count=2 if reg_type == 'REAL' else 1)#, unit=unit_id) - + result = client.read_input_registers(address, count=2 if reg_type == 'REAL' else 1)#, unit=unit_id) if result.isError(): print(f"Fehler beim Lesen von Adresse {address}: {result}") continue