Meshbot's / Ezlo system how to tell if its "Night" or "Day"?

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.

This is the old Day or Night plugin on my Vera Plus

image

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.

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”.

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.

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”…

you need to enable offset as well (you can choose 1 sec)…

OK I tried it with NOT selected but the save is still greyed out

Hang on let me try that then. And I need to set both as after.

1 Like

add a value to a second for offset…so that it will be enabled…

1 Like

OK the save button is available now

Why do I need to enable an offset of 1 second ?

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

Exceptions by logic apply to “action”…
Do this, unless…

this does it.

Trigger:
When there is Motion…

Action
Turn the light on, BUT Not if its day time.

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.

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.

Some information here about the “Meshbot” option.

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.

does what I show you do the trick?

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.

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