After a long struggle transferring my 5 years old OR implementation to version 2.6 I can point out few important things from my experience:
There is a bug in the Designer while trying to correct some details in an image. If you keep the same name and erase the original one from the list and load a new one, it will load it from the cache the old one.
You must change the name as well. In the name, the “_” are ignored so don’t add it to the name as you will end up loading the same image from cache of the designer server.
I have moved the rule file from a Ubuntu machine to MAC OS. From some reason some of the " signs became " (itelic) which are not the same ASCII. This derives to an error all over the place as structure is not maintained.
You will get an error on the last line.
Rules files splitting is not working. I have to move all rules to the base rule file.
As for rues emailing, the below link does not work as there is no eMail protocol in the basic 2.6 product.
Rules are no case sensitive to KNX - if you test a state in a rule to “ON” it must be “ON” command in the Designer as well as “on” will generate an error.
Java 8 has changed its Time and Date class location so I guess this is why I got the following warning:
All rules are loaded fine with no errors but nothing fires at all.
Under 2.1.4 it is till running fine.
So I have added 3 extra rules that shows something is basically wrong, probably under OS X.
//----------------------------------------------------------------------------------------
rule “Drools test on”
no-loop true
duration 900
timer(cron: 0/20 * * * * ?)
when
eval (true)
then
// execute.command(“Water Tank (ON)”);
execute.command(“V_Water_Tank_60M (ON)”); // Turn On 60 Minutes Button
System.out.println (_TimeStamp()+ “: #1 Water Tank Relay activated !!”);
end
//----------------------------------------------------------------------------------------
rule “Verify_Water_Tank_Manually_De-Activated”
when
Switch (source==“V_Water_Tank_60M (Sensor)”, value==“OFF”)
then
System.out.println(_TimeStamp()+ “: #4 Water Tank Test !!”);
end
//------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
rule “Drools test off”
timer(cron: 10/20 * * * * ?)
when
eval (true)
then
execute.command(“V_Water_Tank_60M (OFF)”); // Turn On 60 Minutes Button
System.out.println (_TimeStamp()+ “: #1 Water Tank Relay De-activated !!”);
end
//---------------------------------------------------------------------------------------
Only 2 rules fire OK and I get a message on the Terminal as expected. Since the Event (or Switch) use the same device, the mid rule should have fired but it does not.
The button of the panel that is linked to the device is working as per the rules with no problem.
It is true for all rules of my system.
This one was added just to prove the point.
It looks like a bug which prevents OS X from being used!!!
בתאריך יום ראשון, 25 בפברואר 2018 בשעה 18:21:30 UTC+2, מאת Nir Aviry:
rule “Verify_Water_Tank_Manually_De-Activated”
when
Switch (source==“V_Water_Tank_60M (Sensor)”, $value:value)
then
System.out.println(_TimeStamp()+ ": #4 Water Tank Test !! "+$value.toString()); end
This should trigger and show you the actual value of sensor. I suspect that it is lower case.
I would first try to simplify the cron statement to trigger every second and check which line on the LHS is blocking (my guess would be $wt_factors: Water_Tank_Factors(Acc_lock_reading==0) ).
What I remember some time ago was that custom facts did not like underscores in field definitions. Maybe renaming Acc_lock_reading to AccLockReading would help?
I have discovereed two other issues I did not see any post on.
When running Android console it works but I get an error on the terminal as follows:
ERROR [HTTP-Thread-3]: Failed to execute REST API call ‘http://10.0.0.39:8688/controller/rest/commands’ : Invalid URL format – expected format ‘/rest/devices/{device_name}/commands?name={command_name}’, got ‘/rest/commandsnull’.
Although all rules are working each boot I get an error as follows:
Warning: Could not get charToByteConverterClass!
It appears just after the end of the rules engine load is done.
Any ideas?
בתאריך יום ראשון, 25 בפברואר 2018 בשעה 18:21:30 UTC+2, מאת Nir Aviry: