shelly upgedatet
This commit is contained in:
Binary file not shown.
@@ -1,3 +1,5 @@
|
||||
import struct
|
||||
|
||||
from pymodbus.client import ModbusTcpClient
|
||||
import pandas as pd
|
||||
import time
|
||||
@@ -53,7 +55,8 @@ class ShellyPro3m:
|
||||
print(f"Fehler beim Lesen von Adresse {address}: {result}")
|
||||
continue
|
||||
|
||||
value = result.registers[0] / 10.0
|
||||
packed = struct.pack(">HH", result.registers[1], result.registers[0])
|
||||
value = round(struct.unpack(">f", packed)[0], 2)
|
||||
|
||||
print(f"Adresse {address} - {info['desc']}: {value}")
|
||||
data[f"{address} - {info['desc']}"] = value
|
||||
|
||||
Reference in New Issue
Block a user