Hello Everyone
I have a Drexel&Weiss Aerosilent Stratos comfort airing device and I try to connect it to Openhab via the Modbus binding.
The device has 2 Modbus connection possibilities. First the official RS232 interface and second a USB service interface which connects to the Modbus as well.
This second USB connection works also for the Smarthome.py project. They created a plugin for integration of various Drexel&Weiss devices:
https://github.com/Bernator/smarthome/tree/develop/plugins/drexelundweiss
I also connected my RaspberryPi USB port directly to this USB service interface to avoid any additional converter.
An “lsusb” on the linux command line shows, that in fact Drexel&Weiss has USB – Serial Converter built in the device:
Bus 001 Device 006: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
So summarized, the setup is:
Raspberry PI USB Port < -> Drexel & Weiss device USB-Port <-> Built in FT232 USB/RS232 Converter Chip <-> Modbus
Unfortunately, I get the following errors (even after reboot of RaspberryPI). Any idea what could be wrong?
2019-02-22 18:19:04.164 [ERROR] [t.wimpi.modbus.io.ModbusRTUTransport] - Last request: 82 04 04 a0 00 02 6f 2a
2019-02-22 18:19:04.166 [ERROR] [t.wimpi.modbus.io.ModbusRTUTransport] - failed to read: Error reading response (EOF)
2019-02-22 18:19:04.168 [ERROR] [pi.modbus.io.ModbusSerialTransaction] - execute try 1/1 error: I/O exception: IOException Error reading response (EOF). Request: net.wimpi.modbus.msg.ReadInputRegistersRequest@1c1e0d3 (unit id 130 & transaction 2). Serial parameters: SerialParameters@3c91de[portName=/dev/ttyUSB0,baudRate=115200,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
2019-02-22 18:19:04.171 [ERROR] [pi.modbus.io.ModbusSerialTransaction] - execute reached max tries 1, throwing last error: I/O exception: IOException Error reading response (EOF). Request: net.wimpi.modbus.msg.ReadInputRegistersRequest@1c1e0d3 (unit id 130 & transaction 2). Serial parameters: SerialParameters@3c91de[portName=/dev/ttyUSB0,baudRate=115200,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
2019-02-22 18:19:04.173 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@111ca0a[slaveId=130,functionCode=READ_INPUT_REGISTERS,start=1184,length=2,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 801ecdc4-f258-4b91-8cb0-5cc8c4525338]
2019-02-22 18:20:18.808 [ERROR] [t.wimpi.modbus.io.ModbusRTUTransport] - Last request: 82 04 04 a0 00 02 6f 2a
2019-02-22 18:20:18.810 [ERROR] [t.wimpi.modbus.io.ModbusRTUTransport] - failed to read: CRC Error in received frame: 0 bytes:
2019-02-22 18:20:18.815 [ERROR] [pi.modbus.io.ModbusSerialTransaction] - execute try 1/1 error: I/O exception: IOException CRC Error in received frame: 0 bytes: . Request: net.wimpi.modbus.msg.ReadInputRegistersRequest@df9d5 (unit id 130 & transaction 29). Serial parameters: SerialParameters@3c91de[portName=/dev/ttyUSB0,baudRate=115200,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
2019-02-22 18:20:18.818 [ERROR] [pi.modbus.io.ModbusSerialTransaction] - execute reached max tries 1, throwing last error: I/O exception: IOException CRC Error in received frame: 0 bytes: . Request: net.wimpi.modbus.msg.ReadInputRegistersRequest@df9d5 (unit id 130 & transaction 29). Serial parameters: SerialParameters@3c91de[portName=/dev/ttyUSB0,baudRate=115200,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
2019-02-22 18:20:18.822 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@111ca0a[slaveId=130,functionCode=READ_INPUT_REGISTERS,start=1184,length=2,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException CRC Error in received frame: 0 bytes: [operation ID 9cffabff-843b-48fc-b8e8-849f40e17bd1]
The things file:
Bridge modbus:serial:slave1 [ port="/dev/ttyUSB0" ,id=130 , baud=115200, stopBits="1", parity="none", dataBits=8, encoding="rtu" ]{
Bridge poller inputRegisters1 [ start=1184, length=2, refresh=10000, type="input" ] {
Thing data RotationIncomingAir [ readStart="1184", readValueType="uint32" ]
}
}
I have only 1 USB device connected, so this must always be ttyUSB0.
ID I set according Drexel&Weiss documentation (page 5) to 130, as this is the default for airing devices (130-Basisplatine Lüftung (LU)).
[http://gasserenergy.ch/wp-content/uploads/2015/09/900.6660_01_TI_Modbus_RTU_DE.pdf](Modbus RTU Doc)
Furthermore it corresponds to the value used in the Smarthome.Py pluging.
Baud, stopBits etc is for me a miracle why this must be set for USB. But I did it as in other community posts with USB – Modbus it is also used.
I am reading the register address 1184 as it is nicely described in the Modbus Doc on page 10. I am reading 2 Registers (=4 Bytes) as it is required under “Hinweis”.
Gerät=device (ID), Funktion=Function (FC4), Anzahl Register=Amount of register, Wert=value