Shubhamjain007 / openhab

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

Backend for CometVisu #160

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
1. Feature Description
Add a backend for the CometVisu protocol (http://www.cometvisu.org)

2. Example Use Case
Provide a backend for the CometVisu in order to supply another web based 
visualizations, which is not dependent on webkit browsers and has more 
possibilities to "design" your frontend

I already started to implement this. I´m trying to implement it using the 
Jax-RS Connector https://github.com/hstaudacher/osgi-jax-rs-connector. But I 
didn´t get it running yet. It would be a great help if someone would refactor 
the REST Bundle to use the JAX-RS Connector, so that I have working example, 
which I can use as a template for my own bundle.

Source code is available in my clone: 
http://code.google.com/r/tbraeutigam-openhab/ in the 1.1.0-cometvisu branch. 
Any help appreciated!

Original issue reported on code.google.com by TBraeuti...@gmail.com on 29 Nov 2012 at 9:40

GoogleCodeExporter commented 8 years ago
I hope to find time this weekend to help investigating this!

Original comment by kai.openhab on 29 Nov 2012 at 9:41

GoogleCodeExporter commented 8 years ago
I went back to the integration into the rest bundle for now, as I couldn´t 
make any progress with the JAX-RS-Connector. So here is al little status update:

The current state is that the basics are working, but there is one known big 
issue left. The basic workflow is, that all item states are send to the visu on 
initialization and after that only the changed states are send via 
long-polling. The Problem is, that when there are more than one Item changed at 
the same time only one of them is send to the visu. The others are discarded. I 
tried to implement an indexed queue where the state changes are stored and send 
to the visu on the next request, but this isn´t working reliable.

I guess there is a way more elegant solution to this, but whith my poor 
REST/Atmosphere experiance I wasn´t able to find one yet.

So any hints are welcome here.

If someone is interested in testing the CometVisu with the openHAB Backend I 
can give are little description how to set things up.

Original comment by TBraeuti...@gmail.com on 21 Mar 2013 at 8:30

GoogleCodeExporter commented 8 years ago
Issue 212 has been merged into this issue.

Original comment by kai.openhab on 21 Mar 2013 at 8:33

GoogleCodeExporter commented 8 years ago
Here is a little appetizer how the CometVisu can look like. The page shown 
controls my pulseaudio based simple multiroom audio system via 
openhab+pulseaudio binding.

Original comment by TBraeuti...@gmail.com on 27 Mar 2013 at 1:13

Attachments:

GoogleCodeExporter commented 8 years ago
NICE :-)

Is that a screenshot of a smartVISU frontend?

Original comment by teichsta on 27 Mar 2013 at 1:16

GoogleCodeExporter commented 8 years ago
The screenshot shows the CometVisu in the new metal-design, which is part of 
the next release. I don´t use the smartVISU.

Original comment by TBraeuti...@gmail.com on 27 Mar 2013 at 1:21

GoogleCodeExporter commented 8 years ago
anyhow - NICE :-)

Original comment by teichsta on 27 Mar 2013 at 1:22

GoogleCodeExporter commented 8 years ago

Original comment by kai.openhab on 22 May 2013 at 8:12

GoogleCodeExporter commented 8 years ago
@TBraeutigam: What is the current status on this? 

Original comment by lku...@gmail.com on 11 Sep 2013 at 5:02

GoogleCodeExporter commented 8 years ago
The Status is still the same as I described it in comment #2. Although I think 
the BroadcasterCache should be the solution for the "lost messages" problem. 
But I didn´t got it running yet.

So on my personal roadmap there are 2 Problems to solve:

1. Use the BroadcasterCache in the right way, so that no status updates get lost
2. Move away the CV-Part from the REST bundle to a separate one. Using JAX-RS 
seems to be the way to go here, but as described above I didn´t even got close 
to a working setup.

So any help appreciated!

Original comment by TBraeuti...@gmail.com on 11 Sep 2013 at 7:21

GoogleCodeExporter commented 8 years ago
A little status update:

I managed to use the BroadcasterCache and it seems to work quite well.
I still have problems with the JAX-RS Connector. Although the service registers 
and the backend is available the whole atmosphere part does not work at all. 
The @Context AtmosphereResource resource is always null. I guess its just a 
problem with the correct settings but I did not find a way how to set things up 
in the correct way.

So again: any hints are welcome.

Original comment by TBraeuti...@gmail.com on 16 Sep 2013 at 2:03

GoogleCodeExporter commented 8 years ago
After giving up on the JAX-RS Connector approach, I tried to split up the 
CometVisu Part from the Rest Bundle, and after a long week of trial and error 
it finally works.

I moved the Atmosphere/Jersey/Jackson libs to a seperate bundle called 
org.openhab.ui.lib.rest, which exports evenrything the other bundles need.

The attached rest bundle is basically the default one, without the libs.

In order to test it you have to delete the default rest bundle from yout 
server/plugins folder an add the three attached jars to your addons folder. No 
further configuration needed.

I guess there are are couple of things around the importing/exporting of the 
libs, that could be improved.
Due to the lack og my osgi / jersey / atmosphere experience I developed this 
mainly in a try and error way.

So from my point of view this feature is ready for review.

Original comment by TBraeuti...@gmail.com on 20 Sep 2013 at 12:40

GoogleCodeExporter commented 8 years ago
Now also available on Github:
https://github.com/peuter/openhab

Original comment by TBraeuti...@gmail.com on 24 Sep 2013 at 7:07

GoogleCodeExporter commented 8 years ago

Original comment by kai.openhab on 28 Sep 2013 at 4:57

GoogleCodeExporter commented 8 years ago

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

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