i‘m a beginner with openhab and I‘m working on a alarm system. I have a question to items. I am using contact items for representig the alarm sensors on doors and windows and the main routine seems to work but i need some additional informations for each contact item e.g. Which alarm zome, start delay, alarm delay, homezone, …
I want to use this informations in the represented rule.
Is it possible to add this informations to the item definition and how?
If not, how is the best was to add additional informations to the items?
Not directly. An Item can only have a state and a Contact Item can only have OPEN/CLOSED/NULL as a state.
Typically, this information would be encoded in the Item name or in other Items. For example, the alarm zone would be part of the Item’s name. Alternatively or in addition you can add all the Contacts for a given zone to a Group.
For the other information, you need to use a combination of Groups and separate Items.