Closed GoogleCodeExporter closed 9 years ago
Hi, did you read the description of the REST API
http://code.google.com/p/openhab/wiki/REST ? I think the chapter "Server push"
describes what you was asking for, right?
Original comment by teichsta
on 20 Apr 2013 at 9:24
thanks teichsta
I did read the chapter "server push", the content of the chapter is introduced
simply.
I implement it by adding http header like this:
DefaultHttpClient httpclient = new DefaultHttpClient();
HttpGet httpGet = new HttpGet("http://localhost:8080/rest/items/Light_FF_Bath_Ceiling");
httpGet.addHeader("X-Atmosphere-Transport", "websocket");
httpGet.addHeader("X-Atmosphere-tracking-id", "5");
but i cannot gain the result i want
maybe i need more study.
Original comment by duanruiq...@gmail.com
on 22 Apr 2013 at 4:14
You need a WebSocket capable client. Or use long-polling and implement the
receiving of the pushes yourself. Simply adding the header for websockets isn't
enough, since WebSockets are different technology than HTTP. You should start
by reading some documentation about WebSockets, long polling, streaming and
normal polling. Then you can decide what technology suits best your scenario
and what is the easiest to implement.
Original comment by till.klo...@gmail.com
on 22 Apr 2013 at 8:57
Thanks.
I understand your statement.
Original comment by duanruiq...@gmail.com
on 22 Apr 2013 at 9:27
Original comment by kai.openhab
on 5 May 2013 at 6:45
Original issue reported on code.google.com by
duanruiq...@gmail.com
on 20 Apr 2013 at 2:10