This page last changed on Nov 30, 2014 by rmcerlain.

I've just got the Date and Time to work using minutesUntilSunset on my mac.
I have copied it over to a Raspberry Pi, soft float with 1.6, it now does not work.
Has anyone any ideas? Log and rule below.

DEBUG 2014-11-30 12:24:24,135 : Created object model for Command( ID = 431, Type = datetime, Properties :

Unknown macro: {timezone=Australia/Perth, name=minutesUntilSunset, command=minutesUntilSunset, longitude=115.8589, latitude=-31.9522}
DEBUG 2014-11-30 12:24:24,156 : Initializing event processor: Drools Rule Engine
DEBUG 2014-11-30 12:24:24,398 : Adding Rule 'modeler_rules.drl'...
ERROR 2014-11-30 12:28:05,925 : Rule definition 'modeler_rules.drl' could not be deployed. See errors below.
ERROR 2014-11-30 12:28:06,033 : Unable to resolve ObjectType 'CustomState'
ERROR 2014-11-30 12:28:06,035 : Unable to resolve ObjectType 'CustomState'
ERROR 2014-11-30 12:28:06,250 : There was an error parsing the rule definition 'modeler_rules.drl' : Could not parse knowledge.
java.lang.IllegalArgumentException: Could not parse knowledge.
at org.drools.builder.impl.KnowledgeBuilderImpl.newKnowledgeBase(
at org.openremote.controller.statuscache.rules.RuleEngine.getValidKnowledgePackages(
at org.openremote.controller.statuscache.rules.RuleEngine.start(
at org.openremote.controller.statuscache.EventProcessorChain.start(

package org.openremote.controller.model.event

global org.openremote.controller.statuscache.CommandFacade execute;
global org.openremote.controller.statuscache.SwitchFacade switches;
import org.openremote.controller.protocol.*;

rule "SunSet"
CustomState( source=="minutesUntilSunset", value=="1435")
execute.command("12.8 On");
System.out.println ( "SunDown" );

Document generated by Confluence on Jun 05, 2016 09:37