I’m runing openhabian (newest version / updated and upgraded yesterday) on a raspy 1.
I’ve installed the astro- and the z-wave - binding. They both work “as far”. Although i’ve searched the forum, the docs and the internet i’ve not found the correct syntax to create a rule (via rule engine) to combine the astro binding with my rollershutter.
the aim is to send the rollershutter up at sunrise and to send them down at sunset.
Problem is in the “when”- requirement. I’ve tried all the “item”-based when-Requirements (an item state, an item state is updated, even “an item receives a command”). … but all the status (up, on, …) won’t work. I think i need a status “Start” - but this is not given.
actually i just need a functioning example of a astro binding thing, channel, item in the paper ui rule engine.
Hmm, never tried to “click” rules. As @rlkoshak replied, this is experimental and you better should not go for it. Too much uncertainty, too little users able to help you with.
Better use a text editor to create .rules files. Don’t edit them in place but copy them there once you think you’re done editing.
Check openhab.log for syntax errors whenever you copy or edit them.
Here’s a complex rule to automate shading you can peek at.
Note, what I posted is code for the Rules Engine. What you are showing screen shots of is the Experimental Rules Engine sometimes called Next Generation Rules Engine. It is called “experimental” for a reason. It is not yet complete and documentation for it is lacking. If you want to use this engine you are largely on your own at this point.
Not really, except that in the Rules Engine one usually uses “START” all caps as the Event. Perhaps you need to do the same in the Experimental Rules Engine and use END.
thank you for the clarification of the wording.
Do you know, if there is support for the “old” Rules Engine in the latest Paper UI.
I’m asking because I did not find it in Paper UI, only the new Rules Engine (Experimental) is an installable Add-on .
Well it’s not just wording but a substantial difference. “The” (“old”) rules engine works well and everyone’s using it while likely noone will be able to support with the experimental one and clearly no beginner should try. No you cannot access the rule engine from PaperUI.
You could install ESH Designer which provides support to create rules in graphical form, but noone’s really using that either.
In the end, rules are text, so everybody goes for textual editing sooner or later anyway, so while you probably don’t want to hear that, better start there right away. Most common advice is to use VS code extensions, see [here].(https://docs.openhab.org/configuration/editors.html).
o.k. i’m no developer but mastered some rules via nano. Maybe it’s time to do the next step: i’ve installed Visual Studio Code now; also the openhab-extension. … and … and. … mmh - is it still correct to connect to my openhabian-raspberry via samba (like '2013: How to set up visual studio with openhab extension with samba?) … or is there a comfortable assistent-function meanwhile?
Depends on your setup. For VS code extension to run on Windows, yes you need file level access so you need to share your openHAB’s box rules directory somehow, and the easiest way is Samba.
You could of course also use nano or vim locally on your OH box, but then you don’t get the syntax checking etc.
There is no support for it in PaperUI. The Rules Engine is just there. There is nothing extra to install and PaperUI has nothing to do with it at this time (PaperUI is always growing, perhaps someday?).
I thought that was only in Habmin. I don’t remember there being a graphical rules builder in ESHD. Though the point is still the same, neither ESHD nor the Rules builder in Habmin have been updated and are horribly out of date with the latest OH and should not be used.
o.k. the rules via “clicking”/Experimental Rules Engine haven’t worked - but a rule via Standard-Editor (NANO in my case) worked for the channel “civilDawn”. If the “civilDusk”-rule works as well this evening i will mark this topic as “solved”.
But by the way: can anyone tell my what “civilDusk/civilDawn” really means? where ist the difference to sunrise/sunset?
The start of each marks the beginning and the end marks the end of the twilight period for each of the different ways to calculate sunrise and sunset.
At the high level, the differences have to do with where the center of the sun is relative to the horizon that determines when the event starts.
According to the Wikipedia article Astro dawn starts first (center of the sun is 18 degrees below the horizon) and ends when Nautical dawn starts (12 degrees below the horizon) and that ends when Civil dawn starts (6 degrees below the horizon) and everything ends when the center of the sun reaches the horizon (0 degrees).
Assuming the Astro library and the wikipedia article are in agreement, I would assume that the Astro library is using 0 degrees for sunrise and sunset.
I think most people around here use civil dawn and dusk.
I never looked into this before. It was a nice rabbit hole to go down.