hektiker1983 / openhab

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

TCP binding: TCP binding doesn't restore connection properly #362

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Steps to reproduce:
1. Setup openhab as described here: http://code.google.com/p/openhab/wiki/Setup

2. Copy TCP binding addon

3. Add TCP binding to some item. For example:
Switch  DemoSwitch  "Switch"  <heating>  { tcp=">[127.0.0.1:3333]"}

4. Start TCP server. For example netcat:
watch nc -l 127.0.0.1 3333

5. Start openhab: sudo ./start_debug.sh

6. Open web interface and touch/change item (created at step 3) with TCP binding

7. Verify that TCP server receives updates

8. Stop TCP server (started at step 4)

9. Start TCP server again (as in step 4)

10. Go to web interface and touch/change item again

Result:
TCP binding doesn't restore connection properly. Actually it opens new 
connection, but closes it immediately, than open connection again but doesn't 
send any updates through it. After all these steps openhab hangs when I try to 
shutdown it (same situation as in defect 360: 
http://code.google.com/p/openhab/issues/detail?id=360)

Expected result:
TCP binding must restore (which means - open new) connection and send updates 
through it.

I use:
ubuntu 13.04
openhab 1.2.0

This defect is very similar to defect 360. But there is no information of 
reconnection in defect 360. Here I wanted to show problem with restoring 
connection.

Original issue reported on code.google.com by igor.zel...@gmail.com on 29 Jun 2013 at 8:08

GoogleCodeExporter commented 8 years ago
Ok  - sorry for not seeing this before.

I will have a look at this

Original comment by karel.go...@gmail.com on 25 Jul 2013 at 2:05

GoogleCodeExporter commented 8 years ago
Igor,
Also this problem I could not  replicate (OH from Eclipse). I can restart the 
nc "server" and continue using the OH webinterface. However, I found another 
problem and that is that the first value (button change) after the nc-restart 
is not sent to the server. The binding does set up the connection to the 
server, but the actual value itself is not sent. As of the second and 
subsequent toggle change everything works fine.

Original comment by karel.go...@gmail.com on 26 Jul 2013 at 9:45

GoogleCodeExporter commented 8 years ago
Maybe I need to reproduce it using latest source from repository... because
I was able to reproduce it with 1.2.0.

May it be fixed already in latest code?

Original comment by igor.zel...@gmail.com on 26 Jul 2013 at 9:52

GoogleCodeExporter commented 8 years ago
There was a major rewrite of the TCP binding some time ago, but I don't recall 
in which version/when it was pushed into the main repo. Can you try with the 
latest repo?

tx
K

Original comment by karel.go...@gmail.com on 27 Jul 2013 at 8:03

GoogleCodeExporter commented 8 years ago
Any news here? Does this issue still apply?

Original comment by teichsta on 13 Aug 2013 at 7:52

GoogleCodeExporter commented 8 years ago
Sorry for long delay. I've just tried to reproduce it with 1.3.0 SNAPSHOT.

Well... It is 100% reproducible with 1.2.0. But with 1.3.0 only sometimes. 
Sometimes it works, sometimes it doesn't.

Sometimes openhab doesn't restore connection to server, sometimes it restores 
connection but doesn't send updates to server, sometimes openhab web page hangs.

And after these manipulations openhab hangs when I try to shutdown it (press 
ctrl+c).

Original comment by igor.zel...@gmail.com on 30 Aug 2013 at 10:44

GoogleCodeExporter commented 8 years ago

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

GoogleCodeExporter commented 8 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 8 years ago
see above!

Issue has been migrated to Github and should be discussed there.

Original comment by teichsta on 21 Nov 2013 at 1:51