Aim: read Modbus RTU RS485 Data from Sensor
System: OH3.2 (openHABian - Hassle-free openHAB Setup)
Binding: Modbus-Binding (3.2 stable)
Device: RPI USB RS485 Raspberry Pi - USB-RS485-Schnittstelle, CH340C
[RPI USB RS485: Raspberry Pi - USB-RS485-Schnittstelle, CH340C
info for Device
Hello,
I have pluged in the Modbus-USB-device into USB after I have installed the Modbus-Binding.
Then I made the bridge and the poller, like this:
UID: modbus:serial:c18b3dbb63
label: Modbus Serial Slave
thingTypeUID: modbus:serial
configuration:
baud: 9600
timeBetweenTransactionsMillis: 35
connectMaxTries: 1
stopBits: â1.0â
parity: odd
receiveTimeoutMillis: 1500
dataBits: 8
echo: false
encoding: rtu
flowControlIn: none
port: /dev/ttyUSB1
flowControlOut: none
connectTimeoutMillis: 10000
id: 1
enableDiscovery: false
UID: modbus:poller:c18b3dbb63:a43d95c311
label: Regular Poll
thingTypeUID: modbus:poller
configuration:
length: 2
start: 25
refresh: 500
maxTries: 1
cacheMillis: 50
type: holding
bridgeUID: modbus:serial:c18b3dbb63
The bridge is online but after saving the poller, there is following problem/ are 4 errors:
2022-02-03 15:29:45.202 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - Error connecting connection SerialConnection [m_SerialPort=null, m_Parameters.getPortName()=/dev/ttyUSB1] for endpoint ModbusSerialSlaveEndpoint [getPortName()=/dev/ttyUSB1]: Could not get port identifier, maybe insufficient permissions. null
2022-02-03 15:29:45.203 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Could not connect to endpoint ModbusSerialSlaveEndpoint [getPortName()=/dev/ttyUSB1] â aborting request ModbusReadRequestBlueprint [slaveId=1, functionCode=READ_MULTIPLE_REGISTERS, start=25, length=2, maxTries=1] [operation ID 1b8f9fd7-0718-4378-afd5-978492af7102]
2022-02-03 15:29:45.203 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Could not connect to endpoint ModbusSerialSlaveEndpoint [getPortName()=/dev/ttyUSB1] â aborting request ModbusReadRequestBlueprint [slaveId=1, functionCode=READ_MULTIPLE_REGISTERS, start=25, length=2, maxTries=1] [operation ID 1b8f9fd7-0718-4378-afd5-978492af7102]
2022-02-03 15:29:45.203 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Could not connect to endpoint ModbusSerialSlaveEndpoint [getPortName()=/dev/ttyUSB1] â aborting request ModbusReadRequestBlueprint [slaveId=1, functionCode=READ_MULTIPLE_REGISTERS, start=25, length=2, maxTries=1] [operation ID 1b8f9fd7-0718-4378-afd5-978492af7102]
what ist the problem?
my check for permission:
ls -l /dev/ttyUSB*
in an other binding (PHC) I read something about the driver for like in my device - but I didnât want to install thatâŠ:
PHC - Bindings | openHAB
GitHub - aperepel/raspberrypi-ch340-driver: CH340/341 (HL340/341) Serial-to-USB UART Driver for Raspberry Pi
thx