System.out.println - where does it go?

Hoping someone can help with this query

I am try to debug why one of my rules is not working using System.out.println, but I cannot find where this output goes,

I am running Controller 2.6 on a Raspberry pi with the below rules file.

The rules in question are SkyPowerOn, and SkyPowerOff.

SkypowerOn works successfully, but SkyPowerOff does not seem to work, the only difference being that the Command is a Macro, whereas the powerOn

command is a simple command (TCP/IP) I have added the System.out.println(s) to try to debug it but where I expected the output to be

in openremote/logs/container/standardoutput.log this is not present, and there is no output on the screen.

package org.openremote.controller.protocol

global org.openremote.controller.statuscache.CommandFacade execute;
global org.openremote.controller.statuscache.SwitchFacade switches;

import java.util.;

import org.openremote.controller.model.event.*;

rule “Evening”

timer (cron: 0 30 22 * * ?) when eval(true) then



rule “Morning”

timer (cron: 0 0 8 * * ?) when eval(true) then



rule “SkyPowerOn” when

Event( source == “VirtualSensor”, value == “on”)
System.out.println(“Running PWRONSKY”);


rule “SkyPowerOff” when

Event( source == “VirtualSensor”, value == “off”)

System.out.println(“Running Sky Off”);


That might be more simple than you expect to answer.

"Macros can't be used / called / executed within rules"

What you might want to look at instead is a solution that one of my clients funded.

The "Alarm" protocol Cron expressions can be changed in the UI, and the executed commands can be cascaded with delays.

It was written with this kind of situation in mind.

This how to guide (written by the protocol programmer) details everything you need to know. :-


thanks for the prompt reply, I can get round that by embedding the macro commands into by IR server but as a matter of interest (and for future use) where does the

System.out.println() string go, I added it to the working Command as well but no joy in finding the output.

No problem.

I'm far from an expert, but I think...

The system print in string appears in the command screen when OpenRemote is run with the 'run' command rather than 'start'

Does that help at all?

Thanks Stuart

I found some output in logs/container/stderrorout.log which proved the rule was running, I have moved the macro code into my IR server (which is just Arduino code) so

that resolves the issue.

Once again thanks for the help

Ian Pollard

Thanks Ian

That's very useful information.

I'll take a look at my own log file now :wink:


I Have the same System.out.println problem.

I have migrated from Ubuntu 12.2 and OR 2.1.4 to 2.6 Beta 3.

with the old one all was working OK.

With the new one none of the System.out.println commands are showing anything in the terminal. I use the run option.

It also seems like rules are running with no errors during load time but rules are not functioning at all.

I am using OS X 10.13.4 on a MAC Mini.

I need some help here.

בתאריך יום שלישי, 12 בספטמבר 2017 בשעה 18:44:20 UTC+3, מאת Ian Pollard:

I have found out that in some cases the System.out.println goes to the log folder under sdterrout.log.

I think it is when you run OR with Start and when you start with Run it runs to the Terminal.

בתאריך יום שלישי, 12 בספטמבר 2017 בשעה 18:44:20 UTC+3, מאת Ian Pollard: