We have a huge list of tutorials and how-to's for all kind of situations in our Community board.
To get you started, here are some interactive exercises.
Subject: The Inbox page
Objectives:- Manually scan for new Things
- Add Things from the Inbox
Subject: The Things page
Objectives:- Add & configure a Thing manually
- Add a Channel to a Thing
- Automatically link Items
Subject: Channel & Item
Objectives:- Add items
- Semantically tag an Item
- Link Channels to Items
At this point you can already control your devices via openHAB Apps.
Subject: Rules
Objectives:- Create a rule that changes an item state.
- Add a condition to it.
- Let it be triggered by an item state.
Subject: Scheduled-Tasks
Objectives:- Create a one-shot or periodic task.
- Create a rule and let it be triggered by a scheduled task.
Subject: Item expire timer
Objectives:- Setup an item expire timer
- Create a rule that is triggered by an item state (motion sensor) and resets an expire timer.
Rules are essential for advanced functionality
Some bindings add additional Actions that can be performed by Rules. Expect even more bindings to support Actions in the future.
You still have scratched only the surface. If you want to integrate a new kind of device via generic HTTP, MQTT, CoAP bindings, you also want to read about Transformations.
We have only used the graphical rule editor so far, to connect triggers with actions on optional conditions. openHAB also has the concept of Standalone Scripts. A script can interact with your system, an external service, your hardware or just perform item state changes. It can as also react to triggers on conditions, like Rules.
Scripts allow you to master any complex scenarios with openHAB.Further reading:
Further reading for binding developers: