kennychou0529 / openhab

Automatically exported from code.google.com/p/openhab
0 stars 0 forks source link

TCP / UDP Binding #485

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello

I want to use the TCP-binding to send dimmervalues to a remote unit. I have 
tested the binding with this item:

Dimmer  val1    "Val_1"  (GF_Living) { tcp=">[127.0.0.1:3000]" }

It works perfekt, when i touch the slider it sends the value to the remote 
unit. But how do I do if I want to send several dimmervalues to the same remote 
unit? Can I add some tag to the value so that I can separate them?  Or do I 
have to use one connection for each on separate tcp-ports?

Original issue reported on code.google.com by bjorn.x....@gmail.com on 5 Oct 2013 at 10:58

GoogleCodeExporter commented 9 years ago
The TCP binding sends data "as is" and does not know how the remote ends 
functions. So, if the unit can work with different ports for each dimmer 
channel on the device, go that route. If not, you need to understand the 
protocol of the unit and so forth, and build a more advanced binding on top of 
the SocketChannelBinding class....

K

Original comment by karel.go...@gmail.com on 8 Oct 2013 at 3:46

GoogleCodeExporter commented 9 years ago
Ok. My remote unit is a PLC s7-1200 so it can handle almost any protocol. But I 
want to use one port and one connection.

My idea is to send strings like "Val1_022" in both directions. Where the 
itemname is Val1. It was quite simple to add this to the tcp-binding for the 
outgoing direction. 

I am not good at Java so i would be happy if someone can help me how to edit 
the tcp-binding to make the incoming data to work. 

Original comment by bjorn.x....@gmail.com on 21 Oct 2013 at 3:18

GoogleCodeExporter commented 9 years ago

Original comment by teichsta on 5 Nov 2013 at 10:53

GoogleCodeExporter commented 9 years ago
This issue has been migrated to Github. If this issue id is greater than103 its 
id has been preserved on Github. You can open your issue by calling the URL 
https://github.com/openhab/openhab/issues/<issueid>. Issues with ids less or 
equal 103 new ids were created.

Original comment by teichsta on 17 Nov 2013 at 8:08

GoogleCodeExporter commented 9 years ago
Set status to "invalid" to show that these issues are not tracked here anymore 
- please refer to GitHub instead!

Original comment by kai.openhab on 2 Dec 2013 at 7:12