Hi Mario,
You can create Items using PaperUI as well as define them in an .items file. For me only items defined in an .items-file were found from Eclipse SmartHome Designer. So I prefer defining the items there. But be aware that define the items manually in a file is more error-prone.
@sihui already showed how to define an Homematic Rollershutter-Item. Even if you define the item in a file, you can/should copy the connection-string from PaperUI. The following screenshot shows the channel of the Rollershutter-thing to control the Level.
Copy it using the red marked icon here or link it directly with PaperUI.
You address each item by its itemname. You can find it in PaperUI or as the 2nd entry of an item-definition in an items-file.
type itemname itemlabel <icon> (groups) { channel="..." }
Rollershutter AZRollo "Rollo [%s %%]" <blinds> { channel="homematic:HM-LC-Bl1PBU-FM:ccu:XXX1232112:1#LEVEL" }
So my name is AZRollo here.
In a rule you can listen to item-events in the when condition using:
- Item itemname changed or
- Item itemname received update or
- Item itemname received update to ON or
- Item itemname received command or
- Item itemname received command ON
In the then part of the rule you use the itemname followed by a dot and a function, e.g.:
- itemname.sendCommand(ON)
- itemname.postUpdate(OFF)
No, you don’t. Each time an items-, rule-, sitemaps-, persistens-file gets a new timestamp, openHAB updates/reloads its loaded configuration. The items and rules and so on will be reinitialized and validated.
As i mentioned before, you can use the itemname from the web-UI, but the SmartHome-Designer I have did not know it. But openHAB knows it, when the rule is activated.
You always should have a look to the logtail (using port 9001). This will give you a good feedback if rules or item-definitions are correct.
Hope that general information helps. @sihui already gave a good answer for your special case, but your questions seamed to be more general, too.
Regards
Malte