[SOLVED] TCP/Binding don’t work! Goal is to control a digital I/O card

Hi all,
I installed openHAB2in my windows laptop and I have some problems with the TCP Binding.
I spend a whole week to get a the binding for my kostal pico inverter work. And now I have a problem with a TCP connection of a digital I/O Card.
For interested people I have a (AVR-NET-IO-Fertigmodul https://www.pollin.de/p/avr-net-io-fertigmodul-810073 ) which I want to control.
But unfortunatelyare 90% of all the instructions and tutorials “bullshit” and just for super brain programming guys.

My Problem with the I/O Card is that I don’t get a connection. When I use the delivered testing software everything works very well. But when I want to control it over the TCP commands it dosens works.
I Install the TCP/UDP Binding but I can’t find it in the Configuration -> Bindings settings (see in the picture)

Probably it is because its an binding for openHAB1

In my .items-file I wrote:

Switch Licht   "Licht"   <light>  {tcp=">[ON:'SETPORT 1.1'], >[OFF:'SETPORT 1.0']"}

In my .sitemap-file I wrote:

Frame label="Garage" {
   Switch item=Licht 

My questions are now:
Is anything wrong with the code?
Do I have to do any additional things for the installation of the binding?
I just click install on the User Interface
Maybe I have to create some Things in the .things file?

PS: If anyone need to see a log-file or anything else. Please give me a description where I can find those. I am a newbie and have absolutely no Idea where I can find special files or anything else.


No, only for 2.x bindings.

But you need to configure a tcp.cfg file, please read the docs and tell us the point where you are stucked:


Also in the docs:


Thank you for your answer, I don’t activate the refreshinterval in the tcp.cfg file.
Now its works.

For the case that someone is interested in the tcp.cfg here it is:

# all parameters can be applied to both the TCP and UDP binding unless
# specified otherwise

# Port to listen for incoming connections

# Cron-like string to reconnect remote ends, e.g for unstable connection or remote ends
#reconnectcron=0 0 0 * * ?

# Interval between reconnection attempts when recovering from a communication error,
# in seconds

# Queue data whilst recovering from a connection problem (TCP only)

# Maximum buffer size whilst reading incoming data

# Share connections within the Item binding configurations

# Share connections between Item binding configurations

# Share connections between inbound and outbound connections

# Allow masks in ip:port addressing, e.g.* etc

# Pre-amble that will be put in front of data being sent

# Post-amble that will be appended to data being sent

# Perform all write/read (send/receive) operations in a blocking mode, e.g. the binding
# will wait for a reply from the remote end after data has been sent

# timeout, in milliseconds, to wait for a reply when initiating a blocking write/read
#  operation

# Update the status of Items using the response received from the remote end (if the
# remote end sends replies to commands)

# Timeout - or 'refresh interval', in milliseconds, of the worker thread

# Timeout, in milliseconds, to wait when "Selecting" IO channels ready for communication

# Used character set

1 Like