I’ve been trying all, have followed the rules manual, tried both methods, but still I’m not able to get sendCommand to work. even if I put it before or after the item
Below is an example of my latest testing rule:
rule MasterOFF
when
Item Master_Off changed
then
if (Master_Off.state == OFF)
sendCommand(DiningTable, OFF) // Here is where I get the undefined error
end
I have also tried:
rule MasterOFF
when
Item Master_Off changed
then
if (Master_Off.state == OFF)
DiningTable.sendCommand(OFF) // and here again I get the undefined error
end
Here is the log output:
2017-10-16 00:16:32.306 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'all_off.rules'
2017-10-16 00:16:32.337 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'all_off.rules' is either empty or cannot be parsed correctly!
However none of them works.
Any help would be much appreciated.
The log-entries you listed are normal if you use Samba to update your files. The reasons have been discussed in a few threads here on the forum, but essentially, OH tries to load the files while they are still being saved. You can just ignore them