This page last changed on Oct 16, 2013 by nbewhm4.

I was trying to send a command to an ISY9945 to execute a program. In the designer, the protocol selected was ISY-99, the address was /rest/programs/0003/, and the command was runThen. ( - which runs fine in a browser). However it seems that OR is building a different string - seems its prefixing my address with /rest/nodes, so the command that is sent is /rest/nodes/rest/programs/0003/runThen, which gives a 404 error as it cant find the page.

I tried ../../rest, but that gets sent as /rest/nodes/../../rest which also doesnt work.

Is there a way to modify the prefix and remove the nodes piece or have I done something wrong ?

Thanks in advance.

It seems to be hard-coded.

Do not have an immediate solution for this, and haven't looked at the source in sufficient detail yet to think of how to patch it.

Something for the to-do list but if anyone from the community has ideas/patches to propose, please send them here.

Posted by juha at Oct 22, 2013 20:43

Would be nice if either the UI could select whether or not your were addressing a node or program and pad accordingly, or just let the user pad the code....thoughts?

Posted by nbewhm4 at Oct 30, 2013 02:32

Could make sense, seems reasonable solution.

Unfortunately I won't be able to push this as a priority to fix myself right now. It will have to wait for a later date when I have more time available. I'd appreciate if someone from the community would step up to and look at creating a patch. If you've got Java skills yourself Andrew, let me know.

Posted by juha at Oct 30, 2013 20:36

Old programmer, Cobol, Powerbuilder, VB, Windows API's, a little Java. If someone could spend 10 - 20 min chatting about your source code, version control, where I can find the source code and scripts to build/test etc I could take a look and maybe propose a solution....

Posted by nbewhm4 at Nov 05, 2013 00:51

To get started:

1) Install ant build tool from somewhere in your path (Java build tool, roughly equivalent to make)

2) checkout a stable tag from subversion, e.g.

> svn co

(assume svn is already installed somewhere in your path – installation details depends on your operating system/choice of shell)

3) go to the root of the directory you just checked out, there's a file build.xml there. Now type:

> ant

The build will start, you will find the compiled binaries in the /output directory.

The source code you want to start with is in src/org/openremote/controller/protocol/isy99/, the hardcoded path in the snippet below:

  // Implements ExecutableCommand -----------------------------------------------------------------

  private String formWriteCommandUrl()
    StringBuilder url = new StringBuilder();
    String effectiveCommand = command;
    String effectiveCommandParam = commandParam;

    // Compensate for the somewhat odd ISY-99 dimming behavior. Using the DON command
    // with 0 as a parameter does not actually cause the device to be turned off. Using
    // the DOF command will, though.
    if (ISY99_ON_COMMAND.equals(command) && commandParam != null)
      if (commandParam.equals("0"))
        effectiveCommand = ISY99_OFF_COMMAND;
        effectiveCommandParam = null;
        effectiveCommandParam = "" + ((Integer.valueOf(commandParam) * ISY99_MAX_DIMMER_VALUE)/100);

    url.append(address.replaceAll(" ", "%20"));
    if (effectiveCommandParam != null && !effectiveCommandParam.equals(""))

    return url.toString();

The other relevant code is in /src/org/openremote/controller/protocol/isy99/ which is basically driving the parameterization of the former – something you'd eventually want to look at once you've managed to check how the modified URLs in the Isy99Command code works. There's some documentation on how these two classes relate to each other here: Developer How To - Adding Your Own Protocol to OpenRemote Boss 2.0 Controller (although some of it may be outdated by now).

If you're a skype user, you can send your contact details to me with id 'juhalindfors' in case you have questions you prefer to cover on chat.


Let me know if you need something more.

– Juha

Posted by juha at Nov 05, 2013 16:03

Thanks, I will try and take a look over the holidays.

Posted by nbewhm4 at Dec 18, 2013 14:13

I followed your instructions to build a new version, this is the result from the ant command:
Buildfile: C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\build.xml

delete Deleting directory C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\build
delete Deleting directory C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\output
delete Deleting directory C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\web\WEB-INF\classes

mkdir Created dir: C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\build
mkdir Created dir: C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\build\testcontainer
mkdir Created dir: C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\build\testcontainer\war
mkdir Created dir: C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\build\testcontainer\webapps
mkdir Created dir: C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\build\testcontainer\logs
mkdir Created dir: C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\build\testcontainer\logs\dev
mkdir Created dir: C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\build\testcontainer\logs\knx
mkdir Created dir: C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\build\testcontainer\logs\onewire
mkdir Created dir: C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\build\testcontainer\logs\isy99
mkdir Created dir: C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\build\testcontainer\logs\lagarto
mkdir Created dir: C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\output
copy Copying 40 files to C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\build\lib
copy Copying 5 files to C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\build\lib\native

echo --------------------------------------------------------------------
echo Compiling project classes (full)...
echo --------------------------------------------------------------------
mkdir Created dir: C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\build\classes
copy Copying 13 files to C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\build\classes
copy Copying 13 files to C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\web\WEB-INF\classes
copy Copying 37 files to C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\build\classes
javac C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\build.xml:302: warning: 'includeantruntime' was not set, defaulting to buil
d.sysclasspath=last; set to false for repeatable builds
javac Compiling 554 source files to C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\build\classes
javac C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\src\org\openremote\controller\protocol\upnp\ warning: DO
MParser is internal proprietary API and may be removed in a future release
javac import;
javac ^
javac C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\src\org\openremote\controller\protocol\upnp\ warning: DO
MParser is internal proprietary API and may be removed in a future release
javac DOMParser parser = new DOMParser();
javac ^
javac C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\src\org\openremote\controller\protocol\upnp\ warning: DO
MParser is internal proprietary API and may be removed in a future release
javac DOMParser parser = new DOMParser();
javac ^
javac Note: Some input files use or override a deprecated API.
javac Note: Recompile with -Xlint:deprecation for details.
javac Note: Some input files use unchecked or unsafe operations.
javac Note: Recompile with -Xlint:unchecked for details.
javac 3 warnings

echo --------------------------------------------------------------------
echo Creating Controller Runtime...
echo --------------------------------------------------------------------
mkdir Created dir: C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\output\OpenRemote-Controller-2.1.0_SNAPSHOT-2013-06-17
copy Copying 43 files to C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\output\OpenRemote-Controller-2.1.0_SNAPSHOT-2013-06-17
copy Copied 20 empty directories to 13 empty directories under C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\output\OpenRemote
copy Copying 39 files to C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\output\OpenRemote-Controller-2.1.0_SNAPSHOT-2013-06-17\
copy Copied 12 empty directories to 1 empty directory under C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\output\OpenRemote-Co
copy Copying 821 files to C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\output\OpenRemote-Controller-2.1.0_SNAPSHOT-2013-06-17
zip Building zip: C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\output\OpenRemote-Controller-2.1.0_SNAPSHOT-2013-06-17\webapp
copy Copying 45 files to C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\output\OpenRemote-Controller-2.1.0_SNAPSHOT-2013-06-17\
zip Building zip: C:\OpenRemoteSource\Controller_2_1_0_FM_SNAPSHOT-20130617\output\

Total time: 1 minute 49 seconds


I then copied the files over to my test box, and ran the bat file, but I get the following Unsupported major.minor version error. Not sure what to try next to resolve ?

C:\OpenRemote\bin>openremote run
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_45
Jan 10, 2014 4:26:38 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not fou
nd on the java.library.path: C:\OpenRemote\webapps\controller\WEB-INF\lib\native
Jan 10, 2014 4:26:38 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jan 10, 2014 4:26:38 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 896 ms
Jan 10, 2014 4:26:38 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jan 10, 2014 4:26:38 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
Jan 10, 2014 4:26:38 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive webconsole.war
Jan 10, 2014 4:27:32 PM org.apache.tomcat.util.modeler.Registry registerComponent
SEVERE: Null component Catalina:type=JspMonitor,name=jsp,WebModule=//localhost/controller,J2EEApplication=none,J2EEServe
Jan 10, 2014 4:27:32 PM org.apache.catalina.startup.HostConfig deployDirectory
SEVERE: Error deploying web application directory controller
java.lang.UnsupportedClassVersionError: org/openremote/controller/bootstrap/servlet/LogInitialization : Unsupported majo
r.minor version 51.0 (unable to load class org.openremote.controller.bootstrap.servlet.LogInitialization)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(
at org.apache.catalina.loader.WebappClassLoader.findClass(
at org.apache.catalina.loader.WebappClassLoader.loadClass(
at org.apache.catalina.loader.WebappClassLoader.loadClass(
at org.apache.catalina.startup.WebAnnotationSet.loadClassAnnotation(
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationListenerAnnotations(
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(
at org.apache.catalina.startup.ContextConfig.start(
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
at org.apache.catalina.core.StandardContext.start(
at org.apache.catalina.core.ContainerBase.addChildInternal(
at org.apache.catalina.core.ContainerBase.addChild(
at org.apache.catalina.core.StandardHost.addChild(
at org.apache.catalina.startup.HostConfig.deployDirectory(
at org.apache.catalina.startup.HostConfig.deployDirectories(
at org.apache.catalina.startup.HostConfig.deployApps(
at org.apache.catalina.startup.HostConfig.start(
at org.apache.catalina.startup.HostConfig.lifecycleEvent(
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
at org.apache.catalina.core.ContainerBase.start(
at org.apache.catalina.core.StandardHost.start(
at org.apache.catalina.core.ContainerBase.start(
at org.apache.catalina.core.StandardEngine.start(
at org.apache.catalina.core.StandardService.start(
at org.apache.catalina.core.StandardServer.start(
at org.apache.catalina.startup.Catalina.start(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.apache.catalina.startup.Bootstrap.start(
at org.apache.catalina.startup.Bootstrap.main(
Jan 10, 2014 4:27:33 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jan 10, 2014 4:27:33 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 54962 ms

Any help much appreciated.

Posted by nbewhm4 at Jan 10, 2014 21:41
Document generated by Confluence on Jun 05, 2016 09:31