Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rules priority #139

Closed
jmabad100 opened this issue Apr 20, 2020 · 5 comments
Closed

Rules priority #139

jmabad100 opened this issue Apr 20, 2020 · 5 comments
Assignees
Labels
🐛 bug Something isn't working

Comments

@jmabad100
Copy link

Good morning,

I have a question about the priority of the rules:
Is the priority of the rules in relation to their order? Rule 1 runs before rule 2?

I have the following rule settings:

Captura

I have verified that rule 3 is executed before rule 2. In my case, if it rains (rule 3) the blind is positioned at 25%, however, later than Astro Dusk, it should be closed completely due to rule 2.

Can anybody help me again?

Thank so much

@Hypnos3
Copy link
Collaborator

Hypnos3 commented Apr 20, 2020

Hallo,

there is a priority relation, but this is more difficult.
see https://github.com/rdmtc/node-red-contrib-sun-position/blob/master/blind_control.md#rules-execution-in-detail

in other words:

  • to the last rule of type "until" the rules will be evaluated from starting the first rule to the last rule of type until.
  • then the rules will be evaluated in reverse order

In your example the order of evaluating rules is following:

  • until civil Dawn rule 1 will be evaluated and only rule 1 gets active.
  • after civil Dawn the rules will be evaluated from last to first.
    • first rule 4
    • then rule 3
    • and then rule 2

@Hypnos3 Hypnos3 added the ❔ question Further information is requested label Apr 20, 2020
@jmabad100
Copy link
Author

Hallo

Sorry to ask you again, but I can't get the rules in order to be executed as I want.

Now I have order them as I show you in the screenshot

Captura de pantalla 2020-04-21 a las 16 35 49

and rule 3 and rule 2 are evaluated before than rule 4.(astro dusk)

How should I order them so that Astro Dusk is a higher priority than Rain and Rain&presence

One more time...thank so much

@Hypnos3
Copy link
Collaborator

Hypnos3 commented Apr 22, 2020

Have you try it? In the documentation is a flow for a simulation.

I'm currently due to the situation very busy, so it will take some time until I can have a look into it.

@Hypnos3 Hypnos3 self-assigned this Apr 23, 2020
@Hypnos3 Hypnos3 added 🐛 bug Something isn't working and removed ❔ question Further information is requested labels Apr 23, 2020
@Hypnos3 Hypnos3 mentioned this issue Apr 23, 2020
@Hypnos3
Copy link
Collaborator

Hypnos3 commented Apr 23, 2020

You are right this no longer works as expected.

That was the case, I don't remember why I changed that. I will change that back with the next release.

This is still under test. If you feel brave you can already install it from command line from the node-red directory with (standard Linux):

npm install node-red-contrib-sun-position@1.1.0-alpha

If you are using a Homematic CCU the commands are (to use from ssh login):

source /usr/local/addons/redmatic/home/.profile
cd /usr/local/addons/redmatic/var
npm install --save --no-package-lock --global-style --save-prefix="~" --production node-red-contrib-sun-position@1.1.0-alpha

@Hypnos3
Copy link
Collaborator

Hypnos3 commented May 20, 2020

solved with Version 1.1.0

@Hypnos3 Hypnos3 closed this as completed May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Development

No branches or pull requests

2 participants