Questions about writing rules

Hello All,
I am currently trying to write a rule that will process some xml that is returned by an http request (using openhab 1.0). While going through this learning exercise I have come up with the following questions I hope someone can answer for me.
1: When writing rules, how do you know what imports to include at the top of the file?
2: Can I import any java library?
3: Is there a list of imports that are available that i can use?
4: When you write a rule like this

when
    item (item name) trigger
then
    (do something)
end

How do you know what triggers are available for that item?

Thanks for your help
Regards
Stuart

Hey!

1: If you use a special datatype or method not covered by the imports you already have, you need to include the import. The Designer will help you understand that better.

4: https://github.com/openhab/openhab/wiki/Rules#rule-triggers

1 Like