How to configure the TCP binding

Now I come across a problem.I bind a switch item to TCP binding,but it doesn’t work when changes the state of the switch.Following is my code and the error information.wish for your help.

Hi!

I have had the same problem and spent hours to find the root cause of the “there is no channel that services …” error message.
But I found a hint here: Redirecting to Google Groups

You have to add at least one “udp=” in the openhab.cfg and that is for example
udp:refreshinterval=250
If not, the binding will not be properly configured and will not start up

This is for UDP, but I assume it is the same for TCP also.

Regards,
Christian

1 Like

Thanks for your reply.I have finally resolved it.The problem root is that the version of JDK is too low.

I just wanted to add that I was getting the “there is no channel” error message too. What I found was tcp.cfg had all config options commented out. Simply un-commenting one config line (ex: charset=ASCII) fixed my problem.

Anybody know where to submit documentation change requests? This should be added to https://www.openhab.org/addons/bindings/tcp1/

This is the repo for the TCP binding.