In my Items file, I have an entry like:
/* Scene AV Off */
String SceneAVOff "AV Off" <sofa> (GScene) {mios="unit:house,scene:120/status", autoupdate="false"}
Contact SceneAVOffActive "Active [%s]" <sofa> {mios="unit:house,scene:120/active"}
and the Generator generates something similar for each Scene that you have.
When you activate this scene in Vera (via a Remote Control, for example) these Items will make certain State transitions.
Roughly, for a successful Scene execution, SceneAVOff will make the transition: NONE, PENDING, SUCCESS, NONE.
Of course, if the scene execution fails, then the path will be different.
Similarly, if the Vera Scene has been setup to “be Active” (Scene Advanced Tab, Scene is ‘active’ option) then the state of SceneAVOffActive will follow that (going from OPEN to CLOSED, for example)
Using this, you can write Rules in openHAB that fire “[tt]when[/tt]” an "[tt]Item "[/tt] “[tt]changed from [/tt]” “[tt] to [/tt]” .
The rest should be able to follow the rest of the openHAB Rules examples, depending upon what you want to do.
To run a Scene in Vera, via an openHAB Rule, you can simply send any command to the Scene.
eg. sendCommand(SceneAVOff, ON)
The ON (no quotes) is a built-in command constant, so you can equally send it OFF and it will fire also since the MiOS Binding runs the Scene, for a given Scene Item, when a Command it sent to it.
That said, Vera is buggy. During these transitions you’ll find that Vera’s “Scene” attribute will repeat some of these changes, and the transition looks more like: NONE, PENDING, PENDING, PENDING, PENDING, PENDING, SUCCESS, SUCCESS, SUCCESS, SUCCESS, SUCCESS, NONE, NONE, NONE, NONE, NONE, NONE, NONE
Something similar occurs for the “Active” attribute.