Modbus 2 configuration

Hi,

I have installed Modbus binding and I am working to control smoke Detector and Manual Call Point using modbus protocol. I have configured Modbus 2 in Paper UI and I am getting some issue. I dont know whether I have configured modbus correctly.

I have configured things, items in .things /.items file. Still I need configure same in Paper UI ?

Can you please help me to configure it correctly?.

Snapshot


My .things file :slight_smile:

Bridge modbus:serial:slave01 [port="/dev/ttyACM0",baud=9600,id=1,stopBits="1.0",parity="none",dataBits=8,encoding="rtu"]
{
    // InputControlModule is Manual call point
    // Analog Input Register , 30001 + 0x08
    Bridge poller inputControlModule[start=8, length=2, refresh=1000, type="input"]
    {
        Thing data input1[readStart="8", readValueType="int32"]
    }

    
}

Bridge modbus:serial:slave02 [port="/dev/ttyACM0",baud=9600,id=2,stopBits="1.0",parity="none",dataBits=8,encoding="rtu"]
{  

    //Holding Register = 40001 + 8 = 40009
    Bridge poller smokeDetector [start=8, length=2, refresh=1000,type="input"]
    {
        //Thing data smokeDetector1[readStart="8",readVal1ueType="int32",writeStart="8",writeValueType="int32", writeType="holding"] 
        Thing data smokeDetector1[readStart="8",readValueType="int32"]        
    }
    
    //Reset the SmokeDetector at register 0xAD
    Bridge poller resetSmokeDetector [ start=173, length=2, refresh=1000,type="coil"]
    {
        Thing data resetSmokeDetector1[writeStart="173",writeValueType="bit",writeType="coil"]
    }

}

My .items file details:

Number SmokeDetector    "SmokeDetector_Status [%d]"  <smoke>  { channel="modbus:serial:slave02:smokeDetector:smokeDetector1:number" }
Number ManualSwitch "Manual_Call_Point" {channel="modbus:serial:slave01:inputControlModule:input1:number"}

My .sitemap details:

sitemap Building label="Building Autionmation"
{
    Frame label="Fire Alaram"{
        //Switch item = outputControlModule1 label="Fire Alarm Status" icon="soundvolume"
        //Switch item=FireAlarm label="Fire Alarm Status" icon="soundvolume"
        //Contact item=ManualSwitch 
        Text item=SmokeDetector
        Text item=ManualSwitch
    }
}

My objective:

  1. Read the Status of manual call point and display it in floor Plan
  2. If Smoke is detected by Smoke detector, it should turn on light in floor plan.
  3. After smoke is detected, reset the register in smoke detector device.

As of now,I am trying to read and displaying status of smoke Detector and Manual call point.

Error:

2019-03-06 20:54:00.740 [thome.event.ItemStateEvent] - ManualSwitch updated to 1
2019-03-06 20:54:02.440 [event.ThingStatusInfoEvent] - 'modbus:data:slave02:smokeDetector:smokeDetector1' updated: ONLINE
2019-03-06 20:54:02.440 [thome.event.ItemStateEvent] - Received event of type 'ItemStateEvent' under the topic 'smarthome/items/SmokeDetector/state' with payload: '{"type":"Decimal","value":"131073"}'
2019-03-06 20:54:02.441 [thome.event.ItemStateEvent] - SmokeDetector updated to 131073
2019-03-06 20:54:02.500 [event.ThingStatusInfoEvent] - 'modbus:data:slave01:inputControlModule:input1' updated: ONLINE
2019-03-06 20:54:02.500 [thome.event.ItemStateEvent] - Received event of type 'ItemStateEvent' under the topic 'smarthome/items/ManualSwitch/state' with payload: '{"type":"Decimal","value":"1"}'
2019-03-06 20:54:02.500 [thome.event.ItemStateEvent] - ManualSwitch updated to 1
2019-03-06 20:54:04.139 [event.ThingStatusInfoEvent] - 'modbus:poller:slave02:resetSmokeDetector' updated: OFFLINE (COMMUNICATION_ERROR): Error with read: org.openhab.io.transport.modbus.internal.ModbusSlaveIOExceptionImpl: Modbus IO Error with cause=ModbusIOException, EOF=false, message='I/O exception: IOException Error reading response (EOF)', cause2=null
2019-03-06 20:54:04.199 [event.ThingStatusInfoEvent] - 'modbus:data:slave02:smokeDetector:smokeDetector1' updated: ONLINE
2019-03-06 20:54:04.199 [thome.event.ItemStateEvent] - Received event of type 'ItemStateEvent' under the topic 'smarthome/items/SmokeDetector/state' with payload: '{"type":"Decimal","value":"131073"}'

SmokeDetector and ManualSwitch Items appear to be being read from Modbus successfully.

That leaves resetSmokeDetector1 data thing, for which you haven’t an Item yet.
You seem to be configuring that as a write-only Item, that’s fine.
But note that the resetSmokeDetector poller is still configured to read-poll two coils.

Maybe your mystery slave device doesn’t allow reading of write-only coils??

You can disable read polling by setting poller thing refresh=0.

Hi Rossko,

Yes, resetSmokeDetector1 slave device is write only. I thoght that If I mention writeStart in Things data, OH2 treat it as write coils. Below is my configuration details,

.things,

Bridge poller resetSmokeDetector [ start=173, length=2, refresh=0,type="coil"]
    {
        Thing data resetSmokeDetector1[writeTransform="0",writeStart="173",writeValueType="bit",writeType="coil"]
    }

.items

Switch ResetSmokeDetector1            "Reseting_Smoke_Detector [%d]"    { channel="modbus:serial:slave02:resetSmokeDetector:resetSmokeDetector1:switch" }

.sitemap

sitemap Building label="Building Autionmation"
{
    Frame label="Fire Alaram"{
        //Switch item = outputControlModule1 label="Fire Alarm Status" icon="soundvolume"
        //Switch item=FireAlarm label="Fire Alarm Status" icon="soundvolume"
        //Contact item=ManualSwitch 
        Text item=SmokeDetector
        Text item=ManualSwitch
        Switch item=ResetSmokeDetector1
    }
}

Still I am seeing below issue openHAB GUI,

I have linked resetSmokeDetector1 to Modbus data like this,

My objective:
Before the smoke is detected, register will have this value 02 04 04 00 02 00 00 69 44
When smoke is detected, register will have this value 02 04 04 00 02 00 01 69 44
Afer smoke is detected, I will reset the register like this 02 05 00 AD 00 01 9D D8
After reseting , response will be like this 02 05 00 AD 00 01 9D D8 (I am expecting)

NOTE: As of now, I am using button to manually trigger the smoke event.

log:

2019-03-07 12:30:52.696 [DEBUG] [t.wimpi.modbus.io.ModbusRTUTransport] - Sent: 02 04 00 08 00 02 f0 3a 
2019-03-07 12:30:52.715 [TRACE] [t.wimpi.modbus.io.ModbusRTUTransport] - Managed to read at least one byte
2019-03-07 12:30:52.723 [DEBUG] [t.wimpi.modbus.io.ModbusRTUTransport] - Response: 02 04 04 00 02 00 01 a8 84 
2019-03-07 12:30:52.723 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - Response for read request (FC=4, transaction ID=0): 02 04 04 00 02 00 01  [operation ID 315dcc2f-6588-406b-b8fc-616aa5e196b1]
2019-03-07 12:30:52.723 [TRACE] [modbus.internal.ModbusLibraryWrapper] - Calling read response callback org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@229337aa for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@64d209b9[slaveId=2,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3]. Response was net.wimpi.modbus.msg.ReadInputRegistersResponse@7b1a6c2a
2019-03-07 12:30:52.723 [TRACE] [modbus.internal.ModbusLibraryWrapper] - Called read response callback org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@229337aa for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@64d209b9[slaveId=2,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3]. Response was net.wimpi.modbus.msg.ReadInputRegistersResponse@7b1a6c2a
2019-03-07 12:30:52.723 [TRACE] [ing.ModbusSlaveConnectionFactoryImpl] - Validating endpoint ModbusSerialSlaveEndpoint@79d88036[portName=/dev/ttyACM0] connection SerialConnection@43c721f7[portName=/dev/ttyACM0,port=/dev/ttyACM0] -> true
2019-03-07 12:30:52.723 [TRACE] [ing.ModbusSlaveConnectionFactoryImpl] - Passivating connection SerialConnection@43c721f7[portName=/dev/ttyACM0,port=/dev/ttyACM0] for endpoint ModbusSerialSlaveEndpoint@79d88036[portName=/dev/ttyACM0]...
2019-03-07 12:30:52.723 [TRACE] [ing.ModbusSlaveConnectionFactoryImpl] - (passivate) Connection SerialConnection@43c721f7[portName=/dev/ttyACM0,port=/dev/ttyACM0] (endpoint ModbusSerialSlaveEndpoint@79d88036[portName=/dev/ttyACM0]) age (1975717ms) is below the reconnectAfterMillis (-1ms) limit and connection time (1551940077006) is after the "disconnectBeforeConnectedMillis"=1551938999235. Keep the connection open.
2019-03-07 12:30:52.723 [TRACE] [ing.ModbusSlaveConnectionFactoryImpl] - ...Passivated connection SerialConnection@43c721f7[portName=/dev/ttyACM0,port=/dev/ttyACM0] for endpoint ModbusSerialSlaveEndpoint@79d88036[portName=/dev/ttyACM0]
2019-03-07 12:30:52.724 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - returned connection to pool for endpoint ModbusSerialSlaveEndpoint@79d88036[portName=/dev/ttyACM0]
2019-03-07 12:30:52.724 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - returning connection for endpoint ModbusSerialSlaveEndpoint@79d88036[portName=/dev/ttyACM0] took 1 ms
2019-03-07 12:30:52.724 [DEBUG] [.thing.internal.CommunicationManager] - Received  event '131073' for non-existing thing 'modbus:serial:slave02:smokeDetector:smokeDetector1', not forwarding it to the handler
2019-03-07 12:30:52.724 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - Connection was returned to the pool, ending operation [operation ID 315dcc2f-6588-406b-b8fc-616aa5e196b1]
2019-03-07 12:30:52.724 [DEBUG] [rt.modbus.internal.ModbusManagerImpl] - Modbus operation ended, timing info: {total: 29 ms, connection: 1, transaction=28, callback=0} [operation ID 315dcc2f-6588-406b-b8fc-616aa5e196b1]
2019-03-07 12:30:52.724 [DEBUG] [rt.modbus.internal.ModbusManagerImpl] - Execution of scheduled (1000ms) poll task BasicPollTaskImpl@205ce4a6[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@64d209b9[slaveId=2,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@79d88036[portName=/dev/ttyACM0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@229337aa] finished at 1551942052724. Was started at millis: 1551942052694 (=duration of 30 millis)
2019-03-07 12:30:52.764 [DEBUG] [rt.modbus.internal.ModbusManagerImpl] - Executing scheduled (1000ms) poll task BasicPollTaskImpl@3c8bd0ea[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@324c390b[slaveId=1,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@3673bb9a[portName=/dev/ttyACM0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@818dfb5]. Current millis: 1551942052764
2019-03-07 12:30:52.764 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - Starting new operation with task BasicPollTaskImpl@3c8bd0ea[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@324c390b[slaveId=1,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@3673bb9a[portName=/dev/ttyACM0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@818dfb5]. Trying to get connection [operation ID 454ad48a-5f58-4fcb-9813-bf17725f4167]
2019-03-07 12:30:52.764 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - Executing task BasicPollTaskImpl@3c8bd0ea[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@324c390b[slaveId=1,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@3673bb9a[portName=/dev/ttyACM0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@818dfb5] (oneOff=false)! Waiting for connection. Idle connections for this endpoint: 1, and active 0 [operation ID 454ad48a-5f58-4fcb-9813-bf17725f4167]
2019-03-07 12:30:52.764 [TRACE] [ing.ModbusSlaveConnectionFactoryImpl] - Waited 0ms (interTransactionDelayMillis 35ms) before giving returning connection SerialConnection@43c721f7[portName=/dev/ttyACM0,port=/dev/ttyACM0] for endpoint ModbusSerialSlaveEndpoint@3673bb9a[portName=/dev/ttyACM0], to ensure delay between transactions.
2019-03-07 12:30:52.765 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - borrowing connection (got Optional[SerialConnection@43c721f7[portName=/dev/ttyACM0,port=/dev/ttyACM0]]) for endpoint ModbusSerialSlaveEndpoint@3673bb9a[portName=/dev/ttyACM0] took 0 ms
2019-03-07 12:30:52.765 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - Executing task BasicPollTaskImpl@3c8bd0ea[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@324c390b[slaveId=1,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@3673bb9a[portName=/dev/ttyACM0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@818dfb5] (oneOff=false)! Connection received in 1 ms [operation ID 454ad48a-5f58-4fcb-9813-bf17725f4167]
2019-03-07 12:30:52.765 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - Operation with task BasicPollTaskImpl@3c8bd0ea[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@324c390b[slaveId=1,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@3673bb9a[portName=/dev/ttyACM0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@818dfb5]. Got a connection successfully [operation ID 454ad48a-5f58-4fcb-9813-bf17725f4167]
2019-03-07 12:30:52.765 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 [operation ID 454ad48a-5f58-4fcb-9813-bf17725f4167]
2019-03-07 12:30:52.765 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - Ensuring that enough time passes before retrying again. Sleeping if necessary [operation ID 454ad48a-5f58-4fcb-9813-bf17725f4167]
2019-03-07 12:30:52.765 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - Sleep ended, slept 0 [operation ID 454ad48a-5f58-4fcb-9813-bf17725f4167]
2019-03-07 12:30:52.765 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - Going execute transaction with request request (FC=READ_INPUT_REGISTERS): 00 00 00 00 00 06 01 04 00 08 00 02  [operation ID 454ad48a-5f58-4fcb-9813-bf17725f4167]
2019-03-07 12:30:52.765 [DEBUG] [t.wimpi.modbus.io.ModbusRTUTransport] - Sent: 01 04 00 08 00 02 f0 09 
2019-03-07 12:30:52.785 [TRACE] [t.wimpi.modbus.io.ModbusRTUTransport] - Managed to read at least one byte
2019-03-07 12:30:52.793 [DEBUG] [t.wimpi.modbus.io.ModbusRTUTransport] - Response: 01 04 04 00 01 00 00 aa 44 
2019-03-07 12:30:52.793 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - Response for read request (FC=4, transaction ID=0): 01 04 04 00 01 00 00  [operation ID 454ad48a-5f58-4fcb-9813-bf17725f4167]
2019-03-07 12:30:52.793 [TRACE] [modbus.internal.ModbusLibraryWrapper] - Calling read response callback org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@818dfb5 for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@324c390b[slaveId=1,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3]. Response was net.wimpi.modbus.msg.ReadInputRegistersResponse@14900748
2019-03-07 12:30:52.793 [DEBUG] [nternal.items.ItemStateConverterImpl] - Converting OnOffType 'ON' to DecimalType '1' for item 'ManualSwitch'
2019-03-07 12:30:52.793 [TRACE] [modbus.internal.ModbusLibraryWrapper] - Called read response callback org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@818dfb5 for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@324c390b[slaveId=1,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3]. Response was net.wimpi.modbus.msg.ReadInputRegistersResponse@14900748
2019-03-07 12:30:52.793 [TRACE] [ing.ModbusSlaveConnectionFactoryImpl] - Validating endpoint ModbusSerialSlaveEndpoint@3673bb9a[portName=/dev/ttyACM0] connection SerialConnection@43c721f7[portName=/dev/ttyACM0,port=/dev/ttyACM0] -> true
2019-03-07 12:30:52.793 [TRACE] [ing.ModbusSlaveConnectionFactoryImpl] - Passivating connection SerialConnection@43c721f7[portName=/dev/ttyACM0,port=/dev/ttyACM0] for endpoint ModbusSerialSlaveEndpoint@3673bb9a[portName=/dev/ttyACM0]...
2019-03-07 12:30:52.793 [TRACE] [ing.ModbusSlaveConnectionFactoryImpl] - (passivate) Connection SerialConnection@43c721f7[portName=/dev/ttyACM0,port=/dev/ttyACM0] (endpoint ModbusSerialSlaveEndpoint@3673bb9a[portName=/dev/ttyACM0]) age (1975787ms) is below the reconnectAfterMillis (-1ms) limit and connection time (1551940077006) is after the "disconnectBeforeConnectedMillis"=1551938999235. Keep the connection open.
2019-03-07 12:30:52.793 [TRACE] [ing.ModbusSlaveConnectionFactoryImpl] - ...Passivated connection SerialConnection@43c721f7[portName=/dev/ttyACM0,port=/dev/ttyACM0] for endpoint ModbusSerialSlaveEndpoint@3673bb9a[portName=/dev/ttyACM0]
2019-03-07 12:30:52.793 [DEBUG] [.thing.internal.CommunicationManager] - Received  event '1' for non-existing thing 'modbus:serial:slave01:inputControlModule:input1', not forwarding it to the handler
2019-03-07 12:30:52.793 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - returned connection to pool for endpoint ModbusSerialSlaveEndpoint@3673bb9a[portName=/dev/ttyACM0]
2019-03-07 12:30:52.794 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - returning connection for endpoint ModbusSerialSlaveEndpoint@3673bb9a[portName=/dev/ttyACM0] took 1 ms
2019-03-07 12:30:52.794 [TRACE] [rt.modbus.internal.ModbusManagerImpl] - Connection was returned to the pool, ending operation [operation ID 454ad48a-5f58-4fcb-9813-bf17725f4167]
2019-03-07 12:30:52.794 [DEBUG] [rt.modbus.internal.ModbusManagerImpl] - Modbus operation ended, timing info: {total: 30 ms, connection: 2, transaction=28, callback=0} [operation ID 454ad48a-5f58-4fcb-9813-bf17725f4167]
2019-03-07 12:30:52.794 [DEBUG] [rt.modbus.internal.ModbusManagerImpl] - Execution of scheduled (1000ms) poll task BasicPollTaskImpl@3c8bd0ea[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@324c390b[slaveId=1,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@3673bb9a[portName=/dev/ttyACM0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@818dfb5] finished at 1551942052794. Was started at millis: 1551942052764 (=duration of 30 millis)

The data thing is all about “matching/linking” Modbus registers with openHAB Items.
The poller thing controls the reading. (if any)
This makes sense, as you may have mixed read-only, read/write, and write-only data things associated with one poller.

I would expect your non-polling poller thing to stay OFFLINE. If it can’t read it, it has no way to know if it’s online.
This won’t stop you writing to it.

It’s going to help you if you convert that to something meaningful, like “read input register from slave 2”
If those are bits of a register, the binding does provide the means to look at bits individually rather than treat it as a big number.
If you reveal what your secret device is, or its manual, it could help?

Can’t see anything wrong with that. You seem to have deleted the things you showed us earlier from your .things file, but haven’t yet rebooted so the binding is still polling them.

EDIT - just noticed

That’s nonsense; writeTransform (if given) is intended to point to transformation service/script

I don’t know the expected behaviour for OpenHAB Modbus. I am reading other issue and understanding openHAB Modbus. Thanks for explanation.

Now, I am getting expected result from OpenHAB Modbus. After making my thing like this

//Reset the SmokeDetector at register 0xAD
    Bridge poller resetSmokeDetector [ start=173, length=2, refresh=0,type="coil"]
    {
        Thing data resetSmokeDetector1[writeTransform="01",writeStart="173",writeValueType="bit",writeType="coil"]
    }

It is working. Please correct me, If I am wrong.

FYI, IT is connected in slave 2.

Smoke Detector:
When I press Smoke Detect Event button, it is not reflecting immediately in sitemap.
After this message “Offline: Waiting for connection to become available” , it is reflected in sitemap.
I am observing same for When I reset smoke detector register in sitemap.

That is not related to Modbus

The UIs are often not very good about refreshing. Make sure your sitemap has no errors,

The important thing is if your Items get immediately updated in events.log (within your 1 second poll period anyway)
If so, then any rules will trigger etc. immediately as well.

Items are getting updated immediately in events.log but in browser (chromium), I am seeing delay in update and if I need it immediately, I need to refresh the Basic UI page.

When I started to work in actual HW, I am getting “CRC Error” and “EOF Error”.

Previously, I was working in simulator HW where Modbus is working properly and able to access devices.

Now, I am working in actual HW and getting error. I have read and implemented other’s solutions. But it is not fixing my issue. Below, I have provided the details,

.things

Bridge modbus:serial:slave04 [port="/dev/ttyACM0",baud=9600,id=4,stopBits="1.0",parity="none",dataBits=8,encoding="rtu"]
{
    // InputControlModule is Manual call point
    // Analog Input Register , 30001 + 0x08
    Bridge poller inputControlModule[start=8, length=2, refresh=300, type="input"]
    {
            Thing data input1[readStart="8",readValueType="int32",readTransform="JS(conversion.js)"]    
    }    
}

//slave 0x80 = 128 - First Smoke Detector
Bridge modbus:serial:slave0x80 [port="/dev/ttyACM0",baud=9600,id=128,stopBits="1.0",parity="none",dataBits=8,encoding="rtu"]
{  

    //Holding Register = 40001 + 8 = 40009
    Bridge poller smokeDetector [start=8, length=2, refresh=1000,type="input"]
    {
        Thing data smokeDetector01[readStart="8",readValueType="int32",readTransform="JS(conversion.js)"]  //Working one         
    }
    
    //Reset the SmokeDetector at register 0xAD
    Bridge poller resetSmokeDetector [ start=173, length=2, refresh=0,type="coil"]
    {
        Thing data resetSmokeDetector01[writeTransform="01",writeStart="173",writeValueType="bit",writeType="coil"]
    }

}

//slave 0x40 = 64 - Second Smoke Detector
Bridge modbus:serial:slave0x40 [port="/dev/ttyACM0",baud=9600,id=64,stopBits="1.0",parity="none",dataBits=8,encoding="rtu"]
{  

    //Holding Register = 40001 + 8 = 40009
    Bridge poller smokeDetector [start=8, length=2, refresh=1000,type="input"]
    {
        Thing data smokeDetector02[readStart="8",readValueType="int32",readTransform="JS(conversion.js)"]  //Working one         
    }
    
    //Reset the SmokeDetector at register 0xAD
    Bridge poller resetSmokeDetector [ start=173, length=2, refresh=0,type="coil"]
    {
        Thing data resetSmokeDetector02[writeTransform="01",writeStart="173",writeValueType="bit",writeType="coil"]
    }

}


//slave 0x01 - Third Smoke Detector
Bridge modbus:serial:slave0x01 [port="/dev/ttyACM0",baud=9600,id=01,stopBits="1.0",parity="none",dataBits=8,encoding="rtu"]
{  

    //Holding Register = 40001 + 8 = 40009
    Bridge poller smokeDetector [start=8, length=2, refresh=1000,type="input"]
    {
        Thing data smokeDetector03[readStart="8",readValueType="int32",readTransform="JS(conversion.js)"]  //Working one         
    }
    
    //Reset the SmokeDetector at register 0xAD
    Bridge poller resetSmokeDetector [ start=173, length=2, refresh=0,type="coil"]
    {
        Thing data resetSmokeDetector04[writeTransform="01",writeStart="173",writeValueType="bit",writeType="coil"]
    }
 
}



//slave 0x20 = 32 - Fourth Smoke Detector
Bridge modbus:serial:slave0x20 [port="/dev/ttyACM0",baud=9600,id=32,stopBits="1.0",parity="none",dataBits=8,encoding="rtu"]
{  

    //Holding Register = 40001 + 8 = 40009
    Bridge poller smokeDetector [start=8, length=2, refresh=1000,type="input"]
    {
        Thing data smokeDetector04[readStart="8",readValueType="int32",readTransform="JS(conversion.js)"]  //Working one         
    }
    
    //Reset the SmokeDetector at register 0xAD
    Bridge poller resetSmokeDetector [ start=173, length=2, refresh=0,type="coil"]
    {
        Thing data resetSmokeDetector04[writeTransform="01",writeStart="173",writeValueType="bit",writeType="coil"]
    }

}


// Fire Alram
//slave 0x10 = 16
Bridge modbus:serial:slave0x10 [port="/dev/ttyACM0",baud=9600,id=16,stopBits="1.0",parity="none",dataBits=8,encoding="rtu"]{
    // OutputControlModule is fire alarm or Hooter
    // Discrete output Coils
    // Discrete register = 0xAC
    // 0xAC = 172d
    Bridge poller fireAlram [start=172,length=2,refresh=1000,type="holding"]
    {
        Thing data fireAlram1[readStart="172",readValueType="int32",writeStart="172",writeValueType="int32",writeType="holding"]
    }
}

.items

// Fire Alram
Number FireAlarm "FireAlarm_Value [%d]" <fire> {channel="modbus:data:slave0x10:fireAlram:fireAlram1:number"}
Switch FireAlarm_Switch "FireAlarm_Switch"  {channel="modbus:data:slave0x10:fireAlram:fireAlram1:switch"}

//Manual Call Point
Number Manual_Value "Manual_Call_Point [%d]" <wallswitch> {channel="modbus:data:slave01:inputControlModule:input1:number"}
Switch Manual_Switch "Manual_CallPoint_Switch [%d]" {channel="modbus:data:slave01:inputControlModule:input1:switch"}

//First Smoke Detector
Number SmokeDetector01    "SmokeDetector01_Value [%d]"  <smoke>  { channel="modbus:data:slave0x80:smokeDetector:smokeDetector01:number" }
Switch SmokeDetector01_Switch    "SmokeDetector01_Switch [%d]"  <smoke>  { channel="modbus:data:slave0x80:smokeDetector:smokeDetector01:switch" }
Switch ResetSmokeDetector01 "Reseting_SmokeDetector01 [%d]"    { channel="modbus:data:slave0x80:resetSmokeDetector:resetSmokeDetector01:switch" }

//Second Smoke Detector
Number SmokeDetector02    "SmokeDetector02_Value [%d]"  <smoke>  { channel="modbus:data:slave0x40:smokeDetector:smokeDetector02:number" }
Switch SmokeDetector02_Switch    "SmokeDetector02_Switch [%d]"  <smoke>  { channel="modbus:data:slave0x40:smokeDetector:smokeDetector02:switch" }
Switch ResetSmokeDetector02 "Reseting_SmokeDetector02 [%d]"    { channel="modbus:data:slave0x40:resetSmokeDetector:resetSmokeDetector02:switch" }

//Third Smoke Detector
Number SmokeDetector03    "SmokeDetector03_Value [%d]"  <smoke>  { channel="modbus:data:slave0x01:smokeDetector:smokeDetector03:number" }
Switch SmokeDetector03_Switch    "SmokeDetector03_Switch [%d]"  <smoke>  { channel="modbus:data:slave0x80:smokeDetector:smokeDetector03:switch" }
Switch ResetSmokeDetector03 "Reseting_SmokeDetector03 [%d]"    { channel="modbus:data:slave0x01:resetSmokeDetector:resetSmokeDetector03:switch" }

//Fourth Smoke Detector
Number SmokeDetector04    "SmokeDetector04_Value [%d]"  <smoke>  { channel="modbus:data:slave0x20:smokeDetector:smokeDetector04:number" }
Switch SmokeDetector04_Switch    "SmokeDetector04_Switch [%d]"  <smoke>  { channel="modbus:data:slave0x20:smokeDetector:smokeDetector04:switch" }
Switch ResetSmokeDetector04 "Reseting_SmokeDetector04 [%d]"    { channel="modbus:data:slave0x40:resetSmokeDetector:resetSmokeDetector04:switch" }

.log

5:19:09.518 [ERROR] [et.wimpi.modbus.io.ModbusRTUTransport] - Last request: 04 04 00 08 00 02 f0 5c
15:19:09.518 [ERROR] [et.wimpi.modbus.io.ModbusRTUTransport] - failed to read: CRC Error in received frame: 3 bytes: 04 04 00 
15:19:09.518 [ERROR] [mpi.modbus.io.ModbusSerialTransaction] - execute try 1/1 error: I/O exception: IOException CRC Error in received frame: 3 bytes: 04 04 00 . Request: net.wimpi.modbus.msg.ReadInputRegistersRequest@24d94233 (unit id 4 & transaction 7396). Serial parameters: SerialParameters@29f6f91c[portName=/dev/ttyACM0,baudRate=9600,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
grep: java.nio.file.NoSuchFileException: /var/lib/openhab2/queued15:19:09.518 [ERROR] [mpi.modbus.io.ModbusSerialTransaction] - execute reached max tries 1, throwing last error: I/O exception: IOException CRC Error in received frame: 3 bytes: 04 04 00 . Request: net.wimpi.modbus.msg.ReadInputRegistersRequest@24d94233 (unit id 4 & transaction 7396). Serial parameters: SerialParameters@29f6f91c[portName=/dev/ttyACM0,baudRate=9600,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=1500]

15:19:09.518 [WARN ] [ort.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@3e6ecadb[slaveId=4,functionCode=READ_INPUT_REGISTERS,start=8,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: 3 bytes: 04 04 00  [operation ID 71bd894e-f23c-47c1-a2ea-da1dcfb9ca5b]
15:19:09.519 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - destroyObject for connection SerialConnection@182eac6d[portName=/dev/ttyACM0,port=/dev/ttyACM0] and endpoint ModbusSerialSlaveEndpoint@7b6c5372[portName=/dev/ttyACM0] -> closing the connection
15:19:09.561 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - Created connection SerialConnection@3ab69fb8[portName=/dev/ttyACM0,port=<null>] for endpoint ModbusSerialSlaveEndpoint@7b6c5372[portName=/dev/ttyACM0]
15:19:09.561 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - Passivating connection SerialConnection@3ab69fb8[portName=/dev/ttyACM0,port=<null>] for endpoint ModbusSerialSlaveEndpoint@7b6c5372[portName=/dev/ttyACM0]...
15:19:09.561 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - (passivate) Connection SerialConnection@3ab69fb8[portName=/dev/ttyACM0,port=<null>] (endpoint ModbusSerialSlaveEndpoint@7b6c5372[portName=/dev/ttyACM0]) age (1554112149561ms) is below the reconnectAfterMillis (-1ms) limit and connection time (0) is after the "disconnectBeforeConnectedMillis"=-1. Keep the connection open.
15:19:09.562 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - ...Passivated connection SerialConnection@3ab69fb8[portName=/dev/ttyACM0,port=<null>] for endpoint ModbusSerialSlaveEndpoint@7b6c5372[portName=/dev/ttyACM0]
15:19:09.562 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - invalidating connection for endpoint ModbusSerialSlaveEndpoint@7b6c5372[portName=/dev/ttyACM0] took 43 ms
15:19:09.562 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Executing task BasicPollTaskImpl@3a515949[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@3e6ecadb[slaveId=4,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@7b6c5372[portName=/dev/ttyACM0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@818e012] (oneOff=false)! Waiting for connection. Idle connections for this endpoint: 0, and active 1 [operation ID 71bd894e-f23c-47c1-a2ea-da1dcfb9ca5b]
15:19:10.501 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - Waited 939ms (interConnectDelayMillis 1000ms, interTransactionDelayMillis 35ms) before connecting disconnected connection SerialConnection@3ab69fb8[portName=/dev/ttyACM0,port=<null>] for endpoint ModbusSerialSlaveEndpoint@22a6ff3d[portName=/dev/ttyACM0], to allow delay between connections re-connects
15:19:10.502 [TRACE] [net.wimpi.modbus.net.SerialConnection] - Got Port Identifier
15:19:10.508 [TRACE] [net.wimpi.modbus.net.SerialConnection] - Got Serial Port
15:19:10.508 [TRACE] [net.wimpi.modbus.net.SerialConnection] - i/o Streams prepared
15:19:10.508 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - Waited 0ms (interTransactionDelayMillis 35ms) before giving returning connection SerialConnection@3ab69fb8[portName=/dev/ttyACM0,port=/dev/ttyACM0] for endpoint ModbusSerialSlaveEndpoint@22a6ff3d[portName=/dev/ttyACM0], to ensure delay between transactions.
15:19:10.509 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - borrowing connection (got Optional[SerialConnection@3ab69fb8[portName=/dev/ttyACM0,port=/dev/ttyACM0]]) for endpoint ModbusSerialSlaveEndpoint@22a6ff3d[portName=/dev/ttyACM0] took 5572 ms
15:19:10.509 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Executing task BasicPollTaskImpl@5d411317[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@607b1c96[slaveId=32,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@22a6ff3d[portName=/dev/ttyACM0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@329aa566] (oneOff=false)! Connection received in 5572 ms [operation ID f4fddf7d-7f7c-4a51-8c4f-b92a4cf5c76c]
15:19:10.509 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 [operation ID f4fddf7d-7f7c-4a51-8c4f-b92a4cf5c76c]
15:19:10.509 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Ensuring that enough time passes before retrying again. Sleeping if necessary [operation ID f4fddf7d-7f7c-4a51-8c4f-b92a4cf5c76c]
15:19:10.509 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Sleep ended, slept 0 [operation ID f4fddf7d-7f7c-4a51-8c4f-b92a4cf5c76c]
15:19:10.509 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Going execute transaction with request request (FC=READ_INPUT_REGISTERS): 00 00 00 00 00 06 20 04 00 08 00 02  [operation ID f4fddf7d-7f7c-4a51-8c4f-b92a4cf5c76c]
15:19:10.510 [DEBUG] [et.wimpi.modbus.io.ModbusRTUTransport] - Sent: 20 04 00 08 00 02 f6 b8 
15:19:10.523 [TRACE] [et.wimpi.modbus.io.ModbusRTUTransport] - Managed to read at least one byte
15:19:10.527 [DEBUG] [et.wimpi.modbus.io.ModbusRTUTransport] - Response: 20 04 00 02 00 
15:19:10.528 [ERROR] [et.wimpi.modbus.io.ModbusRTUTransport] - Last request: 20 04 00 08 00 02 f6 b8
15:19:10.528 [ERROR] [et.wimpi.modbus.io.ModbusRTUTransport] - failed to read: CRC Error in received frame: 3 bytes: 20 04 00 
15:19:10.528 [ERROR] [mpi.modbus.io.ModbusSerialTransaction] - execute try 1/1 error: I/O exception: IOException CRC Error in received frame: 3 bytes: 20 04 00 . Request: net.wimpi.modbus.msg.ReadInputRegistersRequest@6af5510c (unit id 32 & transaction 7397). Serial parameters: SerialParameters@18a3aaba[portName=/dev/ttyACM0,baudRate=9600,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
15:19:10.528 [ERROR] [mpi.modbus.io.ModbusSerialTransaction] - execute reached max tries 1, throwing last error: I/O exception: IOException CRC Error in received frame: 3 bytes: 20 04 00 . Request: net.wimpi.modbus.msg.ReadInputRegistersRequest@6af5510c (unit id 32 & transaction 7397). Serial parameters: SerialParameters@18a3aaba[portName=/dev/ttyACM0,baudRate=9600,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
15:19:10.529 [WARN ] [ort.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@607b1c96[slaveId=32,functionCode=READ_INPUT_REGISTERS,start=8,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: 3 bytes: 20 04 00  [operation ID f4fddf7d-7f7c-4a51-8c4f-b92a4cf5c76c]
15:19:10.529 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - destroyObject for connection SerialConnection@3ab69fb8[portName=/dev/ttyACM0,port=/dev/ttyACM0] and endpoint ModbusSerialSlaveEndpoint@22a6ff3d[portName=/dev/ttyACM0] -> closing the connection
15:19:10.569 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - Created connection SerialConnection@66176eb7[portName=/dev/ttyACM0,port=<null>] for endpoint ModbusSerialSlaveEndpoint@22a6ff3d[portName=/dev/ttyACM0]
15:19:10.570 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - Passivating connection SerialConnection@66176eb7[portName=/dev/ttyACM0,port=<null>] for endpoint ModbusSerialSlaveEndpoint@22a6ff3d[portName=/dev/ttyACM0]...
15:19:10.570 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - (passivate) Connection SerialConnection@66176eb7[portName=/dev/ttyACM0,port=<null>] (endpoint ModbusSerialSlaveEndpoint@22a6ff3d[portName=/dev/ttyACM0]) age (1554112150570ms) is below the reconnectAfterMillis (-1ms) limit and connection time (0) is after the "disconnectBeforeConnectedMillis"=-1. Keep the connection open.
15:19:10.570 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - ...Passivated connection SerialConnection@66176eb7[portName=/dev/ttyACM0,port=<null>] for endpoint ModbusSerialSlaveEndpoint@22a6ff3d[portName=/dev/ttyACM0]
15:19:10.570 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - invalidating connection for endpoint ModbusSerialSlaveEndpoint@22a6ff3d[portName=/dev/ttyACM0] took 41 ms
15:19:10.571 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Executing task BasicPollTaskImpl@5d411317[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@607b1c96[slaveId=32,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@22a6ff3d[portName=/dev/ttyACM0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@329aa566] (oneOff=false)! Waiting for connection. Idle connections for this endpoint: 0, and active 1 [operation ID f4fddf7d-7f7c-4a51-8c4f-b92a4cf5c76c]
15:19:11.508 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - Waited 937ms (interConnectDelayMillis 1000ms, interTransactionDelayMillis 35ms) before connecting disconnected connection SerialConnection@66176eb7[portName=/dev/ttyACM0,port=<null>] for endpoint ModbusSerialSlaveEndpoint@27d60e81[portName=/dev/ttyACM0], to allow delay between connections re-connects
15:19:11.508 [TRACE] [net.wimpi.modbus.net.SerialConnection] - Got Port Identifier
15:19:11.514 [TRACE] [net.wimpi.modbus.net.SerialConnection] - Got Serial Port
15:19:11.514 [TRACE] [net.wimpi.modbus.net.SerialConnection] - i/o Streams prepared
15:19:11.515 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - Waited 0ms (interTransactionDelayMillis 35ms) before giving returning connection SerialConnection@66176eb7[portName=/dev/ttyACM0,port=/dev/ttyACM0] for endpoint ModbusSerialSlaveEndpoint@27d60e81[portName=/dev/ttyACM0], to ensure delay between transactions.
15:19:11.515 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - borrowing connection (got Optional[SerialConnection@66176eb7[portName=/dev/ttyACM0,port=/dev/ttyACM0]]) for endpoint ModbusSerialSlaveEndpoint@27d60e81[portName=/dev/ttyACM0] took 4034 ms
15:19:11.515 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Executing task BasicPollTaskImpl@405e49bd[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@65e2d032[slaveId=16,functionCode=READ_MULTIPLE_REGISTERS,start=172,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@27d60e81[portName=/dev/ttyACM0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@49307ecd] (oneOff=false)! Connection received in 4034 ms [operation ID 20790bb3-3d5b-47e3-bc6d-690f140bd0ba]
15:19:11.515 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 [operation ID 20790bb3-3d5b-47e3-bc6d-690f140bd0ba]
15:19:11.516 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Ensuring that enough time passes before retrying again. Sleeping if necessary [operation ID 20790bb3-3d5b-47e3-bc6d-690f140bd0ba]
15:19:11.516 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Sleep ended, slept 0 [operation ID 20790bb3-3d5b-47e3-bc6d-690f140bd0ba]
15:19:11.516 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Going execute transaction with request request (FC=READ_MULTIPLE_REGISTERS): 00 00 00 00 00 06 10 03 00 ac 00 02  [operation ID 20790bb3-3d5b-47e3-bc6d-690f140bd0ba]
15:19:11.516 [DEBUG] [et.wimpi.modbus.io.ModbusRTUTransport] - Sent: 10 03 00 ac 00 02 07 6b 
15:19:13.018 [TRACE] [et.wimpi.modbus.io.ModbusRTUTransport] - Managed to read at least one byte
15:19:13.020 [ERROR] [et.wimpi.modbus.io.ModbusRTUTransport] - Last request: 10 03 00 ac 00 02 07 6b
15:19:13.021 [ERROR] [et.wimpi.modbus.io.ModbusRTUTransport] - failed to read: Error reading response (EOF)
15:19:13.022 [ERROR] [mpi.modbus.io.ModbusSerialTransaction] - execute try 1/1 error: I/O exception: IOException Error reading response (EOF). Request: net.wimpi.modbus.msg.ReadMultipleRegistersRequest@42789b96 (unit id 16 & transaction 7398). Serial parameters: SerialParameters@64dfe7f[portName=/dev/ttyACM0,baudRate=9600,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
15:19:13.024 [ERROR] [mpi.modbus.io.ModbusSerialTransaction] - execute reached max tries 1, throwing last error: I/O exception: IOException Error reading response (EOF). Request: net.wimpi.modbus.msg.ReadMultipleRegistersRequest@42789b96 (unit id 16 & transaction 7398). Serial parameters: SerialParameters@64dfe7f[portName=/dev/ttyACM0,baudRate=9600,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
15:19:13.024 [WARN ] [ort.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@65e2d032[slaveId=16,functionCode=READ_MULTIPLE_REGISTERS,start=172,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 20790bb3-3d5b-47e3-bc6d-690f140bd0ba]
15:19:13.025 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - destroyObject for connection SerialConnection@66176eb7[portName=/dev/ttyACM0,port=/dev/ttyACM0] and endpoint ModbusSerialSlaveEndpoint@27d60e81[portName=/dev/ttyACM0] -> closing the connection
15:19:13.121 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - Created connection SerialConnection@3d76cd3a[portName=/dev/ttyACM0,port=<null>] for endpoint ModbusSerialSlaveEndpoint@27d60e81[portName=/dev/ttyACM0]
15:19:13.122 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - Passivating connection SerialConnection@3d76cd3a[portName=/dev/ttyACM0,port=<null>] for endpoint ModbusSerialSlaveEndpoint@27d60e81[portName=/dev/ttyACM0]...
15:19:13.123 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - (passivate) Connection SerialConnection@3d76cd3a[portName=/dev/ttyACM0,port=<null>] (endpoint ModbusSerialSlaveEndpoint@27d60e81[portName=/dev/ttyACM0]) age (1554112153123ms) is below the reconnectAfterMillis (-1ms) limit and connection time (0) is after the "disconnectBeforeConnectedMillis"=-1. Keep the connection open.
15:19:13.124 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - ...Passivated connection SerialConnection@3d76cd3a[portName=/dev/ttyACM0,port=<null>] for endpoint ModbusSerialSlaveEndpoint@27d60e81[portName=/dev/ttyACM0]
15:19:13.124 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - invalidating connection for endpoint ModbusSerialSlaveEndpoint@27d60e81[portName=/dev/ttyACM0] took 99 ms
15:19:13.125 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Executing task BasicPollTaskImpl@405e49bd[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@65e2d032[slaveId=16,functionCode=READ_MULTIPLE_REGISTERS,start=172,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@27d60e81[portName=/dev/ttyACM0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@49307ecd] (oneOff=false)! Waiting for connection. Idle connections for this endpoint: 0, and active 1 [operation ID 20790bb3-3d5b-47e3-bc6d-690f140bd0ba]
15:19:13.125 [TRACE] [net.wimpi.modbus.net.SerialConnection] - Got Port Identifier
15:19:13.134 [TRACE] [net.wimpi.modbus.net.SerialConnection] - Got Serial Port
15:19:13.135 [TRACE] [net.wimpi.modbus.net.SerialConnection] - i/o Streams prepared
15:19:13.159 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - Waited 21ms (interTransactionDelayMillis 35ms) before giving returning connection SerialConnection@3d76cd3a[portName=/dev/ttyACM0,port=/dev/ttyACM0] for endpoint ModbusSerialSlaveEndpoint@501d49b1[portName=/dev/ttyACM0], to ensure delay between transactions.
15:19:13.160 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - borrowing connection (got Optional[SerialConnection@3d76cd3a[portName=/dev/ttyACM0,port=/dev/ttyACM0]]) for endpoint ModbusSerialSlaveEndpoint@501d49b1[portName=/dev/ttyACM0] took 5580 ms
15:19:13.162 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Executing task BasicPollTaskImpl@3d3f7eaa[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@69880c34[slaveId=128,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@501d49b1[portName=/dev/ttyACM0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@329abbec] (oneOff=false)! Connection received in 5582 ms [operation ID 1b815eb9-58ff-4136-85f1-92488104ab99]
15:19:13.163 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 [operation ID 1b815eb9-58ff-4136-85f1-92488104ab99]
15:19:13.168 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Ensuring that enough time passes before retrying again. Sleeping if necessary [operation ID 1b815eb9-58ff-4136-85f1-92488104ab99]
15:19:13.168 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Sleep ended, slept 0 [operation ID 1b815eb9-58ff-4136-85f1-92488104ab99]
15:19:13.169 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Going execute transaction with request request (FC=READ_INPUT_REGISTERS): 00 00 00 00 00 06 80 04 00 08 00 02  [operation ID 1b815eb9-58ff-4136-85f1-92488104ab99]
15:19:13.169 [DEBUG] [et.wimpi.modbus.io.ModbusRTUTransport] - Sent: 80 04 00 08 00 02 ee 18 
15:19:13.183 [TRACE] [et.wimpi.modbus.io.ModbusRTUTransport] - Managed to read at least one byte
15:19:13.187 [DEBUG] [et.wimpi.modbus.io.ModbusRTUTransport] - Response: 80 04 00 02 00 
15:19:13.188 [ERROR] [et.wimpi.modbus.io.ModbusRTUTransport] - Last request: 80 04 00 08 00 02 ee 18
15:19:13.188 [ERROR] [et.wimpi.modbus.io.ModbusRTUTransport] - failed to read: CRC Error in received frame: 3 bytes: 80 04 00 
15:19:13.189 [ERROR] [mpi.modbus.io.ModbusSerialTransaction] - execute try 1/1 error: I/O exception: IOException CRC Error in received frame: 3 bytes: 80 04 00 . Request: net.wimpi.modbus.msg.ReadInputRegistersRequest@3fe0ed76 (unit id 128 & transaction 7399). Serial parameters: SerialParameters@61fc8efc[portName=/dev/ttyACM0,baudRate=9600,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
15:19:13.189 [ERROR] [mpi.modbus.io.ModbusSerialTransaction] - execute reached max tries 1, throwing last error: I/O exception: IOException CRC Error in received frame: 3 bytes: 80 04 00 . Request: net.wimpi.modbus.msg.ReadInputRegistersRequest@3fe0ed76 (unit id 128 & transaction 7399). Serial parameters: SerialParameters@61fc8efc[portName=/dev/ttyACM0,baudRate=9600,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
15:19:13.190 [WARN ] [ort.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@69880c34[slaveId=128,functionCode=READ_INPUT_REGISTERS,start=8,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: 3 bytes: 80 04 00  [operation ID 1b815eb9-58ff-4136-85f1-92488104ab99]
15:19:13.190 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - destroyObject for connection SerialConnection@3d76cd3a[portName=/dev/ttyACM0,port=/dev/ttyACM0] and endpoint ModbusSerialSlaveEndpoint@501d49b1[portName=/dev/ttyACM0] -> closing the connection
15:19:13.224 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - Created connection SerialConnection@3d75375e[portName=/dev/ttyACM0,port=<null>] for endpoint ModbusSerialSlaveEndpoint@501d49b1[portName=/dev/ttyACM0]
15:19:13.225 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - Passivating connection SerialConnection@3d75375e[portName=/dev/ttyACM0,port=<null>] for endpoint ModbusSerialSlaveEndpoint@501d49b1[portName=/dev/ttyACM0]...
15:19:13.226 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - (passivate) Connection SerialConnection@3d75375e[portName=/dev/ttyACM0,port=<null>] (endpoint ModbusSerialSlaveEndpoint@501d49b1[portName=/dev/ttyACM0]) age (1554112153226ms) is below the reconnectAfterMillis (-1ms) limit and connection time (0) is after the "disconnectBeforeConnectedMillis"=-1. Keep the connection open.
15:19:13.226 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - ...Passivated connection SerialConnection@3d75375e[portName=/dev/ttyACM0,port=<null>] for endpoint ModbusSerialSlaveEndpoint@501d49b1[portName=/dev/ttyACM0]
15:19:13.226 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - invalidating connection for endpoint ModbusSerialSlaveEndpoint@501d49b1[portName=/dev/ttyACM0] took 36 ms
15:19:13.227 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Executing task BasicPollTaskImpl@3d3f7eaa[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@69880c34[slaveId=128,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@501d49b1[portName=/dev/ttyACM0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@329abbec] (oneOff=false)! Waiting for connection. Idle connections for this endpoint: 0, and active 1 [operation ID 1b815eb9-58ff-4136-85f1-92488104ab99]
15:19:14.137 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - Waited 910ms (interConnectDelayMillis 1000ms, interTransactionDelayMillis 35ms) before connecting disconnected connection SerialConnection@3d75375e[portName=/dev/ttyACM0,port=<null>] for endpoint ModbusSerialSlaveEndpoint@17072183[portName=/dev/ttyACM0], to allow delay between connections re-connects
15:19:14.138 [TRACE] [net.wimpi.modbus.net.SerialConnection] - Got Port Identifier
15:19:14.145 [TRACE] [net.wimpi.modbus.net.SerialConnection] - Got Serial Port
15:19:14.146 [TRACE] [net.wimpi.modbus.net.SerialConnection] - i/o Streams prepared
15:19:14.146 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - Waited 0ms (interTransactionDelayMillis 35ms) before giving returning connection SerialConnection@3d75375e[portName=/dev/ttyACM0,port=/dev/ttyACM0] for endpoint ModbusSerialSlaveEndpoint@17072183[portName=/dev/ttyACM0], to ensure delay between transactions.
15:19:14.147 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - borrowing connection (got Optional[SerialConnection@3d75375e[portName=/dev/ttyACM0,port=/dev/ttyACM0]]) for endpoint ModbusSerialSlaveEndpoint@17072183[portName=/dev/ttyACM0] took 5590 ms
15:19:14.148 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Executing task BasicPollTaskImpl@6f9a43ba[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@c19d0d4[slaveId=64,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@17072183[portName=/dev/ttyACM0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@329aace8] (oneOff=false)! Connection received in 5591 ms [operation ID 452bab5e-5eff-49aa-872e-7add789af404]
15:19:14.148 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Try 3 out of 3 [operation ID 452bab5e-5eff-49aa-872e-7add789af404]
15:19:14.148 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Ensuring that enough time passes before retrying again. Sleeping if necessary [operation ID 452bab5e-5eff-49aa-872e-7add789af404]
15:19:14.149 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Sleep ended, slept 0 [operation ID 452bab5e-5eff-49aa-872e-7add789af404]
15:19:14.153 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Going execute transaction with request request (FC=READ_INPUT_REGISTERS): 00 00 00 00 00 06 40 04 00 08 00 02  [operation ID 452bab5e-5eff-49aa-872e-7add789af404]
15:19:14.154 [DEBUG] [et.wimpi.modbus.io.ModbusRTUTransport] - Sent: 40 04 00 08 00 02 ff 18 
15:19:14.173 [TRACE] [et.wimpi.modbus.io.ModbusRTUTransport] - Managed to read at least one byte
15:19:14.178 [DEBUG] [et.wimpi.modbus.io.ModbusRTUTransport] - Response: 40 04 00 02 00 
15:19:14.180 [ERROR] [et.wimpi.modbus.io.ModbusRTUTransport] - Last request: 40 04 00 08 00 02 ff 18
15:19:14.182 [ERROR] [et.wimpi.modbus.io.ModbusRTUTransport] - failed to read: CRC Error in received frame: 3 bytes: 40 04 00 
15:19:14.184 [ERROR] [mpi.modbus.io.ModbusSerialTransaction] - execute try 1/1 error: I/O exception: IOException CRC Error in received frame: 3 bytes: 40 04 00 . Request: net.wimpi.modbus.msg.ReadInputRegistersRequest@cdc247e (unit id 64 & transaction 7400). Serial parameters: SerialParameters@22ec164a[portName=/dev/ttyACM0,baudRate=9600,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
15:19:14.185 [ERROR] [mpi.modbus.io.ModbusSerialTransaction] - execute reached max tries 1, throwing last error: I/O exception: IOException CRC Error in received frame: 3 bytes: 40 04 00 . Request: net.wimpi.modbus.msg.ReadInputRegistersRequest@cdc247e (unit id 64 & transaction 7400). Serial parameters: SerialParameters@22ec164a[portName=/dev/ttyACM0,baudRate=9600,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
15:19:14.185 [ERROR] [ort.modbus.internal.ModbusManagerImpl] - Last try 3 failed when executing request (ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@c19d0d4[slaveId=64,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3]). Aborting. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException CRC Error in received frame: 3 bytes: 40 04 00  [operation ID 452bab5e-5eff-49aa-872e-7add789af404]
15:19:14.185 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - destroyObject for connection SerialConnection@3d75375e[portName=/dev/ttyACM0,port=/dev/ttyACM0] and endpoint ModbusSerialSlaveEndpoint@17072183[portName=/dev/ttyACM0] -> closing the connection
15:19:14.215 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - Created connection SerialConnection@18e7b414[portName=/dev/ttyACM0,port=<null>] for endpoint ModbusSerialSlaveEndpoint@17072183[portName=/dev/ttyACM0]
15:19:14.217 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - Passivating connection SerialConnection@18e7b414[portName=/dev/ttyACM0,port=<null>] for endpoint ModbusSerialSlaveEndpoint@17072183[portName=/dev/ttyACM0]...
15:19:14.218 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - (passivate) Connection SerialConnection@18e7b414[portName=/dev/ttyACM0,port=<null>] (endpoint ModbusSerialSlaveEndpoint@17072183[portName=/dev/ttyACM0]) age (1554112154218ms) is below the reconnectAfterMillis (-1ms) limit and connection time (0) is after the "disconnectBeforeConnectedMillis"=-1. Keep the connection open.
15:19:14.220 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - ...Passivated connection SerialConnection@18e7b414[portName=/dev/ttyACM0,port=<null>] for endpoint ModbusSerialSlaveEndpoint@17072183[portName=/dev/ttyACM0]
15:19:14.221 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - invalidating connection for endpoint ModbusSerialSlaveEndpoint@17072183[portName=/dev/ttyACM0] took 36 ms
15:19:14.221 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Calling write response callback org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@329aace8 for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@c19d0d4[slaveId=64,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3]. Error was org.openhab.io.transport.modbus.internal.ModbusSlaveIOExceptionImpl Modbus IO Error with cause=ModbusIOException, EOF=false, message='I/O exception: IOException CRC Error in received frame: 3 bytes: 40 04 00 ', cause2=null
15:19:14.222 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Called write response callback org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@329aace8 for request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@c19d0d4[slaveId=64,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3]. Error was org.openhab.io.transport.modbus.internal.ModbusSlaveIOExceptionImpl Modbus IO Error with cause=ModbusIOException, EOF=false, message='I/O exception: IOException CRC Error in received frame: 3 bytes: 40 04 00 ', cause2=null
15:19:14.222 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - returning connection for endpoint ModbusSerialSlaveEndpoint@17072183[portName=/dev/ttyACM0] took 0 ms
15:19:14.222 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Connection was returned to the pool, ending operation [operation ID 452bab5e-5eff-49aa-872e-7add789af404]
15:19:14.223 [DEBUG] [ort.modbus.internal.ModbusManagerImpl] - Modbus operation ended, timing info: {total: 16929 ms, connection: 16844, transaction=74, callback=1} [operation ID 452bab5e-5eff-49aa-872e-7add789af404]
15:19:14.223 [DEBUG] [ort.modbus.internal.ModbusManagerImpl] - Execution of scheduled (1000ms) poll task BasicPollTaskImpl@6f9a43ba[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@c19d0d4[slaveId=64,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@17072183[portName=/dev/ttyACM0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@329aace8] finished at 1554112154223. Was started at millis: 1554112137294 (=duration of 16929 millis)
15:19:14.223 [DEBUG] [ort.modbus.internal.ModbusManagerImpl] - Executing scheduled (1000ms) poll task BasicPollTaskImpl@7b24be69[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@399ec2a9[slaveId=1,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@38c4b77[portName=/dev/ttyACM0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@329a9e03]. Current millis: 1554112154223
15:19:14.223 [INFO ] [smarthome.event.ThingStatusInfoEvent ] - 'modbus:data:slave0x40:smokeDetector:smokeDetector02' updated: OFFLINE (COMMUNICATION_ERROR): Error (ModbusSlaveIOExceptionImpl) with read. Request: ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@c19d0d4[slaveId=64,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3]. Description: ModbusSlaveIOException(cause=ModbusIOException, EOF=false, message='I/O exception: IOException CRC Error in received frame: 3 bytes: 40 04 00 ', cause2=null). Message: Modbus IO Error with cause=ModbusIOException, EOF=false, message='I/O exception: IOException CRC Error in received frame: 3 bytes: 40 04 00 ', cause2=null
15:19:14.224 [TRACE] [nternal.ModbusManagerImpl.PollMonitor] - <POLL MONITOR>
15:19:14.224 [INFO ] [smarthome.event.ThingStatusInfoEvent ] - 'modbus:poller:slave0x40:smokeDetector' updated: OFFLINE (COMMUNICATION_ERROR): Error with read: org.openhab.io.transport.modbus.internal.ModbusSlaveIOExceptionImpl: Modbus IO Error with cause=ModbusIOException, EOF=false, message='I/O exception: IOException CRC Error in received frame: 3 bytes: 40 04 00 ', cause2=null
15:19:14.224 [TRACE] [nternal.ModbusManagerImpl.PollMonitor] - POLL MONITOR: scheduled poll task. FC: READ_INPUT_REGISTERS, start 8, length 2, done: false, canceled: false, delay: -14933. Full task BasicPollTaskImpl@5d411317[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@607b1c96[slaveId=32,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@22a6ff3d[portName=/dev/ttyACM0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@329aa566]
15:19:14.226 [TRACE] [nternal.ModbusManagerImpl.PollMonitor] - POLL MONITOR: scheduled poll task. FC: READ_INPUT_REGISTERS, start 8, length 2, done: false, canceled: false, delay: 997. Full task BasicPollTaskImpl@6f9a43ba[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@c19d0d4[slaveId=64,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@17072183[portName=/dev/ttyACM0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@329aace8]
15:19:14.227 [TRACE] [nternal.ModbusManagerImpl.PollMonitor] - POLL MONITOR: scheduled poll task. FC: READ_MULTIPLE_REGISTERS, start 172, length 2, done: false, canceled: false, delay: -12388. Full task BasicPollTaskImpl@405e49bd[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@65e2d032[slaveId=16,functionCode=READ_MULTIPLE_REGISTERS,start=172,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@27d60e81[portName=/dev/ttyACM0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@49307ecd]
15:19:14.227 [TRACE] [nternal.ModbusManagerImpl.PollMonitor] - POLL MONITOR: scheduled poll task. FC: READ_INPUT_REGISTERS, start 8, length 2, done: false, canceled: false, delay: -16633. Full task BasicPollTaskImpl@3a515949[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@3e6ecadb[slaveId=4,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@7b6c5372[portName=/dev/ttyACM0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@818e012]
15:19:14.227 [TRACE] [nternal.ModbusManagerImpl.PollMonitor] - POLL MONITOR: scheduled poll task. FC: READ_INPUT_REGISTERS, start 8, length 2, done: false, canceled: false, delay: -12293. Full task BasicPollTaskImpl@3d3f7eaa[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@69880c34[slaveId=128,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@501d49b1[portName=/dev/ttyACM0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@329abbec]
15:19:14.228 [TRACE] [nternal.ModbusManagerImpl.PollMonitor] - POLL MONITOR: scheduled poll task. FC: READ_INPUT_REGISTERS, start 8, length 2, done: false, canceled: false, delay: -11315. Full task BasicPollTaskImpl@7b24be69[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@399ec2a9[slaveId=1,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@38c4b77[portName=/dev/ttyACM0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@329a9e03]
15:19:14.228 [TRACE] [nternal.ModbusManagerImpl.PollMonitor] - POLL MONITOR: scheduledThreadPoolExecutor queue size: 2, remaining space 2147483647. Active threads 5
15:19:14.228 [TRACE] [nternal.ModbusManagerImpl.PollMonitor] - </POLL MONITOR>
15:19:14.228 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Starting new operation with task BasicPollTaskImpl@7b24be69[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@399ec2a9[slaveId=1,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@38c4b77[portName=/dev/ttyACM0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@329a9e03]. Trying to get connection [operation ID 91d4a4d1-395c-4fdf-a562-0dda8554227c]
15:19:14.228 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Executing task BasicPollTaskImpl@7b24be69[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@399ec2a9[slaveId=1,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@38c4b77[portName=/dev/ttyACM0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@329a9e03] (oneOff=false)! Waiting for connection. Idle connections for this endpoint: 0, and active 1 [operation ID 91d4a4d1-395c-4fdf-a562-0dda8554227c]
15:19:15.146 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - Waited 925ms (interConnectDelayMillis 1000ms, interTransactionDelayMillis 35ms) before connecting disconnected connection SerialConnection@18e7b414[portName=/dev/ttyACM0,port=<null>] for endpoint ModbusSerialSlaveEndpoint@7b6c5372[portName=/dev/ttyACM0], to allow delay between connections re-connects
15:19:15.147 [TRACE] [net.wimpi.modbus.net.SerialConnection] - Got Port Identifier
15:19:15.155 [TRACE] [net.wimpi.modbus.net.SerialConnection] - Got Serial Port
15:19:15.156 [TRACE] [net.wimpi.modbus.net.SerialConnection] - i/o Streams prepared
15:19:15.156 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - Waited 0ms (interTransactionDelayMillis 35ms) before giving returning connection SerialConnection@18e7b414[portName=/dev/ttyACM0,port=/dev/ttyACM0] for endpoint ModbusSerialSlaveEndpoint@7b6c5372[portName=/dev/ttyACM0], to ensure delay between transactions.
15:19:15.157 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - borrowing connection (got Optional[SerialConnection@18e7b414[portName=/dev/ttyACM0,port=/dev/ttyACM0]]) for endpoint ModbusSerialSlaveEndpoint@7b6c5372[portName=/dev/ttyACM0] took 5595 ms
15:19:15.157 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Executing task BasicPollTaskImpl@3a515949[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@3e6ecadb[slaveId=4,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3],endpoint=ModbusSerialSlaveEndpoint@7b6c5372[portName=/dev/ttyACM0],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@818e012] (oneOff=false)! Connection received in 5595 ms [operation ID 71bd894e-f23c-47c1-a2ea-da1dcfb9ca5b]
15:19:15.158 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Try 3 out of 3 [operation ID 71bd894e-f23c-47c1-a2ea-da1dcfb9ca5b]
15:19:15.158 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Ensuring that enough time passes before retrying again. Sleeping if necessary [operation ID 71bd894e-f23c-47c1-a2ea-da1dcfb9ca5b]
15:19:15.159 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Sleep ended, slept 0 [operation ID 71bd894e-f23c-47c1-a2ea-da1dcfb9ca5b]
15:19:15.161 [TRACE] [ort.modbus.internal.ModbusManagerImpl] - Going execute transaction with request request (FC=READ_INPUT_REGISTERS): 00 00 00 00 00 06 04 04 00 08 00 02  [operation ID 71bd894e-f23c-47c1-a2ea-da1dcfb9ca5b]
15:19:15.162 [DEBUG] [et.wimpi.modbus.io.ModbusRTUTransport] - Sent: 04 04 00 08 00 02 f0 5c 
15:19:15.173 [TRACE] [et.wimpi.modbus.io.ModbusRTUTransport] - Managed to read at least one byte
15:19:15.177 [DEBUG] [et.wimpi.modbus.io.ModbusRTUTransport] - Response: 04 04 00 01 00 
15:19:15.178 [ERROR] [et.wimpi.modbus.io.ModbusRTUTransport] - Last request: 04 04 00 08 00 02 f0 5c
15:19:15.178 [ERROR] [et.wimpi.modbus.io.ModbusRTUTransport] - failed to read: CRC Error in received frame: 3 bytes: 04 04 00 
15:19:15.179 [ERROR] [mpi.modbus.io.ModbusSerialTransaction] - execute try 1/1 error: I/O exception: IOException CRC Error in received frame: 3 bytes: 04 04 00 . Request: net.wimpi.modbus.msg.ReadInputRegistersRequest@2164008b (unit id 4 & transaction 7401). Serial parameters: SerialParameters@29f6f91c[portName=/dev/ttyACM0,baudRate=9600,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
15:19:15.179 [ERROR] [mpi.modbus.io.ModbusSerialTransaction] - execute reached max tries 1, throwing last error: I/O exception: IOException CRC Error in received frame: 3 bytes: 04 04 00 . Request: net.wimpi.modbus.msg.ReadInputRegistersRequest@2164008b (unit id 4 & transaction 7401). Serial parameters: SerialParameters@29f6f91c[portName=/dev/ttyACM0,baudRate=9600,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=1500]
15:19:15.180 [ERROR] [ort.modbus.internal.ModbusManagerImpl] - Last try 3 failed when executing request (ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@3e6ecadb[slaveId=4,functionCode=READ_INPUT_REGISTERS,start=8,length=2,maxTries=3]). Aborting. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException CRC Error in received frame: 3 bytes: 04 04 00  [operation ID 71bd894e-f23c-47c1-a2ea-da1dcfb9ca5b]
15:19:15.180 [TRACE] [ling.ModbusSlaveConnectionFactoryImpl] - destroyObject for connection SerialConnection@18e7b414[portName=/dev/ttyACM0,port=/dev/ttyACM0] and endpoint ModbusSerialSlaveEndpoint@7b6c5372[portName=/dev/ttyACM0] -> closing the connection



Please help me to solve the issue