fix
This commit is contained in:
@@ -150,20 +150,20 @@ output:
|
|||||||
attribute: voltageL1
|
attribute: voltageL1
|
||||||
name: Voltage L1
|
name: Voltage L1
|
||||||
unit: V
|
unit: V
|
||||||
register_type: input
|
register_type: holding
|
||||||
data_type: float32
|
data_type: float32
|
||||||
adaptor: floatAdaptor
|
adaptor: floatAdaptor
|
||||||
- address: 16
|
- address: 16
|
||||||
attribute: voltageL2
|
attribute: voltageL2
|
||||||
name: Voltage L2
|
name: Voltage L2
|
||||||
unit: V
|
unit: V
|
||||||
register_type: input
|
register_type: holding
|
||||||
data_type: float32
|
data_type: float32
|
||||||
adaptor: floatAdaptor
|
adaptor: floatAdaptor
|
||||||
- address: 18
|
- address: 18
|
||||||
attribute: voltageL3
|
attribute: voltageL3
|
||||||
name: Voltage L3
|
name: Voltage L3
|
||||||
unit: V
|
unit: V
|
||||||
register_type: input
|
register_type: holding
|
||||||
data_type: float32
|
data_type: float32
|
||||||
adaptor: floatAdaptor
|
adaptor: floatAdaptor
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ class ModbusHandler:
|
|||||||
dataType = DATA_TYPES[data_type]
|
dataType = DATA_TYPES[data_type]
|
||||||
count = dataType.value[1]
|
count = dataType.value[1]
|
||||||
|
|
||||||
|
logger.debug(f"{self.client=}, {addr=}, {count=}, {slave=}")
|
||||||
res = readFunc(self.client, addr, count=count, device_id=slave)
|
res = readFunc(self.client, addr, count=count, device_id=slave)
|
||||||
if (isinstance(res, pymodbus.pdu.register_message.ReadHoldingRegistersResponse) or
|
if (isinstance(res, pymodbus.pdu.register_message.ReadHoldingRegistersResponse) or
|
||||||
isinstance(res, pymodbus.pdu.register_message.ReadInputRegistersResponse) or
|
isinstance(res, pymodbus.pdu.register_message.ReadInputRegistersResponse) or
|
||||||
|
|||||||
Reference in New Issue
Block a user