This page last changed on Jan 10, 2015 by wuytens.

hi all,

i am trying to do the following

package org.openremote.controller.model.event
global org.openremote.controller.statuscache.CommandFacade execute;
global org.openremote.controller.statuscache.SwitchFacade switches;
global org.openremote.controller.statuscache.LevelFacade levels;
import org.openremote.controller.protocol.*;
import java.util.concurrent.TimeUnit;

rule "Muziek Bureau on" when
Event( source == "Muziek Bureau Status" , value=="on" )
then
execute.command( "Muziek Volume","0");
TimeUnit.MILLISECONDS.sleep(100);
execute.command( "Muziek Volume","20");
execute.command("SQB Bureau aan");
end

rule "Muziek Bureau off" when
Event( source == "Muziek Bureau Status" , value=="off" )
then
execute.command( "Muziek Volume","0");
execute.command("SQB Bureau uit");
end

rule "Muziek alles Uit" when
Event( source == "Muziek Alles Uit" , value=="off" )
then
execute.command( "Muziek Bureau off");
end

now if i start my music by sending on the the "muziek bureau status" then the music starts
if i stop the music by sending off to "muziek bureau status" the music stops

but if i stop the music by sending off to "muziek alles uit" then i see in my knx he sends the "Muziek bureau status" to off but now the problem arrises

the "muziek bureau status" is off but the rules "muziek bureau off" is not executed

but even worse if i then send back the "muziek bureau on" it does not start because the openremote still thinks it is still active

so what i want is to update the status in a rule and that openremote know this internally as well. Now it only sends it to the knx bus

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