Modbus openHAB2 binding available for alpha testing

Hi @aerodolphin

The Eclipse Markerplace binding is the one this thread talks about. It is re-implementation of the modbus binding using openHAB2 concepts such as things etc. Also some bugs/caveats have been fixed, e.g. writing 32 bit numbers to registers. The binding is still subject to change, since it is not accepted yet to main openHAB distribution.

Then there’s the older binding, certainly stable. It works also with openHAB2, but the configuration must be done with text file.

See explanations of “since 2.x” and “since 1.x” of the difference: https://docs.openhab.org/addons/bindings.html

Only the first Data Thing goes online

What I meant is that I can see poller going offline

16:34:07.617 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'modbus:poller:endpointSMA:SMA_Daily_Yield' changed from ONLINE to OFFLINE

but not when it goes back ONLINE (like in the picture you pasted)

Log files with more context would help.

The DataThing never goes online, Ill try enable more detailed logging.

Ok I disbaled the last Data Thing (Daily Yield), now I have two thats online - but the update is very slow. When I poll with a plain modbus poller it’s very fast.

Thank you Sami for your fast reply.

So, since I’m beginning and It’s a system for a house that will be build soon, I think will be better to start working with this new Modbus binding.

I will just check first in the arduino side if the modbus is working and after I will make the new thread.

For the old Modbus Binding I found some examples of arduino scketches. But for these binding I’m having some difficulties to understand how It will work on the arduino side. Since the communication protocol (RS485) will be the same, should work, right?

For example the one stated here:

https://community.openhab.org/t/button-led-on-arduino-node-over-modbus/15475

Or this one more simpler, just to turn on a LED on arduino with a swtich on Openhab2:

#include <ModbusRtu.h>

uint16_t au16data[1];

Modbus slave(1,0,2);
void setup() {
  pinMode(11, OUTPUT);
  digitalWrite(11, LOW );
  slave.begin( 19200 );
  au16data[0] = 1;
}

void loop() {
if (slave.poll( au16data, 1 ))
{
  digitalWrite( 11, bitRead( au16data[0], 0 ));
}
}

What do you mean by update is very slow? The data updates less frequently than before? You do have 5 second poll interval…

Best,
Sami

I have 4 other modbus devices attached to Openhab - they all have a refresh at 5 sec. Its still up to 45 second to update on the SMA inverter

Do you mean that commands take time to show up SMA inverter? I’m sorry, I don’t think I’m understanding the exact issue…

When I try reading the two Input registers, with a refresh rate at 5s - It takes between 45 - 60 seconds to update.

With Modbus Poll, I have instant updates

OK, thanks. To investigate this further, please share verbose log files.

Ill post it shortly

1 Like

Yes, Modbus RTU is still Modbus RTU. It’s a well defined protocol – both new and older binding talk the same protocol.

I am not sure I understand all that happens in your example. However, slave.poll sounds like the arduino is reading data from Modbus Slave.

Please note that the openHAB binding is acting as Modbus Master, not as Modbus Slave. So it might be that the arduino code is not doing what you want it to do…

Best,
Sami

Yes, you right. I will see that slave.poll on the arduino side like It appears wrong.

Ok here - Im not sure were to start its pretty large :slight_smile:

17:44:23.854 [INFO ] [ort.modbus.internal.ModbusManagerImpl] - Unregistering regular poll task PollTaskImpl@1ff6174b[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@5f64e67e[slaveId=3,functionCode=READ_INPUT_REGISTERS,start=30961,length=2,maxTries=3],endpoint=ModbusTCPSlaveEndpoint@773beafa[address=192.168.100.141,port=502],callback=org.openhab.binding.modbus.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@aff81b6c] (interrupting if necessary)
17:44:23.855 [INFO ] [ort.modbus.internal.ModbusManagerImpl] - Poll task PollTaskImpl@1ff6174b[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@5f64e67e[slaveId=3,functionCode=READ_INPUT_REGISTERS,start=30961,length=2,maxTries=3],endpoint=ModbusTCPSlaveEndpoint@773beafa[address=192.168.100.141,port=502],callback=org.openhab.binding.modbus.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@aff81b6c] canceled
17:44:23.855 [DEBUG] [modbus.handler.ModbusDataThingHandler] - bridgeStatusChanged for modbus:data:endpointSMA:SMA_Power_A:SMA_Power_A. Reseting handler
17:44:23.855 [DEBUG] [modbus.handler.ModbusDataThingHandler] - bridgeStatusChanged for modbus:data:endpointSMA:SMA_Power_B:SMA_Power_B. Reseting handler
17:44:23.855 [DEBUG] [modbus.handler.ModbusDataThingHandler] - Poller modbus:poller:endpointSMA:SMA_Power_B 'Regular poll' has no poll task -- configuration is changing?
17:44:23.855 [DEBUG] [.handler.ModbusPollerThingHandlerImpl] - Registering polling with ModbusManager
17:44:23.859 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'modbus:poller:endpointSMA:SMA_Power_A' changed from ONLINE to OFFLINE
17:44:23.860 [INFO ] [smarthome.event.ThingUpdatedEvent    ] - Thing 'modbus:poller:endpointSMA:SMA_Power_A' has been updated.
17:44:23.860 [INFO ] [smarthome.event.ThingUpdatedEvent    ] - Thing 'modbus:poller:endpointSMA:SMA_Power_B' has been updated.
17:44:23.860 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'modbus:data:endpointSMA:SMA_Power_A:SMA_Power_A' changed from ONLINE to OFFLINE: Thing disposed -- bridge initializing?
17:44:23.860 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'modbus:data:endpointSMA:SMA_Power_A:SMA_Power_A' changed from OFFLINE: Thing disposed -- bridge initializing? to ONLINE
17:44:23.863 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'modbus:data:endpointSMA:SMA_Power_B:SMA_Power_B' changed from ONLINE to OFFLINE: Thing disposed -- bridge initializing?
17:44:23.863 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'modbus:poller:endpointSMA:SMA_Power_B' changed from ONLINE to OFFLINE
17:44:23.863 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'modbus:data:endpointSMA:SMA_Power_B:SMA_Power_B' changed from OFFLINE: Thing disposed -- bridge initializing? to OFFLINE (BRIDGE_OFFLINE): Poller modbus:poller:endpointSMA:SMA_Power_B 'Regular poll' has no poll task
17:44:23.870 [DEBUG] [.handler.ModbusPollerThingHandlerImpl] - Thing modbus:poller:endpointSmarthouse:Setpoint_Kontor received registers RegisterArrayWrappingInputRegister(00 b4 00 00) for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@55f5f2f5[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=1659,length=2,maxTries=3]
17:44:23.874 [DEBUG] [modbus.handler.ModbusDataThingHandler] - Thing modbus:data:endpointSmarthouse:Setpoint_Kontor:Setpoint_Kontor channels updated: {modbus:data:endpointSmarthouse:Setpoint_Kontor:Setpoint_Kontor:number=18.0, modbus:data:endpointSmarthouse:Setpoint_Kontor:Setpoint_Kontor:lastReadSuccess=2018-04-23T17:44:23.874+0200}. readValueType=uint32_swap, readIndex=Optional[1659], readSubIndex(or 0)=0, extractIndex=0 -> numeric value 180 and boolValue=true. Registers RegisterArrayWrappingInputRegister(00 b4 00 00) for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@55f5f2f5[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=1659,length=2,maxTries=3]
17:44:23.915 [DEBUG] [.handler.ModbusPollerThingHandlerImpl] - Thing modbus:poller:endpointSMA:SMA_Power_A received registers RegisterArrayWrappingInputRegister(00 00 04 00) for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@5ace804a[slaveId=3,functionCode=READ_INPUT_REGISTERS,start=30773,length=2,maxTries=3]
17:44:23.920 [DEBUG] [modbus.handler.ModbusDataThingHandler] - Thing modbus:data:endpointSMA:SMA_Power_A:SMA_Power_A channels updated: {modbus:data:endpointSMA:SMA_Power_A:SMA_Power_A:lastReadSuccess=2018-04-23T17:44:23.920+0200, modbus:data:endpointSMA:SMA_Power_A:SMA_Power_A:number=1.024}. readValueType=int32, readIndex=Optional[30773], readSubIndex(or 0)=0, extractIndex=0 -> numeric value 1024 and boolValue=true. Registers RegisterArrayWrappingInputRegister(00 00 04 00) for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@5ace804a[slaveId=3,functionCode=READ_INPUT_REGISTERS,start=30773,length=2,maxTries=3]
17:44:23.934 [DEBUG] [.handler.ModbusPollerThingHandlerImpl] - Thing modbus:poller:endpointSmarthouse:Smarthouse_LUX received registers RegisterArrayWrappingInputRegister(00 00 00 3c) for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@6cea9bfe[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=2180,length=2,maxTries=3]
17:44:23.934 [DEBUG] [modbus.handler.ModbusDataThingHandler] - Thing modbus:data:endpointSmarthouse:Smarthouse_LUX:Smarthouse_LUX channels updated: {modbus:data:endpointSmarthouse:Smarthouse_LUX:Smarthouse_LUX:lastReadSuccess=2018-04-23T17:44:23.934+0200, modbus:data:endpointSmarthouse:Smarthouse_LUX:Smarthouse_LUX:switch=OFF}. readValueType=uint16, readIndex=Optional[2180], readSubIndex(or 0)=0, extractIndex=0 -> numeric value 0 and boolValue=false. Registers RegisterArrayWrappingInputRegister(00 00 00 3c) for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@6cea9bfe[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=2180,length=2,maxTries=3]
17:44:24.014 [DEBUG] [.handler.ModbusPollerThingHandlerImpl] - Thing modbus:poller:endpointSmarthouse:Smarthouse_Light received registers RegisterArrayWrappingInputRegister(00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00) for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@101f86c5[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=4000,length=34,maxTries=3]
17:44:24.019 [DEBUG] [modbus.handler.ModbusDataThingHandler] - Thing modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Alrum_Pendel channels updated: {modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Alrum_Pendel:dimmer=0.0, modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Alrum_Pendel:lastReadSuccess=2018-04-23T17:44:24.018+0200}. readValueType=uint16, readIndex=Optional[4000], readSubIndex(or 0)=0, extractIndex=0 -> numeric value 0 and boolValue=false. Registers RegisterArrayWrappingInputRegister(00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00) for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@101f86c5[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=4000,length=34,maxTries=3]
17:44:24.023 [DEBUG] [modbus.handler.ModbusDataThingHandler] - Thing modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Alrum_Loft channels updated: {modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Alrum_Loft:dimmer=0.0, modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Alrum_Loft:lastReadSuccess=2018-04-23T17:44:24.023+0200}. readValueType=uint16, readIndex=Optional[4001], readSubIndex(or 0)=0, extractIndex=1 -> numeric value 0 and boolValue=false. Registers RegisterArrayWrappingInputRegister(00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00) for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@101f86c5[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=4000,length=34,maxTries=3]
17:44:24.024 [DEBUG] [modbus.handler.ModbusDataThingHandler] - Thing modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Kokken_Deko channels updated: {modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Kokken_Deko:lastReadSuccess=2018-04-23T17:44:24.024+0200, modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Kokken_Deko:switch=OFF}. readValueType=uint16, readIndex=Optional[4003], readSubIndex(or 0)=0, extractIndex=3 -> numeric value 0 and boolValue=false. Registers RegisterArrayWrappingInputRegister(00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00) for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@101f86c5[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=4000,length=34,maxTries=3]
17:44:24.027 [DEBUG] [modbus.handler.ModbusDataThingHandler] - Thing modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Kokken_Loft channels updated: {modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Kokken_Loft:dimmer=0.0, modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Kokken_Loft:lastReadSuccess=2018-04-23T17:44:24.027+0200}. readValueType=uint16, readIndex=Optional[4004], readSubIndex(or 0)=0, extractIndex=4 -> numeric value 0 and boolValue=false. Registers RegisterArrayWrappingInputRegister(00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00) for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@101f86c5[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=4000,length=34,maxTries=3]
17:44:24.028 [DEBUG] [modbus.handler.ModbusDataThingHandler] - Thing modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Kokken_Stikk channels updated: {modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Kokken_Stikk:lastReadSuccess=2018-04-23T17:44:24.028+0200, modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Kokken_Stikk:switch=OFF}. readValueType=uint16, readIndex=Optional[4005], readSubIndex(or 0)=0, extractIndex=5 -> numeric value 0 and boolValue=false. Registers RegisterArrayWrappingInputRegister(00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00) for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@101f86c5[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=4000,length=34,maxTries=3]
17:44:24.028 [DEBUG] [modbus.handler.ModbusDataThingHandler] - Thing modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Claudia channels updated: {modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Claudia:lastReadSuccess=2018-04-23T17:44:24.028+0200, modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Claudia:switch=OFF}. readValueType=uint16, readIndex=Optional[4006], readSubIndex(or 0)=0, extractIndex=6 -> numeric value 0 and boolValue=false. Registers RegisterArrayWrappingInputRegister(00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00) for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@101f86c5[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=4000,length=34,maxTries=3]
17:44:24.028 [DEBUG] [modbus.handler.ModbusDataThingHandler] - Thing modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Julie channels updated: {modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Julie:switch=OFF, modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Julie:lastReadSuccess=2018-04-23T17:44:24.028+0200}. readValueType=uint16, readIndex=Optional[4007], readSubIndex(or 0)=0, extractIndex=7 -> numeric value 0 and boolValue=false. Registers RegisterArrayWrappingInputRegister(00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00) for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@101f86c5[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=4000,length=34,maxTries=3]
17:44:24.029 [DEBUG] [modbus.handler.ModbusDataThingHandler] - Thing modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Alexander channels updated: {modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Alexander:switch=OFF, modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Alexander:lastReadSuccess=2018-04-23T17:44:24.029+0200}. readValueType=uint16, readIndex=Optional[4008], readSubIndex(or 0)=0, extractIndex=8 -> numeric value 0 and boolValue=false. Registers RegisterArrayWrappingInputRegister(00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00) for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@101f86c5[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=4000,length=34,maxTries=3]
17:44:24.029 [DEBUG] [modbus.handler.ModbusDataThingHandler] - Thing modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Gang channels updated: {modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Gang:lastReadSuccess=2018-04-23T17:44:24.029+0200, modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Gang:switch=OFF}. readValueType=uint16, readIndex=Optional[4009], readSubIndex(or 0)=0, extractIndex=9 -> numeric value 0 and boolValue=false. Registers RegisterArrayWrappingInputRegister(00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00) for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@101f86c5[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=4000,length=34,maxTries=3]
17:44:24.029 [DEBUG] [modbus.handler.ModbusDataThingHandler] - Thing modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Toilet1_Loft channels updated: {modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Toilet1_Loft:switch=OFF, modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Toilet1_Loft:lastReadSuccess=2018-04-23T17:44:24.029+0200}. readValueType=uint16, readIndex=Optional[4010], readSubIndex(or 0)=0, extractIndex=10 -> numeric value 0 and boolValue=false. Registers RegisterArrayWrappingInputRegister(00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00) for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@101f86c5[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=4000,length=34,maxTries=3]
17:44:24.033 [DEBUG] [modbus.handler.ModbusDataThingHandler] - Thing modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Kokken_Skabe channels updated: {modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Kokken_Skabe:dimmer=0.0, modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Kokken_Skabe:lastReadSuccess=2018-04-23T17:44:24.033+0200}. readValueType=uint16, readIndex=Optional[4011], readSubIndex(or 0)=0, extractIndex=11 -> numeric value 0 and boolValue=false. Registers RegisterArrayWrappingInputRegister(00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00) for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@101f86c5[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=4000,length=34,maxTries=3]
17:44:24.033 [DEBUG] [modbus.handler.ModbusDataThingHandler] - Thing modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Stue_Ryg channels updated: {modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Stue_Ryg:switch=OFF, modbus:data:endpointSmarthouse:Smarthouse_Light:Light_GF_Stue_Ryg:lastReadSuccess=2018-04-23T17:44:24.033+0200}. readValueType=uint16, readIndex=Optional[4012], readSubIndex(or 0)=0, extractIndex=12 -> numeric value 0 and boolValue=false. Registers RegisterArrayWrappingInputRegister(00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00) for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@101f86c5[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=4000,length=34,maxTries=3]

Unfortunately, I would need way more logging, to include some polling. So e.g. 2 or more minute of log lines.

Can you use pastebin.com? Can you attach the logs in compressed format here? Or just send it via email (PM me for email address)

I send a log file, hope there is enough :slight_smile:

Best Nanna

Hello @Jakke17. I think we have similar problem using M221 PLC. On my project, I’ve tried using modbus binding version 2 that @ssalonen developed. And somehow the PLC won’t respond to any input. I don’t know if it’s the PLC having such an issue or the binding is not compatible with M221 PLC. I think it’s not compatible with M221 PLC. From what I read in this Forum, any other PLC works well using this binding. CMMIW :slight_smile:

Now I’m using openHAB with modbus binding version 1 on openHAB version 2 as my HMI and Vijeo Citect as my Virtual Monitoring and Manual Switch Device. Other software that I’m using is Poll Modbus to check the communication both from openHAB and Vijeo to the PLC. It works well using local connection. I want to try it using internet connection and openHAB cloud soon.

Thanks,

Randi

Are you saying that binding v1 works with M221 PLC but not version 2?

If this is the case, I would consider this a bug in v2.

Best,
Sami

I have been testing further - I’m not sure what the difference is called.

I have one modbus device were my Input registers starts at 0, I have no problem with those.

Then my SMA inverter were I want to read eg. (Input register) 30773 is acting strange, could there be any issue with the binding when I address this kind? ( Again I don’t know if this is called absolute addressing or what?)