Complete dummies guide to laying out OpenHAB - Sitemaps, Items, Groups and Frames

5,606 views
Skip to first unread message

John Connolly

unread,
Jul 27, 2015, 7:03:32 PM7/27/15
to openhab
OpenHAB and I have a love/hate relationship.  It's an amazing product and I'm excited by its potential, but the pace at which I'm making progress isn't as fast as I'd like. I have a tech (but not programming) background and can find my way around Linux, but some of this stuff has me really baffled.

I've made some progress. So far, I've setup SONOS, a WeMo switch (but not sure how to make the WeMo motion work...), my Samsung SmartTV (kinda working) weather info pulled in from Weather Underground and yesterday a far-too-sensitive PIR sensor and weather/humidity from an Arduino reporting to mosquitto which turns the WeMo switch on/off far too often - some tweaking needed there.

While the Demo sitemap is helpful, it's also very confusing to interpret for the newbie.  It's great to showcase the power of OpenHAB, but for the beginner needing to build something completely from scratch, it's a challenge to tease apart.  The OpenHAB documentation (I feel) is also pitched at more advanced users/developers.

My current challenge is to organise my growing pile of items into groups and I've been looking for a guide on building a well structured sitemap from scratch.  I have a two storey home and would like to have groups that represent that, as well as (at this point) a group for weather/environment related items and one for security.

Does anyone know of a dummies guide to openhab sitemaps and groups or can offer a newbie some pointers? Ideally something that starts at the beginning...  Thanks in advance.

Also, I'd like to set up a few webview elements in order to display some images side by side...currently I've only been able to stack them on top of each other... :-/

Karsten Kaiser

unread,
Jul 28, 2015, 2:36:55 AM7/28/15
to ope...@googlegroups.com

Hi, no guide from me.

Just a comment on Wemo motion. This is not yet implemented. Only switch and insight switch are implemented so far.

Cheers
Karsten

--
You received this message because you are subscribed to the Google Groups "openhab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.
To view this discussion on the web visit https://groups.google.com/d/msgid/openhab/990e66e7-6cac-41b9-b9fe-6fe33e10ba33%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rich Koshak

unread,
Jul 28, 2015, 12:04:49 PM7/28/15
to openhab, john...@gmail.com
The closest thing you will find for a guide to the sitemaps is the wiki. Unfortunately everything is very technically focused. Every HA system is unique so I don't think a lot of generic advice for how to go about designing your sitemap has been written.

What I did was start very simply and build up the sitemap gradually through experimentation. I reviewed the demo sitemap and examples on the wiki to get a feel for what is possible and then gradually decided what I wanted out of my sitemap.

Your sources of information, in addition to the sitemap wiki will be the demo sitemap and the bottom portion of the wiki pages for the various bindings you are using, and the wiki pages with examples.

First all I had was a couple of lights with z-wave switches and a cobbled together raspberry pi based relay to control the garage. So I threw some switches on the sitemap and it worked.

Next I added some weather stuff. I started with the example in the demo but eventually took more from various examples in the wiki and the webview approach example at the bottom of the weather binding wiki.

Once I figured that out I decided I wanted some graphs for temp and humidity so I figured out how to get those on the sitemap. But I didn't want to have to see those at all times so I had to figure out how Frames work.

Then I wired in some door sensors, including the garage doors. At first I had all the sensors separated but I wanted to merge the garage door items so that the icon for the switch depended on the state of the sensor item. This proved a bit of a challenge but by reading the sitemap wiki I discovered the visibility property which let me simulate that by dropping two copies of the switch into the sitemap, one that is only visible when the garage door is open and the other when it is closed.

Over time I've experimented with different arrangements and even now I continue to tweak the sitemap layout as I learn new things I can do or as I live with it for a time and figure out easier ways to arrange things.

However, I should say that I'm finding the sitemap less and less useful over time. I've been using Tasker and most recently IFTTT integration to control things with my voice or widgets on my phone's desktop to save button presses.

My advice to you would be to start simply and figure out Frames. With Frames you can create a hierarchy (e.g. one group per floor). From there you will encounter things you want to do and you can research those things in the wiki, these forums, etc.

Rich

John Connolly

unread,
Jul 29, 2015, 3:22:41 AM7/29/15
to openhab, rlko...@gmail.com
Thanks, Rich.  Good advice.  I'll focus on frames this evening and get back to thew wiki and see what sense I can make of it all.  Things are gradually slipping into place...gradually.
Message has been deleted

Mark Bean

unread,
Aug 2, 2015, 3:09:28 PM8/2/15
to openhab
John,

I feel the same way and was even worse off a few weeks ago. A decade ago I had the aptitude for these technical things but have found myself not quite as good as I was in my younger years because I am no longer in the technology field.

I was thinking of creating my own beginners guide to getting up an running with openHAB an a RPI2. I just haven't found the time nor do I have all the answers to some important questions to give a guide that will be good enough. Maybe a few of us should work together and put something to help others who are in the same state.

As suggested, start slowly. Get one thing running and then keep adding and modifying. So far I have 29 Z-Wave devices. I got the easy ones running and then moved onto the battery devices. I still haven't figured out if my Aeon minimote is properly set for SUC/SIS inclusion or why I have nodes timout. I've been taking notes so I plan on sharing my success in case others come across similar issues.

The next issue that I came across was that my memory card filled up and crashed my RPi2. This happened twice before I figured out what to do. If you are using a Pi the I suggest you go into logback.xml and reduce the number of stored days and also go into jetty.xml and reduce the number of device logs as well (default is set to 90).

I'm currently trying to figure out how to run the designer on my desktop machine (Ubuntu) and modify the files on the Pi.

Good luck. There are others out there in the same place that you are but fortunately the community is friendly and helpful.

John Connolly

unread,
Aug 3, 2015, 8:06:28 PM8/3/15
to openhab
Mark,

Thanks for replying.  It's good to hear all types of experiences from both the experts, the amateurs and the absolute novices and especially those I'm on the same level as.

I'd been thinking of doing a newbies guide and would be keen to collaborate with you and others on that - maybe as an ebook or even a short course on Udemy or something?   I can see a course being really useful for those that know enough to be dangerous - the enthusiastic amateurs. A 101 type thing in straightforward language.  Something that starts with getting a brand new Pi through to getting simple switch, weather, presence, MQTT set up - the fundamentals. No assumption of previous skills or experience.

Maybe we should set up a Slack channel or something to coordinate?  I'm sure there would be others that would be keen to contribute.

Thanks for the other tips too...I've committed those to my notes for when I hit up against them myself.  I'll check my SD card capacity the second I get home! ;)

John

Thomas Bail

unread,
Aug 4, 2015, 3:32:55 AM8/4/15
to openhab
Hi There,

as all the other suggestions show: Think big start small and step by step. But i saw no real advice how to structure things. From my point of view i could give a short explanation how i organise things.

Sitemap
May side map is (at the moment) divides into three sections
  1. Status: This area show different status items like current date an time, Outside temperature, Information if windows or dorrs are open, ... If useful each of these item leads to the next level of information. If i click on open windows (Display only if there are any) will give me a list of all windows with their status
  2. Control: In this area i created topics like lighting, irrigation, pool, xmas (if it is xmas time, my wife loves openhab to organise her xmas illumination) maybe i add later a topic scenes or this will be anew section (time will show). In each of the topics the complete controll range is build for the topic. Irrigation enables me to start an stop irrigation, define durations an starttimes. Pool give me the ability to start the filter pump an watch the temperature of the pool
  3. Configuration/Settings/System: name changes from time to time. This section hold all the basiscs like a flag that decides g it is xmas time or if it is pool season. Bases on these the control area shows only what is necsessary. An this section holds all item with their different parameters. Example: A Switch for my stair light shows state, RSSI, if it is reachable, ... so i hvae the option to see the status of every item
Items
This is from my point of view very difficult, but i am close to organise it in a standard way. Each item has the same structur <Itemtype><Location>_<Identifier><Parameter>. Itemtype and location are two letter codes Switch = Sw, WindowContact = Wc; Bathroom = Br, Livingroom = Lr. So my Stailight switch is define as follows:

Group gSwCoStairLight "Treppenbeleuchtung"
Switch SwCoStairLightState "Treppenbeleuchtung" <myLightStairs> (gSwCoStairLight) {homematic="address=LEQ0266009, channel=1, parameter=STATE"}
Number SwCoStairLightRSSI "Signalstärke Treppenbeleuchtung [%d dbm]" <myRSSI> (gSwCoStairLight) {homematic="address=LEQ1311081, channel=0, parameter=RSSI_DEVICE"}
Number SwCoStairLightStickyUnreach "Erreichbarkeitsfehler Treppenbeleuchtung [%d]" (gSwCoStairLight) {homematic="address=LEQ1311081, channel=0, parameter=STICKY_UNREACH"}

As you see the is a gup that contain all items. This is used to display item in the configuration

Groups
Currently no structures idea.

Maybe this helps a little bit or someone has some more advanced ideas or standards.

Thomas

 
Reply all
Reply to author
Forward
0 new messages