Getting Started

Over the last month or so I have been working on OH1 and finally got it working with zwave and some XBMC statuses. I believe this is only the beginning of my HA journey.
What I am worried about is doing all work under OH1 and then having to migrate to OH2 at some point. That being the case, as a beginner, I decided to try to start with OH2 instead, but it is extremely difficult for me. (I can’t get any bindings to show up) I have read documentation on Things and don’t even know where to start.
I have placed the JAR files in the addons folder but my understanding is that they won’t show up without Things for them configured. Again I don’t even know where to start.
Should I continue with OH1 or do more research and figure out OH2. How much longer will OH1 even be supported and eventually mandate my migration to OH2 if I want to further my project? If the answer is to move to OH2 I will need some help, or more available documentation on how to set up a Thing, as the current documentation is limited.
Thanks for any guidance.

OH2 is a little different - it has some different concepts (eg Things), but, if you’re using an OH1 binding, then it will work the same way as it does in OH1…

Let’s cover this point first…

If these are OH1 bindings, and by “show up” you mean you want to see them in the bindings list in the UI, then you won’t see this. As above, an OH1 binding will only do what it does in OH1 - so in this case, it doesn’t show up in the OH2 bindings list in the UI. Likewise, items needs to be configured in the same way as they are in OH1 - ie by manually editing the items text files.

Things are devices (or something else that could be physical, or maybe a website, or something). So, if we compare it to a ZWave device, the device is a thing. So for 4 in 1 sensor - this is the thing, and the 4 sensors are the items. Just to confuse you slightly, in the OH2 model, bindings actually export channels, not items - channels are effectively the ‘real’ output from a device (thing) - voltages, temperatures, light switches etc, and you then attach a channel to an iteml. An item is in then what you use in your sitemaps, rules etc…

Well, if you’re running OH1 bindings under OH2, then it works the same, so you can use OH2 runtime in the same way as OH1. I suspect your problem (or part of it) is that you’re expecting OH1 bindings to work like an OH2 binding, and this isn’t the case. I can understand how this is confusing, but I think if you remember this point, you might get a better understanding of what’s happening…

In my system, I use OH2 but still have a lot of OH1 bindings etc. I configure all the OH1 ‘stuff’ in the normal way (editing the text files) and configure all the OH2 bindings through the user interfaces - it works pretty well, so long as you keep in mind the difference in OH1 and OH2 bindings, otherwise, you’ll get confused…

I hope that helps a little at least…

Chris

So if I read what you said correctly I can use OH1 bindings and items and a sitemap without worrying about Things? Are those only for OH2 bindings?
If that is true then I can just set it up exactly like OH1 but using OH2 runtime, and then use the Classic UI?
If not then how do I configure a thing, using an OH1 binding and how do I know what channels an “item” supports or uses? If you could give me an example of a Thing of say a zwave switch or contact, and then it’s corresponding item, I think I could be on my way.
If I don’t need Things for OH1 bindings then I am already on my way and understand completely.
As of right now I only have a smart outlet, a garage contact sensor (may change that to a tilt sensor), XBMC binding for title and status, and working on Prowl notifications. If I need Things for these then how do I specify the channels for the smart outlet or tilt sensor? I can play with XBMC and whatnot, later.
Thanks again. If I am right then it definitely does make OH2 easier to understand.

Yes - that’s correct.

Yep - correct again…[quote=“thatoneguy99, post:3, topic:4228”]
If I need Things for these then how do I specify the channels for the smart outlet or tilt sensor?
[/quote]
No - if they are OH1 bindings (maybe ZWave?) then you just configure them the same as for OH1.

Cheers
Chris

Exactly the information I needed. Thank you! Oh one more thing. I know you put the config files in the services folder. Is there a specific naming format for them or can I just put them all in an openhab.cfg file?

They need to be the same name as the ‘first part’ of the config in OH1, which is normally the name of the binding…

So, in OH1, where there was a single config file, and you had a config line like follows-:
zwave:port=XXXXX

you would now put this into a file called zwave.cfg, and just put the port=XXXXX part in the file. The filename is effectively used as the first part of the config - this is important as it defines the binding name…

(I hope that makes sense).

Yes it makes sense.