This page last changed on Jan 04, 2014 by nickez.

Hi.

I am new to Openremote.
I have installed it on a qnap with java installed. But i can't get the rules to work?
I want to turn on lights on 16:30 but nothing happens. Is there any log file somewhere i look into and see whats wrong?
I attached a picture on the rule i created.

/Niclas


Hello Niclas.

I am also new to Open Remote, but after 2 months I am ready to test my knowledge and help you. Please call me Skype: novoster

You need to add sensors, then read its state, and then switch off or on depending on the sensor state or with help of switch. And finally add timer to this construction. And possibly some additional buttons. Rules are more complecated then you may think.

And for the future I don't recommend you to have any command or sensor in the project if you don't need it because the rule will behave itself unpredictable! If you need to test something - register separate account and make experiments there.

If working rule stopped to work correctly - it means you have mistakes in other new rules. Never forget it. All these things make writing of the code really hard work to do. But simple rules are working fine and easy to make.

Posted by sattva at Jan 05, 2014 01:40

Which version of Java did you install? The version of Drools used in OpenRemote does not work with "Java 7".
For my Synology I did install "Java SE for Embeded 6"
If you had that correct, double check if the command "Ljus Kok" is spelled the same as in the command definition.
PS: This rule won't fire at 22:45 as it's name suggests but at the time given in the timer expression. Guess you were experimenting

Posted by pz1 at Jan 05, 2014 08:38

Thank you for quick answer.

I have Java version 6.0.22 installed. I was wonder about the command definition. You mean the command name? i attach another image that shows everything i done to make the light go on 16:30. The command work perfectly when press the light button on my iPad.

/Best regards Niclas

Posted by nickez at Jan 05, 2014 12:20

Can't see anything wrong with this.
(I could not find the reply option in your post below so I answered here.)

Posted by pz1 at Jan 05, 2014 13:01

Can you show Light Button? Screenshot or photo picture?

Posted by sattva at Jan 05, 2014 20:26

This looks much better.
use at start and at the end same

Unknown macro: { code }

but without spaces.

rule "Lights off"
timer (cron: 0 30 16 * * ?) // 16:30
when
  eval (true)
then
  execute.command ("Ljus Kok");
end
Posted by sattva at Jan 05, 2014 21:07
Document generated by Confluence on Jun 05, 2016 09:38