cw-kid
September 20, 2022, 10:22am
1
How do you work out if its Day or Night in the Ezlo system ?
In Vera we had the Day or Night plugin or we could use luup.is_night()
in our LUA code.
Now in MSR I use a “reference” rule with just this trigger to work out if its night time or not.
Its Day time now so the rule says false for day and it would be true for night etc.
Then in my other rules I reference the “Night” rule in their Constraints (Conditions) using the RuleState option like this.
I wanted to try and setup a rule in Meshbot’s to turn on my porch entrance light if motion is detected but only if its “Night”
Thanks.
cw-kid
September 20, 2022, 10:37am
2
This is the old Day or Night plugin on my Vera Plus
Not sure exactly how it works, but it works out if its Day or Night based on your controllers locale settings.
Just been told by a dev “We only have sunset for now. We can add other sun states”.
So looks like its not currently possible.
Also there is no “Between” logic operator in Meshbot’s currently.
melih
September 20, 2022, 11:21am
3
Special Time of The Day Node has the Sunrise and Sunset Capability.
You can use the “Exception” capability in the “Action” section
Where you can “AND” a group where if its “After Sunset” and “NOT after Sunrise”.
cw-kid
September 20, 2022, 1:45pm
4
Thanks
I tried it this way to create an in “between” type “Night” global reference rule.
However the save button is greyed out and I cannot save the rule.
Same also with just one trigger in the rule, save greyed out.
The dev said the following:
"How do you decide night ? İn my opinion you can say “after sunset” so isn’t it subjective.
So it is possible in Meshbots.
And you can do the same global night Meshbot and reference it in other Meshbots
And you can “AND” after sunset and “before sunrise” and get the between effect."
So he is right, its just a different way of doing it / thinking about it in Meshbot’s vs MSR.
melih
September 20, 2022, 1:52pm
5
as I mentioned previously one of them should be a “NOT”…otherwise you are overwriting the logic hence the system is greyed out…and both should be “after”…
melih
September 20, 2022, 1:55pm
6
you need to enable offset as well (you can choose 1 sec)…
cw-kid
September 20, 2022, 1:56pm
7
OK I tried it with NOT selected but the save is still greyed out
cw-kid
September 20, 2022, 1:57pm
8
Hang on let me try that then. And I need to set both as after.
1 Like
melih
September 20, 2022, 1:57pm
9
add a value to a second for offset…so that it will be enabled…
1 Like
cw-kid
September 20, 2022, 1:59pm
10
OK the save button is available now
Why do I need to enable an offset of 1 second ?
cw-kid
September 20, 2022, 2:08pm
11
OK so now I have a “Night” global reference rule.
This is now a second new rule I am trying to create, to turn on my light when motion is detected but only at “Night” etc.
I don’t understand the “Constraint / Condition” part.
There is no “Conditions” section in Meshbot’s unlike MSR much to my dislike. So I have to put it in the trigger instead right.
I selected Meshbot and then selected my rule named “Reference - Night” but I don’t know what to then select in this drop down box.
In MSR my global reference rules are just either True or False.
Same condition in MSR
melih
September 20, 2022, 2:34pm
12
Exceptions by logic apply to “action”…
Do this, unless…
melih
September 20, 2022, 2:37pm
13
this does it.
Trigger:
When there is Motion…
Action
Turn the light on, BUT Not if its day time.
cw-kid
September 20, 2022, 2:40pm
14
Sorry I don’t understand. “Exceptions by logic apply to “action”…”
I don’t want any actions in my “global reference” rule to determine if its “Night”.
Which is why for the rule named “Reference - Night” I just used the triggers as in the screen shot above.
The issue now is I don’t know what to do in my second rule for the “Condition” and to use the “Reference - Night” rule as a check for if its night or not ?
And the screen shot you just posted makes sense to me. But that is not using a “Global Reference” rule for Night.
Its just one rule etc.
melih
September 20, 2022, 2:44pm
15
I thought you are trying to achieve this?
There is no need to create complex rules/global references with Ezlo, if you just want to achieve the above.
If there is a different use case you want to achieve, please let me know.
cw-kid
September 20, 2022, 2:49pm
16
Some information here about the “Meshbot” option.
cw-kid
September 20, 2022, 2:50pm
17
Yes I was, but I also wanted to see if I could use a global reference rule for “Night” and use that in several different other rules in their “Conditions” like we do in MSR.
melih
September 20, 2022, 2:51pm
18
cw-kid:
Yes I was,
does what I show you do the trick?
cw-kid
September 20, 2022, 2:53pm
19
I expect what you have shown would work yes.
But Osman said I could also use reference rules, but seems I can’t or don’t know how to do that in Meshbot’s.
cw-kid
September 20, 2022, 2:54pm
20
Why work out if its night over and over in lots of different rules?
When I can have just one reference rule for “Night” and just use that in all my other rules.
1 Like