[SOLVED] Paper UI Rules engine basics

  • Platform information:
    • Hardware: RP3
    • OS: openhabian
    • openHAB version:2.5
  • Issue of the topic: tried to configure a light to turn on at Sun set (astro binding) and turn off at 1:00 with no success.

What should be the correct configuration for this?

I can’t understand the difference between status changed, status updated, trigger channel fired, etc…

Any guide is available?







or use Jython:

1 Like

Welcome to the forum! The UI rule editor is a great place to start for people new to openHAB, but it is still being developed and has some quirks. It will be revamped in OH 3.0. You’re welcome to try it, but by far most people are using text based rules using either scripted automation with helper libraries (new rule engine) or the rules DSL (old rule engine). There is not much support in the forum for UI rules, but there’s not much to them either!

Install the Astro binding (ask if you need help), create Things, create Items, and link the Items to the Channels in the Things. Install the new rule engine. Open Paper UI and create a new rule that looks like this…


Then create another rule like this…


There are some cron expression calculators listed in the Trigger documentation (see below).

The documentation for triggers is here…

3 Likes

Ok, seems I totally missed the channels and virtual switches logic.

Will try this out.

Thanks a lot.

No virtual switches needed… that was just a test Item I had laying around. Replace Virtual_Switch_1 with the Item linked to your light.

Ok, so basically in my case I had to use trigger channel instead of status changed or updated.

And what’s the reason to use cron trigger?

Thanks

1 Like

The one rule will turn the light ON at sunset. The other one will turn the light OFF at 1:00AM. Isn’t that what you were looking to implement?

Exactly, and it actually works, thanks a lot!!!

1 Like