Wednesday 18 September 2013

RaZberry: Stripping down the configuration

The demo config is good as a demo and as a simple howto, but I'd rather keep the config simple and add things into it as needed. This keeps logs and the UI simple.



make sure you have shut down openhab (if running on a console, just use ctrl & c, and it will shut down tidily).

I leave the demo files there, just rename them so they don't get processed for now. I append '.orig' to all the config files in folders items, persistence, rules, scripts & sitemaps.

Now create a file openhab/configurations/items/mypi.items:
Group gKitchen      "kitchen"
Group gLiving       "living room"
Group allLights     "all lights"

Switch Light_living_main   "ceiling"    (gLiving,allLights) {zwave="2"}
Switch Light_living_down   "downlights" (gLiving,allLights) {zwave="3"}
and a file openhab/configurations/sitemaps/simplemap.sitemap:
sitemap demo label="Pootle's place"
{
    Frame label="rooms" {
        Group item=gKitchen label="kitchen" icon="firstfloor"
        Group item=gLiving label="living room" icon="firstfloor"
    }
}
restart openhab -
./start.sh
and point your browser at
http://<your pi nameoraddress here>:8080/openhab.app?sitemap=simplemap
and you should get a simple view. Once good feature is that you can change configuration files 'on the fly' and openhab will update itself, yo udon't need to restart it.



No comments:

Post a Comment