Zwave scenes

Where can I find a decent bit of information about creating scenes? The habmin wiki is not real descriptive. I need to know how to set them up. Also, how about scheduling, setting up an item to come on at dusk and off at dawn, plus also a scene to happen at a certain time and off at a certain time. I am not asking how to do it, just a good bit of info to lead me in the correct direction.

OK, assuming you have your z-wave devices paired and you can see them in Habmin you are good to go. Now comes the fun part which is actually figuring out how to use openHAB. One of the really powerful things about openHAB is implementing the automation is almost completely independent from the details about how you talk to the device, in this case the z-wave.

So the things you describe as “scenes” are actually implemented using rules in openHAB. See the [Automation][1] section of the wiki to get started, in particular the [Rules page][2].

A few things to get you started.

  • Rules are event driven
  • The programming language of Rules is XBase, a scripting language that runs on Java, has access to Java class, but is not Java
  • Access to certain things like dusk, dawn, weather, will require installing and configuring additional addons (e.g. [Astro Binding][3] for dawn and dusk, [Weather binding][4] for weather info)
  • Start small and work towards complex. You are learning both a new language and a new framework. My first rule was to have two z-wave switches turn on 90 minutes before dusk and turn off at 11 pm. Now I have a couple hundred lines of rules just for controlling my lighting.
  • Post questions here when you get stuck.

Look at the [Demo rules][5] and the examples (bottom right of the menu along the right hand of the wiki pages) for inspiration for what is possible or something close to what you want to achieve. Also search this forum (and the old Google forums) as there are lots of code and configuration examples posted here as well. If you get stuck figuring out how to do something syntactically, look at the [Xtend documentation][6] which is another language built on XBase but has better docs. But be aware that you can do some things in Xtend (e.g. create classes, use a shorthand for creating lists and hashmaps) that you cannot do in openHAB rules.

Good luck!

Rich
[1]: https://github.com/openhab/openhab/wiki/Automation
[2]: https://github.com/openhab/openhab/wiki/Rules
[3]: https://github.com/openhab/openhab/wiki/Astro-binding
[4]: https://github.com/openhab/openhab/wiki/Weather-Binding
[5]: http://www.openhab.org/getting-started/
[6]: http://www.eclipse.org/xtend/documentation/index.html

1 Like

Thank you.