Hi,
I have just installed Itho Daalderop HRU400 ventilation unit and I am trying to connect it to via Modbus.
So far I can read all the values, but since most of the registers are unsigned 8 bit integer I have problems writing them (and therefore changing the fan air volume).
Among the other register configuration I am now testing writing the following registers used to change the fan level:
Bridge poller Ventilation7 [ start=2000, length=2, refresh=600, type="holding" ] {
Thing data Werkelijk_ventilatieniveau "Werkelijk ventilatieniveau " [ readStart="2000.0", readValueType="uint8", writeStart="2000.0", writeType="holding", writeValueType="bit"]
Thing data 42001_inschakelen_uitschakelen "42001 inschakelen/uitschakelen" [ readStart="2001.0", readValueType="uint8", writeStart="2001.0", writeType="holding", writeValueType="bit"]
}
Reading goes well, but when I try to write I get invalid function:
2022-02-20 13:44:08.408 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusWriteRegisterRequestBlueprint [slaveId=1, reference=2000, registers=ModbusRegisterArray(0001), maxTries=3, getFunctionCode()=WRITE_SINGLE_REGISTER]). Will try again soon. Error was: net.wimpi.modbus.ModbusSlaveException Error Code = 1 [operation ID 923ee963-7293-43b4-9414-ca6fd3c3665b]
2022-02-20 13:44:08.548 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusWriteRegisterRequestBlueprint [slaveId=1, reference=2000, registers=ModbusRegisterArray(0001), maxTries=3, getFunctionCode()=WRITE_SINGLE_REGISTER]). Will try again soon. Error was: net.wimpi.modbus.ModbusSlaveException Error Code = 1 [operation ID 923ee963-7293-43b4-9414-ca6fd3c3665b]
2022-02-20 13:44:08.692 [ERROR] [rt.modbus.internal.ModbusManagerImpl] - Last try 3 failed when executing request (ModbusWriteRegisterRequestBlueprint [slaveId=1, reference=2000, registers=ModbusRegisterArray(0001), maxTries=3, getFunctionCode()=WRITE_SINGLE_REGISTER]). Aborting. Error was: net.wimpi.modbus.ModbusSlaveException Error Code = 1 [operation ID 923ee963-7293-43b4-9414-ca6fd3c3665b]
2022-02-20 13:44:08.695 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'modbus:data:Ventilation:Ventilation7:Werkelijk_ventilatieniveau' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Error (ModbusSlaveErrorResponseExceptionImpl) with write. Request: ModbusWriteRegisterRequestBlueprint [slaveId=1, reference=2000, registers=ModbusRegisterArray(0001), maxTries=3, getFunctionCode()=WRITE_SINGLE_REGISTER]. Description: ModbusSlaveErrorResponseException(error=1). Message: Slave responded with error=1 (ILLEGAL_FUNCTION)
2022-02-20 13:44:09.344 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'modbus:data:Ventilation:Ventilation7:Werkelijk_ventilatieniveau' changed from OFFLINE (COMMUNICATION_ERROR): Error (ModbusSlaveErrorResponseExceptionImpl) with write. Request: ModbusWriteRegisterRequestBlueprint [slaveId=1, reference=2000, registers=ModbusRegisterArray(0001), maxTries=3, getFunctionCode()=WRITE_SINGLE_REGISTER]. Description: ModbusSlaveErrorResponseException(error=1). Message: Slave responded with error=1 (ILLEGAL_FUNCTION) to ONLINE
When I use external modbus simulator I can write without problems:
Any ideas?
How can I enable the modbus logging in the console? I want to see what the binding is sending to the device, similar to above screenshot.
I tried this and get below result
openhab> log:set DEBUG org.openhab.binding.modbus
Error executing command: Unable to set level for logger
And last question: My understanding of the Modbus binding is to create a thing for each polling block, is that right?
Thanks