Hi Thiere.
I have a problem to get my values out of my heatpump.
The modbus tcp is basically running but i get a java error:
If i check it with http://easymodbustcp.net/de/
I get the responses:
FC4
Starting Register 11
int16*10 is the output (e.G. 33 means 3,3 degree outside temp).
These is my configuration in openhab 2:
modbus.cfg
sets refresh interval to Modbus polling service.
Value in milliseconds (optional, defaults to 200)
poll=1000
Example of Modbus TCP slave
Connection parameters to Modbus TCP server (“slave”), values separated by colon (
- host or ip of the modbus server (“slave”), mandatory
- port, optional, default 502
- interTransactionDelayMillis, optional, in milliseconds, default 60
- reconnectAfterMillis, optional, in milliseconds, default 0
- interConnectDelayMillis, optional, in milliseconds, default 0
- connectMaxTries, optional, default 3
- connectTimeout, optional, in milliseconds, default 0 (=infinite or OS default)
As a general rule, usually only host needs to be specified. Parameters other than host
and port should be overridden only in cases when extreme performance is required, or when there are
errors with the default parameter values.
See wiki for more details.
(slave name) (host or IP)
| | (port)
| | | (interTransactionDelayMillis, in milliseconds)
| | | | (reconnectAfterMillis, in milliseconds)
| | | | | (interConnectDelayMillis, in milliseconds)
| | | | | | (connectMaxTries)
| | | | | | | (connectTimeout)
| | | | | | | |
tcp.slave1.connection=192.168.0.15:502:60:0:0:3:100
The data type, can be “coil” “discrete” “holding” “input”. See wiki for more details.
tcp.slave1.type=input
The slave id (optional, defaults to ‘1’)
tcp.slave1.id=1
The slave start address (optional, defaults to ‘0’)
tcp.slave1.start=11
The number of data item to read
(optional, defaults to ‘0’ - but set it to something meaningful)
tcp.slave1.length=4
Value type, required for combined registers (details: http://www.simplymodbus.ca/FAQ.htm#Types)
Can be “bit”, “int8”, “uint8”, “int16”, “uint16”, “int32”, “uint32”, “float32”
(optional, defaults to ‘uint16’)
tcp.slave1.valuetype=int16
modbus.items
Number MySwitch0 “Temp. Aussen” (ALL) {modbus=“slave1:11”}
Number MySwitch1 “Temp. Brauchwasser” (ALL) {modbus=“slave1:12”}
Number MySwitch2 “Temp. Vorlauf” (ALL) {modbus=“slave1:13”}
Number MySwitch3 “Temp. Rücklauf” (ALL) {modbus=“slave1:14”}
modbus.sitemap
sitemap default label=“Waermepumpe”
{
Text item=MySwitch0 label="Temp. Aussen"
Text item=MySwitch1 label="Temp. Brauchwasser"
Text item=MySwitch2 label="Temp. Vorlauf"
Default item=MySwitch3 label=“Temp. Ruecklauf”
}
OH2 2.2 Error Log:
2018-01-24 23:55:24.657 [ERROR] [.binding.modbus.internal.ModbusSlave] - ModbusSlave (slave1) error getting response from slave
java.lang.ArrayIndexOutOfBoundsException: 14
at org.openhab.binding.modbus.internal.ModbusBinding.extractStateFromRegisters(ModbusBinding.java:365) [210:org.openhab.binding.modbus:1.11.0]
at org.openhab.binding.modbus.internal.ModbusBinding.internalUpdateItem(ModbusBinding.java:243) [210:org.openhab.binding.modbus:1.11.0]
at org.openhab.binding.modbus.internal.ModbusSlave.updateItem(ModbusSlave.java:458) [210:org.openhab.binding.modbus:1.11.0]
at org.openhab.binding.modbus.internal.ModbusSlave.update(ModbusSlave.java:436) [210:org.openhab.binding.modbus:1.11.0]
at org.openhab.binding.modbus.internal.ModbusBinding.execute(ModbusBinding.java:488) [210:org.openhab.binding.modbus:1.11.0]
at org.openhab.core.binding.AbstractActiveBinding$BindingActiveService.execute(AbstractActiveBinding.java:144) [211:org.openhab.core.compat1x:2.2.0]
at org.openhab.core.service.AbstractActiveService$RefreshThread.run(AbstractActiveService.java:166) [211:org.openhab.core.compat1x:2.2.0]
Anyone of the cracks in here who can help me?
regards
mischa