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

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