This page last changed on Jan 03, 2014 by estegenburgs.

I have seen already a lot of strange situations here in OpenRemote, if we speak about Drool's rules. But today I encountered a very stupid problem, at least I think so
Now I'm using my Raspberry PI as a controller for heating of house, since our big heating pump's logic system failed. And the problem:
In OpenRemote there are two sliders, which define the minimum and maximum temperature in one of the rooms.

2 sliders are built like this (Command -> Sensor -> Slider):
Get_Istabas_T_min -> Istabas_T_min_Status -> Slider name 1
Get_Istabas_T_max -> Istabas_T_max_Status -> Slider name 1
And "Istabas_T" is the sensor for room's temperature (it uses 1-Wire protocol).

package org.openremote.controller.protocol

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

rule "Initialisation"
when eval ( true ) then
execute.command("Get_Istabas_T_min", 18);
execute.command("Get_Istabas_T_max", 19);

rule "Conergy-1"
Event( source == "Istabas_T_min_Status", $min : value )
Event( source == "Istabas_T", value <= $min )
execute.command( "Conergy_ON" );

rule "Conergy-2"
timer (cron: * * 7-5 * * ?) when
Event( source == "Istabas_T_max_Status", $max : value )
Event( source == "Istabas_T", value >= $max && value < "100" )
execute.command( "Conergy_OFF" );

Everything works fine, unless OpenRemote is synchronised or my device is restarted. What happens after synchronisation is the following. Both sliders get their initial values (18 & 19) but rules "Conergy-1" and "Conergy-2" doesn't meet the conditions and doesn't start, although they should. At this moment if I manually change sliders' values, let's say to the same "18" or "19", rules "Conergy-1" and "Conergy-2" work. So, where is the problem about these sliders?

Also I wanted to know, how to avoid "N/A" readings? I found a way how to change "N/A" to anything if it's a custom sensor, even a valid value, but it isn't the best solution, and that's why in rule "Conergy-2" I have:
&& value < "100" .

Kind regards,

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