diff --git a/config/config.yaml b/config/config.yaml index 1dfeb93..6a840d2 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -150,20 +150,20 @@ output: attribute: voltageL1 name: Voltage L1 unit: V - register_type: input + register_type: holding data_type: float32 adaptor: floatAdaptor - address: 16 attribute: voltageL2 name: Voltage L2 unit: V - register_type: input + register_type: holding data_type: float32 adaptor: floatAdaptor - address: 18 attribute: voltageL3 name: Voltage L3 unit: V - register_type: input + register_type: holding data_type: float32 adaptor: floatAdaptor diff --git a/src/pv_controller/ModbusBase.py b/src/pv_controller/ModbusBase.py index 93e22ce..9c2fdf5 100644 --- a/src/pv_controller/ModbusBase.py +++ b/src/pv_controller/ModbusBase.py @@ -51,6 +51,7 @@ class ModbusHandler: dataType = DATA_TYPES[data_type] count = dataType.value[1] + logger.debug(f"{self.client=}, {addr=}, {count=}, {slave=}") res = readFunc(self.client, addr, count=count, device_id=slave) if (isinstance(res, pymodbus.pdu.register_message.ReadHoldingRegistersResponse) or isinstance(res, pymodbus.pdu.register_message.ReadInputRegistersResponse) or