OH3 delay between received and changed 3s

Hello,
i have openHAB 3.0.1 and no rules, new instalation on new raspbian on rpi3b+ and i have big delay between received and changed:

2021-02-12 20:37:14.005 [INFO ] [openhab.event.ItemCommandEvent ] - Item ‘HollParter’ received command 100

2021-02-12 20:37:17.542 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘HollParter’ changed from 0 to 100

i do not know why, anyone have the same problem ?

What IS Hollparter? is it virtual? A binding?

How many bindings, things, items do you have?

Hollparter is the Switch, item file:

Number HollParter “Holl Parter” (OswietlenieParter) {channel=“modbus:data:Kuchnia:holdingID18:HollP:number”, autoupdate=“false”}

bindings:

  • modbus
  • astro
  • ntp
  • map
  • jdb persi

things: 18 nodes modnus tcp
items: 82

Currious if your box has any hung or long running threads

Do you see any threads in a blocked or waiting state?

run on the pi, PW will be what you set or habopen

ssh -p 8101 openhab@localhost shell:threads --list | grep -i blocked

ssh -p 8101 openhab@localhost shell:threads --list | grep -i waiting

How often are you polling your modbus?
Having autoupdate off is generally a good idea for writable modbus things - if you have a fast poll rate. Otherwise, having autoupdate in action is what it is for, speeding up apparent response.

1 Like

300ms, very fast, working without errors, with this poll rate delay should not be

pi@RPI-OpenHab:/etc/openhab/items $ ssh -p 8101 openhab@127.0.0.1 shell:threads --list | grep -i blocked
Password authentication
Password:
pi@RPI-OpenHab:/etc/openhab/items $

pi@RPI-OpenHab:/etc/openhab/items $ ssh -p 8101 openhab@localhost shell:threads --list | grep -i waiting
1 │ main │ WAITING │ 3475 │ 3330
3 │ Finalizer │ WAITING │ 677 │ 610
7 │ Common-Cleaner │ TIMED_WAITING │ 416 │ 350
10 │ Active Thread: Equinox Container: a9516637-2df0-400f-af1f-4aa65cb7ec7d │ TIMED_WAITING │ 8247 │ 7010
12 │ Framework Event Dispatcher: org.eclipse.osgi.internal.framework.EquinoxEventPublisher@1925502 │ WAITING │ 94 │ 70
13 │ Bundle File Closer │ WAITING │ 231 │ 150
14 │ Start Level: Equinox Container: a9516637-2df0-400f-af1f-4aa65cb7ec7d │ WAITING │ 41813 │ 40970
15 │ Karaf Lock Monitor Thread │ TIMED_WAITING │ 10730 │ 5800
27 │ Coordination Timer │ WAITING │ 0 │ 0
28 │ CM Configuration Updater │ WAITING │ 2045 │ 1930
29 │ CM Event Dispatcher │ WAITING │ 0 │ 0
30 │ fileinstall-/var/lib/openhab/etc │ TIMED_WAITING │ 18059 │ 16800
35 │ Log4j2-TF-5-Scheduled-1 │ TIMED_WAITING │ 1687 │ 1210
37 │ EventAdminAsyncThread #11 │ WAITING │ 261764 │ 203930
38 │ EventAdminAsyncThread #12 │ WAITING │ 261937 │ 204100
40 │ fileinstall-/usr/share/openhab/addons │ TIMED_WAITING │ 7739 │ 6250
42 │ encryption-1-thread-1 │ TIMED_WAITING │ 5385 │ 4100
44 │ SCR Component Actor │ WAITING │ 0 │ 0
50 │ sshd-SshServer[1eb6419]-timer-thread-1 │ TIMED_WAITING │ 5756 │ 5750
57 │ EMF Reference Cleaner │ WAITING │ 1068 │ 550
59 │ ForkJoinPool.commonPool-worker-3 │ WAITING │ 134 │ 130
60 │ OH-OSGiEventManager │ TIMED_WAITING │ 985468 │ 857240
62 │ OH-startlevel-1 │ TIMED_WAITING │ 6457 │ 6150
73 │ Dir Watcher │ WAITING │ 118 │ 100
75 │ ServletEventDispatcher: 1 │ WAITING │ 13 │ 10
76 │ ServletEventDispatcher: 2 │ WAITING │ 9 │ 0
77 │ ServletEventDispatcher: 3 │ WAITING │ 2 │ 0
80 │ Session-HouseKeeper-1919428 │ TIMED_WAITING │ 82 │ 70
87 │ Connector-Scheduler-94a3a6 │ TIMED_WAITING │ 318 │ 290
96 │ OH-karaf-addons-1 │ TIMED_WAITING │ 865 │ 840
98 │ com.google.inject.internal.util.$Finalizer │ WAITING │ 0 │ 0
101 │ JmDNS(192-168-2-10.local.).Timer │ TIMED_WAITING │ 4021 │ 3770
102 │ JmDNS(192-168-2-10.local.).State.Timer │ TIMED_WAITING │ 206 │ 160
103 │ OH-eventexecutor-1 │ WAITING │ 764028 │ 618760
104 │ OH-eventwatcher-1 │ TIMED_WAITING │ 358231 │ 279400
105 │ pool-5-thread-1 │ WAITING │ 171416 │ 122500
106 │ pool-10-thread-1 │ WAITING │ 2 │ 0
107 │ Timer-1 │ WAITING │ 0 │ 0
109 │ Timer-2 │ WAITING │ 0 │ 0
110 │ Timer-3 │ WAITING │ 19 │ 10
111 │ Timer-4 │ WAITING │ 0 │ 0
112 │ Timer-5 │ WAITING │ 0 │ 0
113 │ Timer-6 │ WAITING │ 0 │ 0
116 │ Timer-8 │ WAITING │ 0 │ 0
117 │ Timer-9 │ WAITING │ 0 │ 0
118 │ Timer-10 │ WAITING │ 9 │ 0
122 │ OH-scriptwatcher-1 │ TIMED_WAITING │ 595 │ 490
124 │ OH-rulesRefresher-1 │ WAITING │ 2001 │ 1960
125 │ Timer-11 │ WAITING │ 0 │ 0
128 │ ServletModel-17-128 │ TIMED_WAITING │ 106 │ 40
129 │ ServletModel-17-129 │ TIMED_WAITING │ 106 │ 60
130 │ ServletModel-17-130 │ TIMED_WAITING │ 108 │ 90
131 │ ServletModel-17-131 │ TIMED_WAITING │ 118 │ 80
132 │ ServletModel-17-132 │ TIMED_WAITING │ 100 │ 80
133 │ ServletModel-17-133 │ TIMED_WAITING │ 110 │ 50
134 │ RRD4J Sync-ThreadPool for org.rrd4j.core.RrdSyncThreadPool@989cf2 [Thread-1] │ TIMED_WAITING │ 1367 │ 880
138 │ RRD4J Sync-ThreadPool for org.rrd4j.core.RrdSyncThreadPool@989cf2 [Thread-2] │ WAITING │ 1899 │ 1190
139 │ RRD4J Sync-ThreadPool for org.rrd4j.core.RrdSyncThreadPool@989cf2 [Thread-3] │ WAITING │ 1661 │ 1050
140 │ RRD4J Sync-ThreadPool for org.rrd4j.core.RrdSyncThreadPool@989cf2 [Thread-4] │ WAITING │ 1635 │ 970
141 │ RRD4J Sync-ThreadPool for org.rrd4j.core.RrdSyncThreadPool@989cf2 [Thread-5] │ WAITING │ 1512 │ 970
142 │ RRD4J Sync-ThreadPool for org.rrd4j.core.RrdSyncThreadPool@989cf2 [Thread-6] │ WAITING │ 1593 │ 950
153 │ OH-ruleengine-1 │ WAITING │ 5 │ 0
157 │ OH-usb-serial-discovery-linux-sysfs-1 │ TIMED_WAITING │ 68826 │ 41770
158 │ commons-pool-evictor-thread │ TIMED_WAITING │ 1964 │ 1860
159 │ OH-modbusManagerPollerThreadPool-1 │ WAITING │ 709703 │ 571680
160 │ OH-modbusManagerPollerThreadPool-2 │ WAITING │ 704817 │ 569660
171 │ OH-RRD4j-1 │ WAITING │ 52 │ 40
172 │ OH-RRD4j-2 │ WAITING │ 54 │ 10
173 │ OH-RRD4j-3 │ WAITING │ 49 │ 30
178 │ OH-modbusManagerPollerThreadPool-3 │ WAITING │ 705576 │ 567170
180 │ OH-modbusManagerPollerThreadPool-5 │ WAITING │ 704322 │ 567480
181 │ Abandoned connection cleanup thread │ TIMED_WAITING │ 4471 │ 4270
182 │ yank-default housekeeper │ TIMED_WAITING │ 564 │ 470
4473 │ Timer-12 │ WAITING │ 0 │ 0
4474 │ Timer-13 │ WAITING │ 0 │ 0
5968 │ sshd-SshServer[1eb6419]-nio2-thread-1 │ WAITING │ 3230 │ 3160
5970 │ Thread-78 │ TIMED_WAITING │ 3 │ 0
5974 │ sshd-SshServer[1eb6419]-nio2-thread-2 │ WAITING │ 915 │ 870
6185 │ pool-1-thread-1 │ WAITING │ 6 │ 0
9601 │ qtp27001308-9601 │ TIMED_WAITING │ 1178 │ 1060
9673 │ OH-rule-alarm-4-1 │ WAITING │ 1664 │ 1620
9698 │ OH-rule-temp-3-1 │ WAITING │ 1177 │ 1170
9710 │ OH-rule-temp-2-1 │ WAITING │ 75 │ 70
9728 │ OH-rule-alarm-3-1 │ WAITING │ 405 │ 360
9806 │ OH-rule-temp-4-1 │ WAITING │ 72 │ 70
9823 │ OH-rule-temp-7-1 │ WAITING │ 60 │ 60
9827 │ OH-rule-temp-1-1 │ WAITING │ 87 │ 80
9846 │ OH-rule-temp-8-1 │ WAITING │ 45 │ 40
9902 │ OH-rule-temp-9-1 │ WAITING │ 175 │ 160
9980 │ OH-rule-alarm-5-1 │ WAITING │ 13 │ 10
10187 │ OH-rule-temp-6-1 │ WAITING │ 44 │ 40
10388 │ qtp27001308-10388 │ TIMED_WAITING │ 1190 │ 1090
10499 │ OH-rule-temp-5-1 │ WAITING │ 84 │ 80
10696 │ items-1646 │ TIMED_WAITING │ 7858 │ 6230
10955 │ OH-scheduler-1495 │ TIMED_WAITING │ 17633 │ 12060
11350 │ items-1740 │ TIMED_WAITING │ 5549 │ 4510
11353 │ items-1741 │ TIMED_WAITING │ 6089 │ 5020
11565 │ qtp27001308-11565 │ TIMED_WAITING │ 788 │ 740
11646 │ qtp27001308-11646 │ TIMED_WAITING │ 1035 │ 1010
11647 │ qtp27001308-11647 │ TIMED_WAITING │ 3624 │ 3560
11655 │ qtp27001308-11655 │ TIMED_WAITING │ 743 │ 720
12126 │ OH-rule-Group_Os_Parter-2-1 │ WAITING │ 951 │ 910
12127 │ OH-rule-Group_Os_Parter-1-1 │ WAITING │ 61 │ 60
12130 │ OH-rule-Group_Os_Parter-3-1 │ WAITING │ 24 │ 20
12145 │ qtp27001308-12145 │ TIMED_WAITING │ 15 │ 10
12209 │ items-1871 │ TIMED_WAITING │ 736 │ 540
12210 │ items-1872 │ TIMED_WAITING │ 361 │ 270
12243 │ OH-thingHandler-1832 │ TIMED_WAITING │ 12 │ 10
12269 │ OH-discovery-3459 │ TIMED_WAITING │ 3 │ 0
12276 │ OH-common-2810 │ TIMED_WAITING │ 11 │ 10
12303 │ OH-discovery-3463 │ TIMED_WAITING │ 2 │ 0
12305 │ OH-common-2813 │ TIMED_WAITING │ 5 │ 0
12325 │ OH-scheduler-1673 │ TIMED_WAITING │ 0 │ 0
12326 │ OH-thingHandler-1841 │ TIMED_WAITING │ 0 │ 0
12327 │ OH-discovery-3466 │ TIMED_WAITING │ 0 │ 0
12328 │ OH-common-2816 │ TIMED_WAITING │ 3 │ 0
12329 │ OH-discovery-3467 │ TIMED_WAITING │ 0 │ 0
12330 │ OH-common-2817 │ TIMED_WAITING │ 0 │ 0
12331 │ OH-common-2818 │ TIMED_WAITING │ 0 │ 0
12332 │ OH-discovery-3468 │ TIMED_WAITING │ 0 │ 0
12334 │ OH-scheduler-1674 │ TIMED_WAITING │ 0 │ 0
12335 │ OH-thingHandler-1842 │ TIMED_WAITING │ 0 │ 0
12336 │ Thread-117 │ WAITING │ 255 │ 250
12337 │ job controller 1 │ WAITING │ 4 │ 0
12339 │ pool-18-thread-3 │ TIMED_WAITING │ 1 │ 0
12340 │ pool-18-thread-4 │ TIMED_WAITING │ 1 │ 0

Okay, put DEBUG logging on the Modbus bindng, and let’s see where the time is spent.

part of DEBUG on the Modbus Binding:

2021-02-15 21:35:46.551 [DEBUG] [bus.handler.ModbusPollerThingHandler] - Thing modbus:poller:Alarm:tempID10 received response PollResult(result=AsyncModbusReadResult(request = ModbusReadRequestBlueprint@24797e[slaveId=10,functionCode=READ_MULTIPLE_REGISTERS,start=8,length=1,maxTries=3], registers = ModbusRegisterArray(00C7)))
2021-02-15 21:35:46.553 [DEBUG] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:Alarm:tempID10:Temp channels updated: {modbus:data:Alarm:tempID10:Temp:number=199}. readValueType=uint16, readIndex=Optional[8], readSubIndex(or 0)=0, extractIndex=0 -> numeric value 199 and boolValue=true. Registers ModbusRegisterArray(00C7) for request ModbusReadRequestBlueprint@24797e[slaveId=10,functionCode=READ_MULTIPLE_REGISTERS,start=8,length=1,maxTries=3]
2021-02-15 21:35:46.644 [DEBUG] [bus.handler.ModbusPollerThingHandler] - Thing modbus:poller:Spa:templuxID6 received response PollResult(result=AsyncModbusReadResult(request = ModbusReadRequestBlueprint@9c66f1[slaveId=6,functionCode=READ_MULTIPLE_REGISTERS,start=4,length=2,maxTries=3], registers = ModbusRegisterArray(000000D3)))
2021-02-15 21:35:46.646 [DEBUG] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:Spa:templuxID6:LUX channels updated: {modbus:data:Spa:templuxID6:LUX:number=0}. readValueType=uint16, readIndex=Optional[4], readSubIndex(or 0)=0, extractIndex=0 -> numeric value 0 and boolValue=false. Registers ModbusRegisterArray(000000D3) for request ModbusReadRequestBlueprint@9c66f1[slaveId=6,functionCode=READ_MULTIPLE_REGISTERS,start=4,length=2,maxTries=3]
2021-02-15 21:35:46.649 [DEBUG] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:Spa:templuxID6:Temp channels updated: {modbus:data:Spa:templuxID6:Temp:number=211}. readValueType=uint16, readIndex=Optional[5], readSubIndex(or 0)=0, extractIndex=1 -> numeric value 211 and boolValue=true. Registers ModbusRegisterArray(000000D3) for request ModbusReadRequestBlueprint@9c66f1[slaveId=6,functionCode=READ_MULTIPLE_REGISTERS,start=4,length=2,maxTries=3]
2021-02-15 21:35:46.738 [DEBUG] [bus.handler.ModbusPollerThingHandler] - Thing modbus:poller:Jadalnia:holdingID19 received response PollResult(result=AsyncModbusReadResult(request = ModbusReadRequestBlueprint@2f62e3[slaveId=19,functionCode=READ_MULTIPLE_REGISTERS,start=0,length=2,maxTries=3], registers = ModbusRegisterArray(00000064)))
2021-02-15 21:35:46.740 [DEBUG] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:Jadalnia:holdingID19:Glowne1 channels updated: {modbus:data:Jadalnia:holdingID19:Glowne1:number=0}. readValueType=uint16, readIndex=Optional[0], readSubIndex(or 0)=0, extractIndex=0 -> numeric value 0 and boolValue=false. Registers ModbusRegisterArray(00000064) for request ModbusReadRequestBlueprint@2f62e3[slaveId=19,functionCode=READ_MULTIPLE_REGISTERS,start=0,length=2,maxTries=3]
2021-02-15 21:35:46.744 [DEBUG] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:Jadalnia:holdingID19:Glowne2 channels updated: {modbus:data:Jadalnia:holdingID19:Glowne2:number=100}. readValueType=uint16, readIndex=Optional[1], readSubIndex(or 0)=0, extractIndex=1 -> numeric value 100 and boolValue=true. Registers ModbusRegisterArray(00000064) for request ModbusReadRequestBlueprint@2f62e3[slaveId=19,functionCode=READ_MULTIPLE_REGISTERS,start=0,length=2,maxTries=3]
2021-02-15 21:35:46.835 [DEBUG] [bus.handler.ModbusPollerThingHandler] - Thing modbus:poller:HollGora:templuxID8 received response PollResult(result=AsyncModbusReadResult(request = ModbusReadRequestBlueprint@1b037a[slaveId=8,functionCode=READ_MULTIPLE_REGISTERS,start=4,length=2,maxTries=3], registers = ModbusRegisterArray(000300D3)))
2021-02-15 21:35:46.838 [DEBUG] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:HollGora:templuxID8:LUX channels updated: {modbus:data:HollGora:templuxID8:LUX:number=3}. readValueType=uint16, readIndex=Optional[4], readSubIndex(or 0)=0, extractIndex=0 -> numeric value 3 and boolValue=true. Registers ModbusRegisterArray(000300D3) for request ModbusReadRequestBlueprint@1b037a[slaveId=8,functionCode=READ_MULTIPLE_REGISTERS,start=4,length=2,maxTries=3]
2021-02-15 21:35:46.840 [DEBUG] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:HollGora:templuxID8:Temp channels updated: {modbus:data:HollGora:templuxID8:Temp:number=211}. readValueType=uint16, readIndex=Optional[5], readSubIndex(or 0)=0, extractIndex=1 -> numeric value 211 and boolValue=true. Registers ModbusRegisterArray(000300D3) for request ModbusReadRequestBlueprint@1b037a[slaveId=8,functionCode=READ_MULTIPLE_REGISTERS,start=4,length=2,maxTries=3]
2021-02-15 21:35:46.935 [DEBUG] [bus.handler.ModbusPollerThingHandler] - Thing modbus:poller:Salon2:holdingID17 received response PollResult(result=AsyncModbusReadResult(request = ModbusReadRequestBlueprint@16df460[slaveId=17,functionCode=READ_MULTIPLE_REGISTERS,start=0,length=4,maxTries=3], registers = ModbusRegisterArray(0000000000000000)))
2021-02-15 21:35:46.937 [DEBUG] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:Salon2:holdingID17:Punkt1 channels updated: {modbus:data:Salon2:holdingID17:Punkt1:number=0}. readValueType=uint16, readIndex=Optional[0], readSubIndex(or 0)=0, extractIndex=0 -> numeric value 0 and boolValue=false. Registers ModbusRegisterArray(0000000000000000) for request ModbusReadRequestBlueprint@16df460[slaveId=17,functionCode=READ_MULTIPLE_REGISTERS,start=0,length=4,maxTries=3]
2021-02-15 21:35:46.941 [DEBUG] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:Salon2:holdingID17:Punkt2 channels updated: {modbus:data:Salon2:holdingID17:Punkt2:number=0}. readValueType=uint16, readIndex=Optional[1], readSubIndex(or 0)=0, extractIndex=1 -> numeric value 0 and boolValue=false. Registers ModbusRegisterArray(0000000000000000) for request ModbusReadRequestBlueprint@16df460[slaveId=17,functionCode=READ_MULTIPLE_REGISTERS,start=0,length=4,maxTries=3]
2021-02-15 21:35:46.944 [DEBUG] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:Salon2:holdingID17:KinkL channels updated: {modbus:data:Salon2:holdingID17:KinkL:number=0}. readValueType=uint16, readIndex=Optional[2], readSubIndex(or 0)=0, extractIndex=2 -> numeric value 0 and boolValue=false. Registers ModbusRegisterArray(0000000000000000) for request ModbusReadRequestBlueprint@16df460[slaveId=17,functionCode=READ_MULTIPLE_REGISTERS,start=0,length=4,maxTries=3]
2021-02-15 21:35:46.946 [DEBUG] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:Salon2:holdingID17:KinkP channels updated: {modbus:data:Salon2:holdingID17:KinkP:number=0}. readValueType=uint16, readIndex=Optional[3], readSubIndex(or 0)=0, extractIndex=3 -> numeric value 0 and boolValue=false. Registers ModbusRegisterArray(0000000000000000) for request ModbusReadRequestBlueprint@16df460[slaveId=17,functionCode=READ_MULTIPLE_REGISTERS,start=0,length=4,maxTries=3]

Unfortunately, this log does not show when the read-poll is issued, so that we can measure device response time. I would guess it is less than 100mS because of the stacked responses coming back in that timeframe.

We can look at important points to see how long it takes the binding to process the data.

This all looks good. I think we can rule out Modbus communication difficulties in general.
Except -

How many Modbus poller Things do you have running at this rate? It is possible to request polls faster than they can be performed. The binding handles this gracefully, and keeps a queue of read-polls to perform.
But - a new write request gets put on the back of any queue,so it may get delayed if you have a big queue.

Hello, sorry for late.
this is my modbus.bridge:

// ID3
Bridge modbus:tcp:Wojtek [ host=“192.168.2.9”, port=502, id=3 ]
{
Bridge poller holdingID3 [start=0, length=4, refresh=300, type=“holding” ]{
Thing data Glowne [ readStart=“0”, readValueType=“uint16”, writeType=“holding”, writeStart=“0”, writeValueType=“uint16” ]
Thing data Listwa [ readStart=“1”, readValueType=“uint16”, writeType=“holding”, writeStart=“1”, writeValueType=“uint16” ]
Thing data Went [ readStart=“2”, readValueType=“uint16”, writeType=“holding”, writeStart=“2”, writeValueType=“uint16” ]
Thing data 4 [ readStart=“3”, readValueType=“uint16”, writeType=“holding”, writeStart=“3”, writeValueType=“uint16” ]
}
Bridge poller templuxID3 [start=4, length=2, refresh=500, type=“holding” ]{
Thing data LUX [ readStart=“4”, readValueType=“uint16” ]
Thing data Temp [ readStart=“5”, readValueType=“uint16” ]
}
}
// END

// ID4
Bridge modbus:tcp:Witek [ host=“192.168.2.9”, port=502, id=4 ]
{
Bridge poller holdingID4 [start=0, length=4, refresh=300, type=“holding” ]{
Thing data Glowne [ readStart=“0”, readValueType=“uint16”, writeType=“holding”, writeStart=“0”, writeValueType=“uint16” ]
Thing data Listwa [ readStart=“1”, readValueType=“uint16”, writeType=“holding”, writeStart=“1”, writeValueType=“uint16” ]
Thing data Went [ readStart=“2”, readValueType=“uint16”, writeType=“holding”, writeStart=“2”, writeValueType=“uint16” ]
Thing data 4 [ readStart=“3”, readValueType=“uint16”, writeType=“holding”, writeStart=“3”, writeValueType=“uint16” ]
}
Bridge poller templuxID4 [start=4, length=2, refresh=500, type=“holding” ]{
Thing data LUX [ readStart=“4”, readValueType=“uint16” ]
Thing data Temp [ readStart=“5”, readValueType=“uint16” ]
}
}
// END

// ID5
Bridge modbus:tcp:Iga [ host=“192.168.2.9”, port=502, id=5 ]
{
Bridge poller holdingID5 [start=0, length=4, refresh=300, type=“holding” ]{
Thing data Glowne [ readStart=“0”, readValueType=“uint16”, writeType=“holding”, writeStart=“0”, writeValueType=“uint16” ]
Thing data Listwa [ readStart=“1”, readValueType=“uint16”, writeType=“holding”, writeStart=“1”, writeValueType=“uint16” ]
Thing data Went [ readStart=“2”, readValueType=“uint16”, writeType=“holding”, writeStart=“2”, writeValueType=“uint16” ]
Thing data 4 [ readStart=“3”, readValueType=“uint16”, writeType=“holding”, writeStart=“3”, writeValueType=“uint16” ]
}
Bridge poller templuxID5 [start=4, length=2, refresh=500, type=“holding” ]{
Thing data LUX [ readStart=“4”, readValueType=“uint16” ]
Thing data Temp [ readStart=“5”, readValueType=“uint16” ]
}
}
// END

// SPA ID6
Bridge modbus:tcp:Spa [ host=“192.168.2.9”, port=502, id=6 ]
{
Bridge poller holdingID6 [start=0, length=4, refresh=300, type=“holding” ]{
Thing data Glowne [ readStart=“0”, readValueType=“uint16”, writeType=“holding”, writeStart=“0”, writeValueType=“uint16” ]
Thing data Listwa [ readStart=“1”, readValueType=“uint16”, writeType=“holding”, writeStart=“1”, writeValueType=“uint16” ]
Thing data Went [ readStart=“2”, readValueType=“uint16”, writeType=“holding”, writeStart=“2”, writeValueType=“uint16” ]
Thing data Lustro [ readStart=“3”, readValueType=“uint16”, writeType=“holding”, writeStart=“3”, writeValueType=“uint16” ]
}
Bridge poller templuxID6 [start=4, length=2, refresh=1000, type=“holding” ]{
Thing data LUX [ readStart=“4”, readValueType=“uint16” ]
Thing data Temp [ readStart=“5”, readValueType=“uint16” ]
}
}
// SPA END

// ID7
Bridge modbus:tcp:Sypialnia [ host=“192.168.2.9”, port=502, id=7 ]
{
Bridge poller holdingID7 [start=0, length=4, refresh=300, type=“holding” ]{
Thing data Glowne [ readStart=“0”, readValueType=“uint16”, writeType=“holding”, writeStart=“0”, writeValueType=“uint16” ]
Thing data Garderoba [ readStart=“1”, readValueType=“uint16”, writeType=“holding”, writeStart=“1”, writeValueType=“uint16” ]
Thing data KinkietL [ readStart=“2”, readValueType=“uint16”, writeType=“holding”, writeStart=“2”, writeValueType=“uint16” ]
Thing data KinkietP [ readStart=“3”, readValueType=“uint16”, writeType=“holding”, writeStart=“3”, writeValueType=“uint16” ]
}
Bridge poller templuxID7 [start=4, length=2, refresh=500, type=“holding” ]{
Thing data LUX [ readStart=“4”, readValueType=“uint16” ]
Thing data Temp [ readStart=“5”, readValueType=“uint16” ]
}
}
// END

//HOLL GORA ID8
Bridge modbus:tcp:HollGora [ host=“192.168.2.9”, port=502, id=8 ]
{
Bridge poller holdingID8 [start=0, length=4, refresh=300, type=“holding” ]{
//OSWIETLENIE GLOWNE HOLL PIETRO
Thing data Glowne [ readStart=“0”, readValueType=“uint16”, writeType=“holding”, writeStart=“0”, writeValueType=“uint16” ]
//OSWIETLENIE SCHODOW
Thing data Schody [ readStart=“1”, readValueType=“uint16”, writeType=“holding”, writeStart=“1”, writeValueType=“uint16” ]
//WENTYLATOR SYPIALNIA
Thing data SypWent [ readStart=“2”, readValueType=“uint16”, writeType=“holding”, writeStart=“2”, writeValueType=“uint16” ]
//WENTYLATOR GARDEROBA
Thing data GardWent [ readStart=“3”, readValueType=“uint16”, writeType=“holding”, writeStart=“3”, writeValueType=“uint16” ]
}
Bridge poller templuxID8 [start=4, length=2, refresh=500, type=“holding” ]{
Thing data LUX [ readStart=“4”, readValueType=“uint16” ]
Thing data Temp [ readStart=“5”, readValueType=“uint16” ]
}
}
//HOLL GÓRA END

//ALARM ID10
Bridge modbus:tcp:Alarm [ host=“192.168.2.9”, port=502, id=10 ]
{
Bridge poller coilID10Czujki [start=0, length=4, refresh=300, type=“coil” ]{
Thing data CzujkaH [ readStart=“0”, readValueType=“bit” ]
Thing data CzujkaS [ readStart=“1”, readValueType=“bit” ]
Thing data CzujkaG [ readStart=“2”, readValueType=“bit” ]
Thing data CzujkaX [ readStart=“3”, readValueType=“bit” ]
}
Bridge poller coilID10Stan [start=4, length=4, refresh=300, type=“coil” ]{
Thing data StanSyreny [ readStart=“4”, readValueType=“bit” ]
Thing data StanAlarmu [ readStart=“5”, readValueType=“bit” ]
Thing data StanX1 [ readStart=“6”, readValueType=“bit” ]
Thing data StanX2 [ readStart=“7”, readValueType=“bit” ]
}
Bridge poller tempID10 [start=8, length=1, refresh=500, type=“holding” ]{
Thing data Temp [ readStart=“8”, readValueType=“uint16” ]
}
}
//ALARM END

Bridge modbus:tcp:Salon1 [ host=“192.168.2.9”, port=502, id=16 ]
{
Bridge poller holdingID16 [start=0, length=4, refresh=300, type=“holding” ]{
Thing data Glowne1 [ readStart=“0”, readValueType=“uint16”, writeType=“holding”, writeStart=“0”, writeValueType=“uint16” ]
Thing data Glowne2 [ readStart=“1”, readValueType=“uint16”, writeType=“holding”, writeStart=“1”, writeValueType=“uint16” ]
Thing data KinkietOgr [ readStart=“2”, readValueType=“uint16”, writeType=“holding”, writeStart=“2”, writeValueType=“uint16” ]
Thing data KinkietTV [ readStart=“3”, readValueType=“uint16”, writeType=“holding”, writeStart=“3”, writeValueType=“uint16” ]
}
Bridge poller templuxID16 [start=4, length=2, refresh=500, type=“holding” ]{
Thing data LUX [ readStart=“4”, readValueType=“uint16” ]
Thing data Temp [ readStart=“5”, readValueType=“uint16” ]
}
}

Bridge modbus:tcp:Salon2 [ host=“192.168.2.9”, port=502, id=17 ]
{
Bridge poller holdingID17 [start=0, length=4, refresh=300, type=“holding” ]{
Thing data Punkt1 [ readStart=“0”, readValueType=“uint16”, writeType=“holding”, writeStart=“0”, writeValueType=“uint16” ]
Thing data Punkt2 [ readStart=“1”, readValueType=“uint16”, writeType=“holding”, writeStart=“1”, writeValueType=“uint16” ]
Thing data KinkL [ readStart=“2”, readValueType=“uint16”, writeType=“holding”, writeStart=“2”, writeValueType=“uint16” ]
Thing data KinkP [ readStart=“3”, readValueType=“uint16”, writeType=“holding”, writeStart=“3”, writeValueType=“uint16” ]
}
Bridge poller templuxID17 [start=4, length=2, refresh=500, type=“holding” ]{
Thing data LUX [ readStart=“4”, readValueType=“uint16” ]
Thing data Temp [ readStart=“5”, readValueType=“uint16” ]
}
}

Bridge modbus:tcp:Kuchnia [ host=“192.168.2.9”, port=502, id=18 ]
{
Bridge poller holdingID18 [start=0, length=4, refresh=300, type=“holding” ]{
Thing data Glowne [ readStart=“0”, readValueType=“uint16”, writeType=“holding”, writeStart=“0”, writeValueType=“uint16” ]
Thing data HollP [ readStart=“1”, readValueType=“uint16”, writeType=“holding”, writeStart=“1”, writeValueType=“uint16” ]
Thing data KuchSzaf [ readStart=“2”, readValueType=“uint16”, writeType=“holding”, writeStart=“2”, writeValueType=“uint16” ]
Thing data KuchWent [ readStart=“3”, readValueType=“uint16”, writeType=“holding”, writeStart=“3”, writeValueType=“uint16” ]
}
Bridge poller templuxID18 [start=4, length=2, refresh=500, type=“holding” ]{
Thing data LUX [ readStart=“4”, readValueType=“uint16” ]
Thing data Temp [ readStart=“5”, readValueType=“uint16” ]
}
}

Bridge modbus:tcp:Jadalnia [ host=“192.168.2.9”, port=502, id=19 ]
{
Bridge poller holdingID19 [start=0, length=2, refresh=300, type=“holding” ]{
Thing data Glowne1 [ readStart=“0”, readValueType=“uint16”, writeType=“holding”, writeStart=“0”, writeValueType=“uint16” ]
Thing data Glowne2 [ readStart=“1”, readValueType=“uint16”, writeType=“holding”, writeStart=“1”, writeValueType=“uint16” ]
// Thing data KinkietL [ readStart=“2”, readValueType=“uint16”, writeType=“holding”, writeStart=“2”, writeValueType=“uint16” ]
// Thing data KinkietP [ readStart=“3”, readValueType=“uint16”, writeType=“holding”, writeStart=“3”, writeValueType=“uint16” ]
}
}

Okay, I make that 12 pollers at 300mS and about the same number at 500mS periods.
Everything is going through one IP/port (I guess this is a TCP-serial gateway?) so they have to be done one at a time.
That means you’ll have to complete about 18 polls in the space of 300ms, that would be about 17mS allowed per poll.

We don’t know how long a real poll-query turn around takes in your case, but 17mS is not going to happen. (My estimate here is about 85mS per poll)

So you will have a queue built up for access to your TCP gateway, and the binding will process poll requests as fast as it can.
“Duplicate” poll requests will be discarded, so at least the queue will not grow forever. But the queue is going to be as long as how many pollers you have.

When you make a write request, it will go on the back of the queue and in this situation will have to wait for 24 read polls to finish before actually getting to write to modbus.
24 polls x 85mS estimate = 2 seconds
Sound right?

Counter intuitively, to make it go faster you must poll slower, so as to avoid building a queue.

For a start, do you need to poll temperatures and lux at half-second intervals? Won’t every 5 minutes do?

Try backing the other pollers off from 300 to 800mS, see if that helps.

There are also other things you can usefully do to reduce host system load, every millisecond counts when you are trying to get this level of performance.

Everything is going through one IP/port (I guess this is a TCP-serial gateway?) so they have to be done one at a time.

Yes :slight_smile:

24 polls x 85mS estimate = 2 seconds
Sound right?

Yes

For a start, do you need to poll temperatures and lux at half-second intervals? Won’t every 5 minutes do?

Ok, temp and lux i change to 5000ms but i can read from slave state and lux, temp one read, not like this:

Bridge modbus:tcp:Wojtek [ host=“192.168.2.9”, port=502, id=3, receiveTimeoutMillis=“150”, timeBetweenTransactionsMillis=“50” ]
{
Bridge poller holdingID3 [start=0, length=4, refresh=800, type=“holding” ]{
Thing data Glowne [ readStart=“0”, readValueType=“uint16”, writeType=“holding”, writeStart=“0”, writeValueType=“uint16” ]
Thing data Listwa [ readStart=“1”, readValueType=“uint16”, writeType=“holding”, writeStart=“1”, writeValueType=“uint16” ]
Thing data Went [ readStart=“2”, readValueType=“uint16”, writeType=“holding”, writeStart=“2”, writeValueType=“uint16” ]
Thing data 4 [ readStart=“3”, readValueType=“uint16”, writeType=“holding”, writeStart=“3”, writeValueType=“uint16” ]
}
Bridge poller templuxID3 [start=4, length=2, refresh=5000, type=“holding” ]{
Thing data LUX [ readStart=“4”, readValueType=“uint16” ]
Thing data Temp [ readStart=“5”, readValueType=“uint16” ]
}
}

but like this and this should be better ?

Bridge modbus:tcp:Wojtek [ host=“192.168.2.9”, port=502, id=3, receiveTimeoutMillis=“150”, timeBetweenTransactionsMillis=“50” ]
{
Bridge poller holdingID3 [start=0, length=6, refresh=800, type=“holding” ]{
Thing data Glowne [ readStart=“0”, readValueType=“uint16”, writeType=“holding”, writeStart=“0”, writeValueType=“uint16” ]
Thing data Listwa [ readStart=“1”, readValueType=“uint16”, writeType=“holding”, writeStart=“1”, writeValueType=“uint16” ]
Thing data Went [ readStart=“2”, readValueType=“uint16”, writeType=“holding”, writeStart=“2”, writeValueType=“uint16” ]
Thing data 4 [ readStart=“3”, readValueType=“uint16”, writeType=“holding”, writeStart=“3”, writeValueType=“uint16” ]
Thing data LUX [ readStart=“4”, readValueType=“uint16” ]
Thing data Temp [ readStart=“5”, readValueType=“uint16” ]
}

and if i change 1 tcp gateway to 2 tcp gateways to slover poll slaves and faster but on the same magistrale should be any errors ?

Yes, that halves the number of read polls you are trying to fit into the time available.

Ok, i do this.
Whta is faster gateway over TCP or USB or serial ?

Your gateway is sending data over serial anyway.

The serial bus with several devices attached is your bottleneck, the part that forces everything to be “one at a time”. The small details of how you connect to the bus don’t matter much.

1 Like

Ok, thanks for help.
I have delay 1s when change to one bridge poller with meny thing but in case SDM120M is problem, modbus.things:

//SDM120 ID11 L1
Bridge modbus:tcp:sdmL1ID11 [host=“192.168.2.9”, port=502, id=11, receiveTimeoutMillis=“150”, timeBetweenTransactionsMillis=“50” ]
{
Bridge poller inputID11sdmL1 [start=0, length=2, refresh=2000, type=“input” ]{
Thing data VoltL1 [ readStart=“0”, readValueType=“float32” ]
}
Bridge poller inputID11sdmA1 [start=6, length=2, refresh=2000, type=“input” ]{
Thing data AmperL1 [ readStart=“6”, readValueType=“float32” ]
}
Bridge poller inputID11sdmW1 [start=12, length=2, refresh=2000, type=“input” ]{
Thing data WattL1 [ readStart=“12”, readValueType=“float32” ]
}
}
//SDM120 ID11 L1

is read correct but:

//SDM120 ID11 L1
Bridge modbus:tcp:sdmL1ID11 [host=“192.168.2.9”, port=502, id=11, receiveTimeoutMillis=“150”, timeBetweenTransactionsMillis=“50” ]
{
Bridge poller inputID11sdmL1 [start=0, length=14, refresh=2000, type=“input” ]{
Thing data VoltL1 [ readStart=“0”, readValueType=“float32” ]
Thing data AmperL1 [ readStart=“6”, readValueType=“float32” ]
Thing data WattL1 [ readStart=“12”, readValueType=“float32” ]
}
}
//SDM120 ID11 L1

is not but should be good

Not all Modbus devices allow you to read registers that aren’t used, you just have to try it and see. Look out for for the fault codes reported in your openhab.log to see when/why read polls are rejected.
Sometimes they want you to read in multiples of 4, you could try length=16

You should really also look into using the reconnectAfterMillis= parameter with your many TCP Things for better efficiency.