When will openhab use a "one off" polltask and when a regular, scheduled polltask?

Hi,

I have a Strange behavior of my openhab 4.1M3 Installation, which already existed in 4.0.x.
Three of my six modbus-tcp Bridges execute it’s polltask as scheduled polltask. The other three execute the polltask as “one off” polltask? They are all created in the gui as regular Poll?
The problem ist, that the wait time of the “one off” polltasks until they are executed, increases from poll to poll. And that delays also the scheduled polltask, so that they executed after a short time only every 5 min, 10 min , 15 min and so on.
There are no Errors in the logs and the polltask it self have all an execution time of 30-50ms.
All my devices are able to respond to several connections. When i connect in parallel with a modbus tool to the devices, I get error and delays free responses every 200ms. Also openhab shows no Errors during this test.
The only hint my be, that the three bridges with the “one off” polltask, connect to the same serial-modbus-to-tcp device. The Connection have the same Host, but different ports and slave-id.
Also interesting ist, that when disabling one of the three, everything normalizes within minutes and i have no delays anymore.

Any ideas, hints what i can try?
Regards
Boris

What Binding are you using ?
Can you please show us your item definitions (code tab).

Wow, fast reply. Thanks.
I am using the standard modbus binding, which comes with openhab.
This is one of the bridges , which execute as “one off” polltask.
There is no change of behavior, when I change reconnectAfterMillis to smaller values or even to 0. All other are defined in the same way.

Regards,
Boris

The Bridge

UID: modbus:tcp:SmartmeterHausBridge
label: Smartmeter Haus Bridge
thingTypeUID: modbus:tcp
configuration:
  rtuEncoded: false
  connectMaxTries: 1
  reconnectAfterMillis: 3600000
  timeBetweenTransactionsMillis: 60
  port: 503
  timeBetweenReconnectMillis: 0
  connectTimeoutMillis: 10000
  host: Eport-PE11
  afterConnectionDelayMillis: 0
  id: 3
  enableDiscovery: false’

The Poller

UID: modbus:poller:SmartmeterHausBridge:Leistung
label: Smartmeter Haus Poller Leistung
thingTypeUID: modbus:poller
configuration:
  length: 22
  start: 52
  refresh: 500
  maxTries: 3
  cacheMillis: 50
  type: input
bridgeUID: modbus:tcp:SmartmeterHausBridge

first data

UID: modbus:data:Leistung:LeistungGesamt
label: Smartmeter Haus Leistung Gesamt
thingTypeUID: modbus:data
configuration:
  readValueType: float32
  readTransform: default
  writeTransform: default
  readStart: "52"
  updateUnchangedValuesEveryMillis: 1000
  writeMultipleEvenWithSingleRegisterOrCoil: false
  writeMaxTries: 3
bridgeUID: modbus:poller:SmartmeterHausBridge:Leistung
channels:
  - id: number
    channelTypeUID: modbus:number-type
    label: Value as Number
    description: Number item channel
    configuration: {}
  - id: switch
    channelTypeUID: modbus:switch-type
    label: Value as Switch
    description: Switch item channel
    configuration: {}
  - id: contact
    channelTypeUID: modbus:contact-type
    label: Value as Contact
    description: Contact item channel
    configuration: {}
  - id: dimmer
    channelTypeUID: modbus:dimmer-type
    label: Value as Dimmer
    description: Dimmer item channel
    configuration: {}
  - id: datetime
    channelTypeUID: modbus:datetime-type
    label: Value as DateTime
    description: DateTime item channel
    configuration: {}
  - id: string
    channelTypeUID: modbus:string-type
    label: Value as String
    description: String item channel
    configuration: {}
  - id: rollershutter
    channelTypeUID: modbus:rollershutter-type
    label: Value as Rollershutter
    description: Rollershutter item channel
    configuration: {}
  - id: lastReadSuccess
    channelTypeUID: modbus:last-successful-read-type
    label: Last Successful Read
    description: Date of last read
    configuration: {}
  - id: lastReadError
    channelTypeUID: modbus:last-erroring-read-type
    label: Last Erroring Read
    description: Date of last read error
    configuration: {}
  - id: lastWriteSuccess
    channelTypeUID: modbus:last-successful-write-type
    label: Last Successful Write
    description: Date of last write
    configuration: {}
  - id: lastWriteError
    channelTypeUID: modbus:last-erroring-write-type
    label: Last Erroring Write
    description: Date of last write error
    configuration: {}

second data

UID: modbus:data:Leistung:295af71471
label: Smartmeter Haus Energie
thingTypeUID: modbus:data
configuration:
  readValueType: float32
  readTransform: default
  writeTransform: default
  readStart: "72"
  updateUnchangedValuesEveryMillis: 1000
  writeMultipleEvenWithSingleRegisterOrCoil: false
  writeMaxTries: 3
bridgeUID: modbus:poller:SmartmeterHausBridge:Leistung
channels:
  - id: number
    channelTypeUID: modbus:number-type
    label: Value as Number
    description: Number item channel
    configuration: {}
  - id: switch
    channelTypeUID: modbus:switch-type
    label: Value as Switch
    description: Switch item channel
    configuration: {}
  - id: contact
    channelTypeUID: modbus:contact-type
    label: Value as Contact
    description: Contact item channel
    configuration: {}
  - id: dimmer
    channelTypeUID: modbus:dimmer-type
    label: Value as Dimmer
    description: Dimmer item channel
    configuration: {}
  - id: datetime
    channelTypeUID: modbus:datetime-type
    label: Value as DateTime
    description: DateTime item channel
    configuration: {}
  - id: string
    channelTypeUID: modbus:string-type
    label: Value as String
    description: String item channel
    configuration: {}
  - id: rollershutter
    channelTypeUID: modbus:rollershutter-type
    label: Value as Rollershutter
    description: Rollershutter item channel
    configuration: {}
  - id: lastReadSuccess
    channelTypeUID: modbus:last-successful-read-type
    label: Last Successful Read
    description: Date of last read
    configuration: {}
  - id: lastReadError
    channelTypeUID: modbus:last-erroring-read-type
    label: Last Erroring Read
    description: Date of last read error
    configuration: {}
  - id: lastWriteSuccess
    channelTypeUID: modbus:last-successful-write-type
    label: Last Successful Write
    description: Date of last write
    configuration: {}
  - id: lastWriteError
    channelTypeUID: modbus:last-erroring-write-type
    label: Last Erroring Write
    description: Date of last write error
    configuration: {}

Please always mark code with code fences:
```

your code goes here

```
These are ‘backticks’ (Accent grave, Shift+`, right from ß at the german keyboard)

Thanks for the hint. I’ve changed the Post.

1 Like