That was it. The variables were not in the proper place. Thank you for the response. It worked fine with only set of variables. But failed when adding these. I bit of carry over of improper implementation from my initial setup.
I am getting the same error (“missing EOF at switch”) in my rules definition. However, I have put the declarations into the first line of the rules file:
Ok, thanks. But deleting the definitions leads to another error:“The method or field SW_Global_Alarm is undefined”
How can I define variables of the Type “switch” in rules that are globally accessible within the entire rules file?
I tried to use the command “var SW_Global_Alarm” instead but then I get another error (“The method or field state is undefined for the type null”) when trying to access the state property of the switch.
Items that you define in either .items files or using PaperUI are globally available in all rules files. If you defined the switch item SW_Global_alarm using PaperUI then the error you see in the Designer is “normal” and can be safely ignored.
The Designer is not aware of any items which are defined using PaperUI. It only knows about items which are defined in items files.