Window Sensors

No, he’s just outlining that it makes equal sense to have one Thing for the Arduino and each window represented by a separate Channel. In the end, it doesn’t really matter and there are good reasons to do it one way or the other.

As I said, it’s the Items and Semantic Model that will really matter. The Things organization matters less so.

This sentence doesn’t really make sense as written. Perhaps there is just a miss-communication. First of all, drop “variable” from this discussion. The “holder of the state of the switch” is the openHAB Item. The Item doesn’t change, but its state might change based on messages from the device. As far as everything in openHAB is concerned, that Item represents that switch. But the current ON/OFF state of the switch is just one aspect of an Item. An Item is much more than just it’;s current state.

In OH, this is an Item. A variable is something else only applicable when writing rules.

Have you read through the Concepts section of the docs? Have you gone through the Getting Started Tutorial? Most of these concepts, and terms of art are discussed at length, with examples, in those parts of the docs. And the Getting Started Tutorial does follow your path. First you define the Inputs (i.e. the Things_, store them in memory (i.e. the Items), and then present them to the user (i.e. MainUI widgets).

Once you get past that point you have saving the data for historical analysis (i.e. persistence) and when X do Y type automation (i.e. rules, this part is not yet added to the Getting Started Tutorial).

Everyone’s home automation is bespoke. You will not find one end-to-end tutorial that presents everything you need in one coherent and copy-and-paste able thread. Instead, what you will find are a bunch of point tutorials and examples which you’ll have to string together to build your system. But you can’t do that if you don’t understand the openHAB basics, which is why it’s important to review those parts of the docs. If you’ve done that and still have questions please ask for clarification.

If you just try to jump in and copy stuff from here and there without understanding those basics it’s either going to take way longer to learn the system or you’ll just flat out fail.

There isn’t just one. openHAB is basically a development framework. You may as well ask if there is one place that holds the entirety of the code which Linux can run. While openHAB isn’t quite that complex, it’s not just a single application. You have:

  • Things: documented here though you will have to reference the binding docs for specific parameters and options
  • Items: documented here
  • Persistence: documented here
  • Transformations: documented here
  • Sitemaps: documented here

And all that’s before we even get to Rules. For writing rules you’ve a choice between half a dozen different languages, three of which come with openHAB by default: Rules DSL (documented here, Nashorn JavaScript (i.e. ECMAScript 5.1, sort of documented here and absolutely is native OH code, and Blockly whose reference guide is being merged into the docs as I write this, for now see here and which “compiles” to Nashorn JavaScript. If you choose one of the other supported rules languages, see that add-ons’s docs for it’s reference. If you are just getting started, I highly recommend the JavaScript Scripting add-on as the most complete, capable, and completely documented rules language.

And on top of all this, everything (except persistence strategy and transformations) can be done through MainUI where the syntax and language references and such simply doesn’t matter. OH is way easier to learn and set up through MainUI since its a whole lot more self documenting and options and capabilities are made much more apparent. Many even long time users of OH have moved off of text based config files to the UI for just that reason.

But I don’t think that’s your problem. The fact that you’ve figured out how to create MQTT Things from a .things file shows that you are perfectly capable of finding and using these references. Your problem is you don’t yet understand how it all works together. You need the bigger picture view which should come from the Concepts and Getting Started Tutorial.

Anyway, in my extensive experience on this forum, the amount of time waisted looking through the reference docs and fighting syntax errors and such way outweighs and time lost to “point-and-click” in MainUI, especially when you apply OH 3 Tips and Tricks. I would strongly recommend at least using MainUI to learn the OH concepts and how they work together before trying to dive right into fighting config files.

OH isn’t that kind of system. In your mind an Item is just a variable, but in OH it’s much much more than just a variable. If we were to call it a variable that would be stretching the definition beyond the breaking point. So we have a different term, Item. This is why that concepts section of the doc is so very important. If you approach openHAB as if it were just a programming framework and all you need is a reference doc to get buy, you will miss the bigger picture.