[SOLVED] Total disaster when trying on my own, with the great help of this community I got it running. Thanks

Thanks you very much, @vzorglub, this helped a lot - now I can change the .items file and it is being recognized in my openhab installation.

Thank you so much - it is working now - the .items file example from above helped a lot.

2 Likes

I also struggle with what’s the best thing for me. I understand some of the coding and making some rules and items.
I’ve got +/-30 items mostly z-wave actors running and things work and are stable.
What I find confusing is all the different ways you can reach a goal. I understand now the PaperUi is an extra feature designed later to make things easier. So is it also possible to run Openhab without using the PaperUi or any other Ui and configure thing only with .items and .rules etc? Would that be a better way so everything is not getting messed up.
I try now to just create a rule to make a light go on and off when my fibaro motion sensor sees movement and I just cannot get the job done.
The only reason I stick with Openhab and say to myself to try harder is that Openhab has the best Z-wave range I’ve ever seen. I don’t know why but it seems with Openhab every Z-wave actor has a better reach than when I used HA or Domoticz.
Anyway
I keep on trying, reading and learning

I am not sure how Thing Discovery would work without a UI. I use the recommended HABmin to discover Z-Wave things and then use text Items, rules, automations, etc.

My current recommendation remains unchanged:

  • Use PaperUI for Things creation and management. Take advantage of automatic discovery of Things where possible.

  • Use .items files to create and manage your Items. This is a soft recommendation, meaning it’s really not that big of a deal either way, but adding tags and metadata to Items is much easier in .items files right now. You cannot create Items that use OH 1.x version bindings in PaperUI, so using .items files guarantees consistency. Personally, I plan on migrating all my Items out of .items files as soon as we get some better support for metadata in the REST API.

  • Do not use Simple Mode. If you have it enabled right now, turn it off.

  • If you are an experienced developer, use Scripted Automation with the Helper Libraries. The Python libraries are the most mature but there is a lot of work going on for JavaScript too. If you are not a programmer, use the Rules DSL (i.e. .rules files). If your Rules needs are very simple, you can try the Next Gen Rules Engine and create very simple Rules in PaperUI, but beware that the docs and support for those are limited right now. In the future (beyond OH 3), Rules DSL will become deprecated.

  • Use HABPanel to create your day-to-day UI if you want more full control over how it looks and to support stuff outside of the standard. Use .sitemaps in all other cases. NOTE: in the past year the Android App has added HABPanel support. I don’t know about the iOS app.

Getting messed up how? I can’t possibly answer that without knowing what is “getting messed up.”

When you’ve tried and get stuck, create a new post, post the code you’ve tried, and ask for help. We are more than happy to help when you’ve shown some initiative to attempt to code it yourself. Also, be sure to look at the Design Pattern postings. There are lots of examples there. In this particular case, [Deprecated] Design Pattern: Motion Sensor Timer is a direct example of what you are trying to do.

2 Likes

That’s how i do it. Everything (including things) is done via files, my jsondb is completely empty. But i do not use zwave.

The only tasks i use PaperUI for is installing or uninstalling because these are one off tasks.

I have multiple instances of every thing:

  • 8 squeezeboxes
  • 8 kodi
  • 10 thermostats (15 valves)
  • 20 power plugs
  • around 15 motion detectors (2 types)
  • 40 zigbee bulbs (3 types)
  • around 20 window contacts
    etc.

Using files makes handling that stuff so much easier.

2 Likes

This is one of the biggest sources of problems that new folks encounter.
It is a little bit of a problem because it would be nice to streamline things for new people but the user interfaces are all things that were contributed by people and no one wants to throw away someone else’s hard work. As Rich stated, this whole application is written and maintained by volunteers .
As stated, Paper UI was basically never even fully finished and is not useful as a ‘user interface’ per se but… it provides a automated way of creating ‘things’. It also provides a quick easy way to configure your new thing and make sure it is online. As also stated things can be created manually with files but it is not a simple thing a new guy could do without much heartache and nashing of teeth ect.
Item file syntax is much easier to master, even for a noob and allows better control.

1 Like

I would suggest to combine your rules and Fibaro motion sensor parameters. If you want to switch on/off any time without consideration time, light etc you do not need rules at all. Zwave devices are able to control direct each other. In my case eaxample parameter 6 is at 240 sec. It means in case of FIbaro sensor, that it sends motion signal, than it switch off after 240 sec, but if it senses motion, this timer restarts in the device itself:


If you want to consider other devices, or time of the day, rule can look like this:

I tend to agree to some extent with the OP. I’m only starting with openHAB and yes, it is rather complex/intimidating.
This project reminds me of XBMC many years ago, when the developers started with the original Microsoft X-Box … it was a bit ‘painful’ to get it to work. Fast forward 15 years later, and today we have OSMC, which runs on multiple platforms, including the Raspberry Pi.
Not sure If l am willing to wait 15 years. This home automation ‘business’ is very cut-throat and many players (component manufacturers) are engaged, and each with their own devices and protocols. Difficult to know for sure who will succeed and who will go bankrupt. Ideally we should end up with few communication protocols only, but that would require the multiple OEMs to agree on standards … unlikely this will happen any time soon. Lastly, to many on this forum, this is a hobby for now, and like all hobbies, you can spend 30 mins a day, or your entire weekends on it. Good luck to those assuming the journey.

That is the whole point of openHAB, to bring all these different systems together.

4 Likes

I sympathise with the poster Johann Dornbach. Openhab is not easy. BUT ! it IS rewarding.
Well, I have been struggling for three months now just getting going. Simple Home set up of around 30 items and presently stuck at getting Openhab2 to turn HUGE incoming JSON messages from Snips.ai; in to MQTT commands in Openhab. I just want to turn on lights etc, using a PRIVATE (non-cloud) voice control. RULES are hard !
I am not a ‘programmer’ of any sort and, at 63 years old, I find it difficult, but I am getting there. Excited to learn all the time.
I absolutely rely on examples and Documentation posted by ALL others, and particularly thank [David_Graeff] [Maintainer] for his outstanding work.
Openhab IS the way forward for me, and all others who value Privacy in Home Automation. and I thank all concerned for supporting it.
IF there was a way to encourage maintainers through ‘donating’ to the Project; I would give generously.
Openhab2 (or even 3 when it arrives) is definitely worthwhile learning Openhab, and progressing it in this modern age of money-grabbing , Privacy invading, Data collecting, rotten Corporations. There are precious few alternatives.
Thank you all.

Sure there is:

1 Like

Thank you sihui
Joining today !!!

1 Like

Please don’t get stuck and spin your wheels. If you’ve shown some effort and get stuck we are happy to help. We won’t code it for you but if you show some effort we will bend over backwards to get you past your problem. We don’t want you to be frustrated and wasting your time.

The is a lot of great work going on to address this problem too. The Next Gen Rules Engine currently supports Scripted Automation which will allow those of us who are developers to code up reusable Rules and libraries that all you have to do is download and use. See Community — openHAB Helper Libraries documentation for the current set of precoded Rules and there are around a dozen more awaiting review before they are merged.

Right now PaperUI’s interface is pretty lame but you can do some simple Rules with it even now. In OH 3 PaperUI will be replaced and the Rules creation UI will become fairly usable. When that happens, you can build simple to moderately complex Rules (e.g. when this happens send command to that Item but only if this other Item is in X state) without touching actual code. And all those pre-built Rules and libraries at the link above can become a “Rule Template” that you just need to install and configure like you do with add-ons.

We’ve still a ways to go so don’t stop what you are doing now, but in the future Rules will become much easier to get started in and hopefully there will be a robust library of options to choose from for the complicated stuff.

1 Like

I have to agree with the OP. And don’t think days or weeks, think months. And every time you move to the next step, it is a step into the abyss.
His statement, “…WRONG “Beginners” documentation, which leads to a complete confusion…”, is spot on.

I feel the documentation is at such a high level that I can’t relate to how to use OpenHAB. Examples with explanations would be so, so helpful. What I tend to do is come up with keywords to search on that might provide partial solutions to use as examples. Mostly they are partial solutions and require “merging” with other partial solutions. And it seems like, for me, the partial solutions used different methods so merging is difficult. As a result my system is a Hodge Podge of PaperUI, items files, rules I can’t find any more but seem to be working (hope I don’t need to modify them), etc. I know someday I will have to unwind all this and make a sane system.

I wish I had seen Rich Koshak’s recommendations that he provided down around reply #21 or #22. Life would have been so easier.

OpenHAB reminds me of the old story about the guy that told his friend he was playing craps at a particular place. His friend replied that everyone knows that game is fixed. The guy replied yes, but it is the only game in town so he plays there.

OpenHAB remains the only way to play.

Anyone, and I mean pretty much anyone with any level of experience with OH is free and encouraged to correct anything that is wrong in any of the docs. There is a link at the bottom of every page in the docs that will take you straight to the github page where you can edit it in the browser and create a PR. See How to file an Issue which has more details.

But one thing to note is I’m unaware of anything that is wrong with the beginner’s documentation. For a time there was a bug in the Network binding which has been fixed for almost a year now that made some of the instructions not work. But the proper solution is to fix the bug, not “fix” the tutorial. The tutorial was correct. The code was broken.

2 Likes

I can fully confirm what has been said by rlkoshak. I became really frustrated after the first hours of trying, but when I turned to this forum and followed the advice, it worked out all very nicely for me.

Thank you rikoshak.
I had not see the python documentation examples, They will be useful once I study them.
Thank you for the encouragement in progressing.
I am learning so much, and having fun at the same time seeing the results.
Stay committed guys
Us old-timers appreciate your dedicated. generous input.to help us all.

I know that OH encourages corrections, etc. But I was in a state of so much confusion I wouldn’t know anything was wrong or how to fix it. I believe it was the Network binding problem that hit me. Buy I couldn’t tell that. I can’t say how many times I went “back to zero” uninstalled, reinstalled carefully following every step and failing.

I said OH was the only game in town. But it is also the best game in town. Wonderful things can be done using OH.

And thanks for your recommended methods back at post 20 or 21.

11 posts were split to a new topic: Help with rules syntax