This page last changed on May 31, 2013 by nwe.

My land has two main buildings with a ethernet connection between the two.
I would like to have two raspberry pi's with panstamp interfaces, one for each building.
I would probably have the panstamps on different channels so that I didnt get the same message going to openremote from two differnt locations.

Is this doable?

Neil.

Hi Neil,

OR Controller has to be running on the same server as lagarto-max and lagarto-swap. This will change in a near future since the OR team is already working on a fix that will let us select from Designer which address we want OR Controller to connect to. It's a matter of time I guess.

Daniel.

Posted by dberenguer at Jun 03, 2013 22:29

Daniel,
So I guess that is maybe a no?
When they do fix the OR issue perhaps that will allow multiple connections?
Neil.

Posted by nwe at Jun 04, 2013 10:43

Well... it's a temporary NO.

When this issue gets fixed we'll be able to run OpenRemote on a separate computer and connect to either lagarto-swap or lagarto-max in the same LAN. At his moment, if we want to use OR, we need to run every piece of software on the same PC.

Posted by dberenguer at Jun 04, 2013 10:53

There seems to be an issue with how the Lagarto implementation was using the controller configuration API. I think I've identified it and will do a couple of more tests and then prepare a patch.

Posted by juha at Jun 13, 2013 12:56

Terrific,
Will this also include the X10 mods?

By the way, none of the above conversations actually answers, will I be able to talk to two (2) separate raspberry pi's with panstamp interfaces? Seperate ip addresses.

Neil.

Posted by nwe at Jun 13, 2013 13:29

HI Juha,

Do you mean that this issue only affected our lagarto extension? I remember having similar problems with Zwave when I tried to configure one of its protocol settings from Designer.

Neil, yes, you can run different instances of lagarto-swap on multiple computers and run a single instance of lagarto-max from any other computer. This is a distributed model in fact but, if you want to use OR then you need the issue we are talking about to be patched first.

Posted by dberenguer at Jun 13, 2013 15:50

Yes, it is an issue with lagarto extension only, where the ControllerConfiguration.readXML() method was never called. This applies the controller configuration properties from the controller.xml file over the system defaults read from config.properties (the API is unintuitive and quite poorly designed so it is in need of complete restructung, described in ORCJAVA-183 and ORCJAVA-193).

However, changing existing properties still requires a restart of the controller. This impacts all configuration variables at the moment and is a to-do task.

Posted by juha at Jun 13, 2013 17:47

Will this also include the X10 mods?

Yes.

Posted by juha at Jun 13, 2013 17:48

By the way, none of the above conversations actually answers, will I be able to talk to two (2) separate raspberry pi's with panstamp interfaces? Seperate ip addresses.

I think so, as per Daniel's answer below. You could have single OR instance talking to a single lagarto-max instance which communicates to lagarto-swaps on RPi's (sorry if I got the lagarto components wrong, just going by my understanding of Daniel's answer).

What the patch enables is running the lagarto-max (if I understood correctly) on a different machine from the OR controller.

Posted by juha at Jun 13, 2013 17:51

BWT, it should have been possible to configure an external lagarto max by setting the IP address in config.properties file directly, unless I'm missing something?

Posted by juha at Jun 13, 2013 19:51

You understood correctly Juha. I will give a try to ControllerConfiguration.readXML() unless you commit the patch yourself

Thanks Juha!

Posted by dberenguer at Jun 13, 2013 22:36

Already committed. Follow ups in ORCJAVA-264.

Posted by juha at Jun 13, 2013 23:03

Juha,

So how do I download the latest version?
In regard to the X10 Mod's, did this also include the latest RXTXSerial.DLL?

Neil.

Posted by nwe at Jun 14, 2013 04:10

Thanks Juha!

Neil, Juha has commited the changes to the SVN repository. I think the changes are available from http://sourceforge.net/p/openremote/code/HEAD/tree/workspace/juha/Controller_2_1_0_FM_ORCJAVA-264/ but there is no zip file available until Juha releases a new snapshot.

Posted by dberenguer at Jun 14, 2013 08:44

You can download a binary snapshot here: OpenRemote-Controller-2.1.0_SNAPSHOT-2013-06-14.zip.

Please ignore the errors from Z-wave.

Not understanding the question about RXTX – I don't think RXTX has created updates in several years now?

Posted by juha at Jun 15, 2013 01:39

Hi Juha,

Any idea what the following error means? It is a panstamp temperature device I have setup as per Daniels example. http://www.panstamp.com/?offset=10 Search for "Temperature sensor" on the web page.
Except my Endpoint ID = 255.12.0

Using CATALINA_BASE:   C:\OpenRemote
Using CATALINA_HOME:   C:\OpenRemote
Using CATALINA_TMPDIR: C:\OpenRemote\temp
Using JRE_HOME:        C:\Program Files\Java\jdk1.6.0_37
15/06/2013 11:16:26 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performanc
e in production environments was not found on the java.library.path: C:\OpenRemo
te\webapps\controller\WEB-INF\lib\native
15/06/2013 11:16:26 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
15/06/2013 11:16:26 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 582 ms
15/06/2013 11:16:26 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
15/06/2013 11:16:26 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
15/06/2013 11:16:26 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive webconsole.war
15/06/2013 11:16:27 PM org.openremote.controller.bootstrap.Startup redirectJULto
Log4j
INFO: Initialized JUL to LOG4J Redirector.
INFO 2013-06-15 23:16:28,699 :

--------------------------------------------------------------------

  DEPLOYING NEW CONTROLLER RUNTIME...

--------------------------------------------------------------------

INFO 2013-06-15 23:16:33,494 : Initialized event processor : Drools Rule Engine
INFO 2013-06-15 23:16:33,551 : Registered sensor : Sensor (Name = 'Temperature0'
, ID = '112', State Mappings: {})
Exception in thread "Thread-3" java.lang.UnsatisfiedLinkError: no jzmq in java.l
ibrary.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1738)
        at java.lang.Runtime.loadLibrary0(Runtime.java:823)
        at java.lang.System.loadLibrary(System.java:1028)
        at org.zeromq.ZMQ.<clinit>(ZMQ.java:34)
        at org.openremote.controller.protocol.lagarto.LagartoClient.run(LagartoC
lient.java:125)
INFO 2013-06-15 23:16:33,568 : Registered sensor : Sensor (Name = 'DisplayDate S
ensor', ID = '110', State Mappings: {})
INFO 2013-06-15 23:16:33,569 : Registered sensor : Sensor (Name = 'DateTime isDa
y', ID = '111', State Mappings: {})
INFO 2013-06-15 23:16:33,574 : Startup complete.
INFO 2013-06-15 23:16:33,577 : Controller Definition File Watcher for Default De
ployer started.
15/06/2013 11:16:33 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
15/06/2013 11:16:33 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 7503 ms
Posted by nwe at Jun 15, 2013 14:24

Yes, looking at the Openremote 2.1 How To - PanStamps you will need to install the native libs separately (see the download and run section).

These could also be included with the OpenRemote distribution, reducing this one extra step that can cause confusion. Daniel, any reason to keep the native libs out of the distro?

Posted by juha at Jun 15, 2013 14:31

Do you know if it is just the libzmq.dll that it is looking for?
I have downloaded this and put it in the "C:\OpenRemote\webapps\controller\WEB-INF\lib\native" but I still get the same error.

Posted by nwe at Jun 15, 2013 14:58

I would have thought so yes.

The message is a bit confusing because it talks about jzmq which I sort of associate with a Java binding due to the 'j' at the beginning – however the Java archive is called zmq.jar and its in the /WEB-INF/lib directory.

The fact that it says not found in 'java.library.path' (and not classpath) would indicate that it is looking for a native lib, so in this case should have been the DLL.

So I'm not sure. Maybe you'll need to have Daniel to sort it out.

Posted by juha at Jun 15, 2013 15:21

Looking at the howto again, and on the Linux side there seems to be TWO separate native libs libzmq AND libjzmq. Does the two equivalent libs exist as DLL too?

Posted by juha at Jun 15, 2013 15:23

Hi guys,

Juha is right, you need to look for libzmq.dll and libjzmq.dll. libjzmq provides support for the java bindings and, unless you find a binary for your Windows version you will probably have to build it yourself as explained here: http://www.zeromq.org/bindings:java

Juha, there is IMO no reason to not to include the native libraries in the OR distribution, given that all the ZeroMQ resources are licensed under LGPL.

Posted by dberenguer at Jun 15, 2013 16:52

I'm getting really frustrated. Every time I try to do something I need to download compilers I've never used before, find source code from all over the world, learn new programming languages, try and figure out how to make the latest incarnation (This time DLL's) and all for things that are meant to be natively supported.

I downloaded Visual Studio 2012, download ZeroMQ, compiled and ended up with a "libzmq_d.dll" not a "libzmq.dll". Does this make a difference ? Buggered if I know!

I then moved onto the "libjzmq.dll" Read the instructions 10 times but still don't understand.
I think I have overcome the differences between what the instructions say for old versions of VS and the new 2012 version of VS. But no idea what to do next.

To run it, firstly check whether libzmq.dll is on the system PATH.
Secondly, make sure that you add zmq.jar and the jzmq perf directory to the Java classpath. 
Thirdly, for Java to find the jzmq.dll shared library you must ensure that java.library.path is set to the directory where it is installed.
Posted by nwe at Jun 16, 2013 05:44

The last part (are these the instructions you are referring to?) is handled by OpenRemote:

To run it, firstly check whether libzmq.dll is on the system PATH.

So in our case it is in the java.library.path (which should be sufficient) – we set up the java.library.path as part of the openremote.bat script to point to the WEB-INF/lib/native directory. So this is where the libzmq.dll should go. The libzmq_d.dll might stand for "debug" – although I'm guessing, I'm not familiar with the conventions Windows developers use – but if that's the case, it is probably as good as libzmq.dll, just a little fatter.

The libjzmq.dll should go to the same WEB-INF/lib/native directory – were you able to compile and/or get a DLL out of that?

Secondly, make sure that you add zmq.jar and the jzmq perf directory to the Java classpath.

Already done, and it is in your WEB-INF/lib directory. Should not be necessary to do anything more here. Not sure what the perf directory is for though, haven't seen that mentioned before.

Thirdly, for Java to find the jzmq.dll shared library you must ensure that java.library.path is set to the directory where it is installed.

Already done by openremote.bat which is setting the java.library.path to pick up DLLs from the webapps/controller/WEB-INF/lib/native directory.

Posted by juha at Jun 16, 2013 10:56

Thanks for your help Juha,
I'm lost. I have no idea where to get the source code for the second or third dll or the jar file.
Maybe Daniel can come up with the goods to make panstamp work with OR.
Neil.

Posted by nwe at Jun 16, 2013 22:17

I'm sorry to read that Neil but, why don't you use the available RPi image from our website? Of course, you will have to download the Java VM for Raspbian but I think this is still the easiest way to get lagarto and OpenRemote working together. I know lagarto's installation is not straightforward and the way to make it work with OR is even less straightforward but we created the RPi image to compensate these difficulties. With the latest changes made by Juha you could even connect to a "distant" lagarto-swap. You can drop me some lines via Skype and I'll try to assist you in the process as we did last time.

Posted by dberenguer at Jun 16, 2013 22:58

Daniel,
I'm running OpenRemote on a windows PC.
Neil

Posted by nwe at Jun 16, 2013 23:05

Well, spent some time yesterday trying to produce the windows DLLs for zeromq and can certainly appreciate the frustration felt. Did not make a great deal of progress. But do have still some things I can try there.

Posted by juha at Jun 18, 2013 11:37

Juha, did you follow this tutorial? http://www.zeromq.org/bindings:java

Posted by dberenguer at Jun 18, 2013 11:48

No, but I might give it a try.

Did it work for you?

Posted by juha at Jun 18, 2013 11:57

Yes, it worked for me some time ago on an old computer running Windows XP.

Posted by dberenguer at Jun 18, 2013 12:06

I suppose you didn't keep the DLLs around then?

Posted by juha at Jun 18, 2013 13:09

Juha,
Thanks for the huge effort you are putting in.
I will buy you a beer or two.
Neil.

Posted by nwe at Jun 18, 2013 13:30

Beers I can find easily

What's difficult to find is good help. So pass the gratitude on towards the next newcomer on the forums who's struggling to find his way and help him out.

Thanks,

– Juha

Posted by juha at Jun 18, 2013 13:50

I didn't but I'll try to redo the steps tomorrow.

Posted by dberenguer at Jun 18, 2013 14:38

I bring bad news.

Confirmed, building jzmq under Windows is a nightmare. Everything needs to be compiled from sources and, after all, it doesn't work with the version of ZMQ being used by lagarto. It happens that ZMQ 2.2 and 3.2 (and even some of their sub-versions) are not really interoperable, mainly when used from different computers. We also have the possibility to test JeroMQ, a pure Java implementation of ZeroMQ but I'm not confident. This said, I can only advise against the use of OR+Lagarto under Windows. I'm sorry to say this but we have very little choices until we develop a pure TCP/UDP-based protocol for our lagarto systems.

I'm sorry Neil.

Posted by dberenguer at Jun 20, 2013 12:37

Hmm sounds bad. So there's no versioning or tags for specific versions that could be checked out and built that are compatible?

Posted by juha at Jun 21, 2013 10:15

Yes, we could maybe build libzmq from old sources but then it's basically test and try... Still investigating... I honestly unrecommend ZeroMQ for multi-platform projects

Posted by dberenguer at Jun 21, 2013 13:04

I'm about to approve this patch to Pro release branches (well, actually already did so). I assume since I haven't heard anything further that the configuration (patch ORCJAVA-264) worked as expected?

Posted by juha at Aug 14, 2013 16:05
Document generated by Confluence on Jun 05, 2016 09:40