This page last changed on Dec 31, 2014 by dorakiki.

Hi,
I use OpenRemote from some months and now I have a little problem with one of my Rules.
The rules "Controllo valvola acqua ON" and "Controllo valvola acqua OFF" simply controlled a water valve (OPEN COM CLOSE) by two actuator's channel.
I've created une Virtual Switch to control valve state and the rule actioning fisical valve channel.
The problem is that when I set Switch ON or OFF, the rule engine go down because not received ACK from "Stato valvola acqua".
Can you help me?

-------------------------- RULES: ----------------------------------

package org.openremote.controller.protocol

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

import org.openremote.controller.model.event.*
import java.util.concurrent.TimeUnit
import org.openremote.controller.protocol.*

rule "Controllo valvola acqua ON"
when
Event ( source == "Stato valvola acqua", value == "on" )
then
execute.command ( "Apri ACQUA (OFF)" );
TimeUnit.MILLISECONDS.sleep(200);
execute.command ( "Chiudi ACQUA (OFF)" );
TimeUnit.MILLISECONDS.sleep(200);
execute.command ( "Apri ACQUA (ON)" );
TimeUnit.MILLISECONDS.sleep(60000);
execute.command ( "Apri ACQUA (OFF)" );
end

rule "Controllo valvola acqua OFF"
when
Event ( source == "Stato valvola acqua", value == "off" )
then
execute.command ( "Apri ACQUA (OFF)" );
TimeUnit.MILLISECONDS.sleep(200);
execute.command ( "Chiudi ACQUA (OFF)" );
TimeUnit.MILLISECONDS.sleep(200);
execute.command ( "Chiudi ACQUA (ON)" );
TimeUnit.MILLISECONDS.sleep(60000);
execute.command ( "Chiudi ACQUA (OFF)" );
end

-------------------------- LOG (stderrout.log): ----------------------------------

ERROR Polling Sensor Thread ID = 5847153, Name ='Stato valvola acqua': Service failed
org.openremote.controller.protocol.knx.ip.KnxIpException: Service failed, no ACK
at org.openremote.controller.protocol.knx.ip.IpTunnelClient.service(IpTunnelClient.java:84)
at org.openremote.controller.protocol.knx.KNXIpConnectionManager$KNXConnectionImpl.service(KNXIpConnectionManager.java:850)
at org.openremote.controller.protocol.knx.KNXIpConnectionManager$KNXConnectionImpl.send(KNXIpConnectionManager.java:670)
at org.openremote.controller.protocol.knx.KNXCommand.write(KNXCommand.java:328)
at org.openremote.controller.protocol.knx.GroupValueWrite.send(GroupValueWrite.java:117)
at org.openremote.controller.model.Command.execute(Command.java:230)
at org.openremote.controller.model.Command.execute(Command.java:199)
at org.openremote.controller.statuscache.CommandFacade.command(CommandFacade.java:80)
at org.openremote.controller.statuscache.CommandFacade.command(CommandFacade.java:57)
at org.openremote.controller.protocol.Rule_Controllo_valvola_acqua_ON_0.defaultConsequence(Rule_Controllo_valvola_acqua_ON_0.java:9)
at org.openremote.controller.protocol.Rule_Controllo_valvola_acqua_ON_0DefaultConsequenceInvoker.evaluate(Rule_Controllo_valvola_acqua_ON_0DefaultConsequenceInvoker.java:25)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:917)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:856)
at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1071)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:785)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:751)
at org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:218)
at org.openremote.controller.statuscache.rules.RuleEngine.push(RuleEngine.java:177)
at org.openremote.controller.statuscache.EventProcessorChain.push(EventProcessorChain.java:188)
at org.openremote.controller.statuscache.StatusCache.update(StatusCache.java:260)
at org.openremote.controller.model.sensor.Sensor.update(Sensor.java:342)
at org.openremote.controller.model.sensor.Sensor$DeviceReader.run(Sensor.java:608)
at java.lang.Thread.run(Thread.java:701)

-------------------------- XML (controller.xml): ----------------------------------

<command id="972" protocol="virtual">
<property name="address" value="switchb" />
<property name="command" value="on" />
<property name="name" value="Valvola acqua ON" />
</command>
<command id="973" protocol="virtual">
<property name="address" value="switchb" />
<property name="command" value="off" />
<property name="name" value="Valvola acqua OFF" />
</command>
<command id="971" protocol="virtual">
<property name="address" value="switchb" />
<property name="command" value="status" />
<property name="name" value="Valvola acqua STATUS" />
</command>
<sensor id="5847153" name="Stato valvola acqua" type="switch">
<include type="command" ref="971" />
<state name="on" />
<state name="off" />
</sensor>

<command id="855" protocol="knx">
<property name="command" value="on" />
<property name="groupAddress" value="2/4/1" />
<property name="DPT" value="1.001" />
<property name="name" value="Chiudi ACQUA (ON)" />
</command>
<command id="854" protocol="knx">
<property name="command" value="off" />
<property name="groupAddress" value="2/4/1" />
<property name="DPT" value="1.001" />
<property name="name" value="Chiudi ACQUA (OFF)" />
</command>
<command id="843" protocol="knx">
<property name="command" value="status" />
<property name="groupAddress" value="2/4/3" />
<property name="DPT" value="1.001" />
<property name="name" value="Chiudi valvola ACQUA feedback" />
</command>
<sensor id="5112287" name="Stato Chiudi valvola ACQUA" type="switch">
<include type="command" ref="843" />
<state name="on" />
<state name="off" />
</sensor>

<command id="848" protocol="knx">
<property name="command" value="on" />
<property name="groupAddress" value="2/4/0" />
<property name="DPT" value="1.001" />
<property name="name" value="Apri ACQUA (ON)" />
</command>
<command id="849" protocol="knx">
<property name="command" value="off" />
<property name="groupAddress" value="2/4/0" />
<property name="DPT" value="1.001" />
<property name="name" value="Apri ACQUA (OFF)" />
</command>
<command id="844" protocol="knx">
<property name="command" value="status" />
<property name="groupAddress" value="2/4/2" />
<property name="DPT" value="1.001" />
<property name="name" value="Apri valvola ACQUA feedback" />
</command>
<sensor id="5112286" name="Stato Apri valvola ACQUA" type="switch">
<include type="command" ref="844" />
<state name="on" />
<state name="off" />
</sensor>

Hi Adam,

I am seeing the same error:
KnxIpException: Service failed, no ACK

Have you managed to resolve it?

Thanks

Gideon

Posted by gheinert at Oct 29, 2015 12:01
Document generated by Confluence on Jun 05, 2016 09:39