This page last changed on Sep 13, 2012 by dberenguer.

Hello team!

We've been playing with OR for some time now. I have to congratulate you again for your work guys. IMO OR fills a gap not filled before, where lots of applications (like lagarto) provide data management and programming services but actually lack nice GUI front-ends.

OR have been working well with some panStamp wireless networks via HTTP GET requests through lagarto-swap. However, we don't specially like the idea of having to poll the lagarto server periodically. Instead, I've thought in developing a protocol extension for OR in order to make the thing really event-driven. Thus I've downloaded the sources from Controller_2_0_0_Alpha11 and I'm now taking the http protocol as an initial reference. I know that I have to override "read" and "send" from StatusCommand and ExecutableCommand respectively. This should be quite straightforward since lagarto already provides a HTTP interface for polling values and controlling outputs. However, our lagarto server also provides a way to send statuses without prior demand via ZeroMQ (TCP/IP) but I don't know how to interface this from OR. I understand that I'll have to manage this from an independent thread or process but then I'd like to know how to tell OR that a new value is waiting to be read.

Sorry for the basic question. There is surely a documentation page talking about this but I've been unable to find it.

Thanks!

Daniel.


Capture.PNG (image/png)
Capture2.PNG (image/png)
Capture3.PNG (image/png)
Capture.PNG (image/png)
Capture2.PNG (image/png)

Please use tag https://openremote.svn.sourceforge.net/svnroot/openremote/tags/project/Controller/Controller_2_0_0/ for reference for current most up to date stable code.

For event-driven integration you will want to implement EventListener API instead. The Javadoc explains the code level details, if you have further questions, just ask here on the forums.

There's an example of UDP packet listener here: https://openremote.svn.sourceforge.net/svnroot/openremote/workspace/mredeker/Controller_2_0_0_UDPListener/src/org/openremote/controller/protocol/socket/UDPListenerCommand.java

Posted by juha at Sep 13, 2012 11:43

Thanks Juha.

OK, so the idea would be to implement ExecutableCommand for the commands and EventListener for the status reception. Am I right?

Posted by dberenguer at Sep 13, 2012 11:55

Correct.

Posted by juha at Sep 13, 2012 12:38

OK, I've created the following classes:
LagartoCommand, which implements ExecutableCommand
LagartoCommandBuilder, which implements CommandBuilder
LagartoListenerCommand, which implememnts EventListener
and LagartoListenerCommandBuilder, which implements CommandBuilder

So far so good. Now I want to test the code so I have to add my customs commands to controller.xml. Where is this XML file supposed to be? I've found some occurrences under controller/test/org but nothing under Controller_2_0_0/config or Controller_2_0_0/runtime/apache-tomcat-6.0.18/conf.

Besides, is there any way to test the code before submitting the xml definitions for Designer? Let's say from console or adding some instructions into the controller code.

thanks again!

Posted by dberenguer at Sep 14, 2012 11:25

New question.

Now I want to add my protocol to applicationContext.xml. My protocol implementation contains two command builders (LagartoCommandBuilder and LagartoListenerCommandBuilder). I understand that I have to create two different beans under "commandFactory" but how do I associate both command builders to the same protocol? I guess using the same entry key (tagName?) won't work.

Thanks!

Posted by dberenguer at Sep 15, 2012 00:21

I got a better idea about the picture after reviewing the HttpGetCommand implementation. It's now clear that both ExecutableCommand and EventListener have to be implemented by the same class. So just one command class and one command builder.

Posted by dberenguer at Sep 15, 2012 15:49

Juha, I need to poll the network before the creation of sensors and commands at startup. Which is the best way to do this?

Thanks!

Posted by dberenguer at Sep 16, 2012 00:07

Maybe your CommandBuilder constructor?

Posted by juha at Sep 16, 2012 00:55

You don't necessary have todo it that way. You need one CommandBuilder but you can have 2 classes which implement ExecutableCommand and EventListener. The CommandBuilder will just habe to choose (based on an attribute) which class to instantiate.

Posted by mredeker at Sep 16, 2012 22:08

Thanks Marcus.

I'm now working on the xml file for designer. I have two mandatory fields:

Server name: _______
Endpoint ID: _______

And a third optional field:

New value: _______

which will have to be filled only for control (write) actions. For sensors (read) Server name and Endpoint ID will be sufficient. Which is the best/most elegant approach for this?

Thanks again!

Posted by dberenguer at Sep 17, 2012 11:04

New protocols are configured in the designer using a xml file.
Here you can see the example for HTPP: http://openremote.svn.sourceforge.net/viewvc/openremote/tags/project/Designer/Designer_2_13_4_Rosemary_20120729/protocols/protocols/http.xml?revision=6745&view=markup

Posted by mredeker at Sep 17, 2012 19:43

Thanks Marcus. I've already submitted the xml file to Juha. Looking forward to start my tests

Posted by dberenguer at Sep 17, 2012 22:13

Hello!

Nice to see implementation for panStamp in the Designer. Good work Deniel. I have a question regarding the configuration in the designer.

Let's say I have two http requests:

http://localhost:8001/values/SWAP/Temperature/?

http://localhost:8001/values/SWAP/Binary_1/?value=off

If I understand correctly should configuration in the Designer look like:



Am I right? Do I need to upgrade the controller? I used latest 2.1.0 (2012-09-21).Thanks.

Regards,
Nejc

Posted by nejc at Oct 04, 2012 10:07

Hi Nejc!

Even if Designer already supports panStamp's lagarto protocol, OpenRemote Controller still doesn't so we'll have to wait a bit before playing with the new protocol extension. Everything is being tested at this moment and I must say that the overall sensation is much better than before having the protocol implemented into OpenRemote, I mean, using simple HTTP commands. Some of the advantages:

1. Only a command needs to be defined for each endpoint (vs 2 or 3 commands per endpoint using HTTP)
2. Lagarto servers don't need to be periodically polled. Instead, they publish network events via ZeroMQ

This said, if you really want to use OpenRemote with your lagarto server I suggest you to use HTTP commands, as explained here: http://www.panstamp.com/announcements/openremotecontrolspanstamps

More news next week

Daniel.

Posted by dberenguer at Oct 04, 2012 10:19

Thanks Daniel.
I already use HTTP commands to manage Lagarto server and it works great. I just want to play with this new feature, but it seems I'll have to wait some time.

I look forward to new news.

Regards,
Nejc

Posted by nejc at Oct 04, 2012 10:31

Hi daniel Berenguer

are you planned to use the panstamps directly without to use the lagarto platform?

i'm think that some people are waiting for arduino wireless solution that work with openremote

Posted by sanfe at Dec 02, 2012 22:40

Hi David,

The OpenRemote team is already adding the new panStamp protocol extension into the official release so we'll soon be able to integrate panStamps with OR without having to rely on pure HTTP mechanisms or development sources. However, we need lagarto-swap to be running on the same network in order to get access to the panStamp wireless network (OpenRemote - lagarto-swap - panStamps).

lagarto-swap is a compact application and you'll realize that running it on your OR computer adds almost zero overhead. The only drawback is that lagarto is Python whilst OR is Java so you'll need to install Python and some secondary modules on your computer. On the other hand, this adds further flexibility to the architecture since multiple processes can reach the wireless network via IP. Finally, multiple wireless networks can be reached from a single OR instance.

Best regards,

Daniel.

Posted by dberenguer at Dec 02, 2012 22:59

Okey. thanks for your fast respond. i will take a look at your forum for having more information about your solution and make a installation. i think in installing in a fedora or ubuntu machine. thanks for your work

Posted by sanfe at Dec 02, 2012 23:06

Wow, this is great. How is it coming along? Any ETA for full implementation of the Panstamp protocol? BTW, thanks to everyone here for all the hard work on OR.

Posted by artart at Jan 11, 2013 23:26

Panstamps is currently available in the paid Pro version and is scheduled for the next 2.1 OSS release.

Posted by juha at Jan 13, 2013 02:40

Is there any word on when the next OSS release will be out? I did some looking through the forums for any hints, but didn't find much.

Posted by kerber at Feb 10, 2013 17:29

Will be making snapshot of current 2.1 available with panstamps included as soon as I get some DSC review out of the way and finish writing a requirements doc needed for another task.

So maybe tomorrow (it's getting late)

Posted by juha at Feb 10, 2013 17:32

Excellent! I've been working with some panstamps and this would be great!

Posted by kerber at Feb 10, 2013 17:48

Hey Juha,
Any update on this? I don't want to get everything set up with http if I'm just going to switch over, so I'm waiting for the release. I really appreciate it.

Thanks!

Posted by kerber at Feb 12, 2013 17:06

Didn't get to it yet, I was too optimistic with my schedule. Will have to push it to tomorrow.

If you can manage to build from source yourself, you can just build the branch at https://openremote.svn.sourceforge.net/svnroot/openremote/workspace/juha/Controller_2_1_0_FeatureMergeBranch/

You should be good to go with that, no changes needed.

Posted by juha at Feb 12, 2013 19:16

Nevermind, managed to sneak it in anyway. Uploading now...

OpenRemote-Controller-2.1.0_FM_SNAPSHOT-20130212-Lagarto.zip

Posted by juha at Feb 12, 2013 19:41

Thanks Juha!

Posted by kerber at Feb 12, 2013 19:43

For anyone happening across this thread, you'll need to set up the zeromq java bindings if you don't already have them. http://www.zeromq.org/bindings:java

Posted by kerber at Feb 14, 2013 06:02

Thanks for posting the update.

Would you be interested in writing a more complete step-by-step how-to for the website?

Posted by juha at Feb 14, 2013 08:17

Hi Juha,

I'm currently writing a guide to be posted on both openremote.org and panstamp.com. I'll let you know when it's ready.

Thanks Dustin for the tip!.

Posted by dberenguer at Feb 14, 2013 08:28

A new tutorial has been posted here: http://www.panstamp.com/announcements/openremotejoinsthepanstampecosystem

– EDITED –
And here is the new OR wiki page: http://www.openremote.org/display/docs/Openremote+2.1+How+To+-+PanStamps

Posted by dberenguer at Feb 14, 2013 15:55
Document generated by Confluence on Jun 05, 2016 09:31