Hi
First great job and many thanks to all here.
I want to give some feedback and several questions in the end.
My hardware
- Raspi 3
- non FTDI Modbus USB Converter
- SDM630 Powermeter
My software on raspi
- openhab (latest stable)
- influxdb + grafana
Working PC with Win10:
- I am not using eclipse, but I read something about switching to visual sorce code as next step…?
things:
Bridge modbus:serial:modbus1 [ port="/dev/ttyUSB0", id=1, baud=9600, stopBits="1", parity="none", dataBits=8, encoding="rtu" ]
{
Bridge poller inputRegisters [ start=0, length=18, refresh=60000, type="input" ] {
Thing data phase1Volt [ readStart="0", readValueType="float32" ]
Thing data phase2Volt [ readStart="2", readValueType="float32" ]
Thing data phase3Volt [ readStart="4", readValueType="float32" ]
Thing data phase1Amps [ readStart="6", readValueType="float32" ]
Thing data phase2Amps [ readStart="8", readValueType="float32" ]
Thing data phase3Amps [ readStart="10", readValueType="float32" ]
Thing data phase1Power [ readStart="12", readValueType="float32" ]
Thing data phase2Power [ readStart="14", readValueType="float32" ]
Thing data phase3Power [ readStart="16", readValueType="float32" ]
}
Bridge poller inputRegisters2 [ start=48, length=12, refresh=60000, type="input" ] {
Thing data sumAmps [ readStart="48", readValueType="float32" ]
//Thing data xxx [ readStart="50", readValueType="float32" ]
Thing data totalPower [ readStart="52", readValueType="float32" ]
//Thing data xxx [ readStart="54", readValueType="float32" ]
Thing data totalVA [ readStart="56", readValueType="float32" ]
//Thing data xxx [ readStart="58", readValueType="float32" ]
}
Bridge poller inputRegisters3 [ start=342, length=2, refresh=60000, type="input" ] {
Thing data totalKWh [ readStart="342", readValueType="float32" ]
}
}
I didn’t understand first the adress rules, so I run into troubles with
- modbus-adresses, like 30049 (sumAmps) and the corresponding input read with start=48 instead of 49
- readStart must also be start (or higher) from start-adress, I thought start means start-adress and readStart is an offset, so using first:
Bridge poller inputRegisters3 [ start=342, length=2, refresh=60000, type="input" ] {
wrong: Thing data totalKWh [ readStart="0", readValueType="float32" ]
correct: Thing data totalKWh [ readStart="342", readValueType="float32" ]
}
but “wrong” ends in some errors (reading negative bits…), I didn’t read carefully enough .
Now all works fine, saving several datas to influx and generating graphs with grafana.
If someone wants item or other settings, simple tell, i don’t want to spam too much with my first entry
Questions:
A) What is the difference beetween same or unique Bridge poller “names”? (look at @aco example)
B) I am using marketplace binding inside openhab (level beta) to install the two modbus bindings. How to keep them updated? How can I see which “version” I use?
C) Here are some log-Errors, I am not sure, what I can do to avoid this:
This I see a often in an hour, with polling every Minute:
2018-01-13 16:13:23.566 [ERROR] [t.wimpi.modbus.io.ModbusRTUTransport] - Last request: 01 04 01 56 00 02 90 27
2018-01-13 16:13:23.569 [ERROR] [t.wimpi.modbus.io.ModbusRTUTransport] - failed to read: Error reading response (EOF)
2018-01-13 16:13:23.574 [ERROR] [pi.modbus.io.ModbusSerialTransaction] - execute try 1/1 error: I/O exception: IOException Error reading response (EOF). Request: net.wimpi.modbus.msg.ReadInputRegistersRequest@1a814e6 (unit id 1 & transaction 351). Serial parameters: SerialParameters@10214c8[portName=/dev/ttyUSB0,baudRate=9600,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
2018-01-13 16:13:23.577 [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@1a814e6 (unit id 1 & transaction 351). Serial parameters: SerialParameters@10214c8[portName=/dev/ttyUSB0,baudRate=9600,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
2018-01-13 16:13:23.581 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@11a50e0[slaveId=1,functionCode=READ_INPUT_REGISTERS,start=342,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 d7066bd7-2894-4b58-9ac3-f4235a76cad0]
This I saw only once last hours:
2018-01-13 15:54:10.815 [ERROR] [t.wimpi.modbus.io.ModbusRTUTransport] - awaited 38 bytes, but received 16
2018-01-13 15:54:10.818 [ERROR] [t.wimpi.modbus.io.ModbusRTUTransport] - Last request: 01 04 00 00 00 12 70 07
2018-01-13 15:54:10.820 [ERROR] [t.wimpi.modbus.io.ModbusRTUTransport] - failed to read: CRC Error in received frame: 17 bytes: 01 04 24 43 6a bf 88 43 6b 76 13 43 6a 1c 64 3f 24
2018-01-13 15:54:10.823 [ERROR] [pi.modbus.io.ModbusSerialTransaction] - execute try 1/1 error: I/O exception: IOException CRC Error in received frame: 17 bytes: 01 04 24 43 6a bf 88 43 6b 76 13 43 6a 1c 64 3f 24 . Request: net.wimpi.modbus.msg.ReadInputRegistersRequest@71949c (unit id 1 & transaction 288). Serial parameters: SerialParameters@10214c8[portName=/dev/ttyUSB0,baudRate=9600,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
2018-01-13 15:54:10.826 [ERROR] [pi.modbus.io.ModbusSerialTransaction] - execute reached max tries 1, throwing last error: I/O exception: IOException CRC Error in received frame: 17 bytes: 01 04 24 43 6a bf 88 43 6b 76 13 43 6a 1c 64 3f 24 . Request: net.wimpi.modbus.msg.ReadInputRegistersRequest@71949c (unit id 1 & transaction 288). Serial parameters: SerialParameters@10214c8[portName=/dev/ttyUSB0,baudRate=9600,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
2018-01-13 15:54:10.828 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@1f2c74c[slaveId=1,functionCode=READ_INPUT_REGISTERS,start=0,length=18,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: 17 bytes: 01 04 24 43 6a bf 88 43 6b 76 13 43 6a 1c 64 3f 24 [operation ID 9cdcd858-e467-4cf4-b0f6-02a0e9139345]
2018-01-13 15:54:12.692 [ERROR] [t.wimpi.modbus.io.ModbusRTUTransport] - Last request: 01 04 00 00 00 12 70 07
2018-01-13 15:54:12.694 [ERROR] [t.wimpi.modbus.io.ModbusRTUTransport] - failed to read: Error reading response (EOF)
2018-01-13 15:54:12.696 [ERROR] [pi.modbus.io.ModbusSerialTransaction] - execute try 1/1 error: I/O exception: IOException Error reading response (EOF). Request: net.wimpi.modbus.msg.ReadInputRegistersRequest@6a4820 (unit id 1 & transaction 289). Serial parameters: SerialParameters@10214c8[portName=/dev/ttyUSB0,baudRate=9600,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
2018-01-13 15:54:12.699 [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@6a4820 (unit id 1 & transaction 289). Serial parameters: SerialParameters@10214c8[portName=/dev/ttyUSB0,baudRate=9600,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
2018-01-13 15:54:12.701 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@1f2c74c[slaveId=1,functionCode=READ_INPUT_REGISTERS,start=0,length=18,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 9cdcd858-e467-4cf4-b0f6-02a0e9139345]