Incrementing an outside awning with Reactor/MSR
-
A. There's nothing Reactor cannot do!
B. I think you'll want to open the ▼ chevron (in Reactor for Vera) or ... button (in MSR) next to one of your AND conditions.
C. Use "Pulse" to have them momentarily go TRUE (for, say 1-2 seconds) every 120 seconds.
D. The pulsing will automatically cease once either condition stops being TRUE.I hope this helps!
-
A. There's nothing Reactor cannot do!
B. I think you'll want to open the ▼ chevron (in Reactor for Vera) or ... button (in MSR) next to one of your AND conditions.
C. Use "Pulse" to have them momentarily go TRUE (for, say 1-2 seconds) every 120 seconds.
D. The pulsing will automatically cease once either condition stops being TRUE.I hope this helps!
-
My only idea involves using trigonometry and time to compute an angle, then scale everything to the travel extents of your awning. Hardly practical!
Probably a much easier way. Will chew on this a while.
Hints:- https://api.sunrise-sunset.org/json?lat=36.7201600&lng=-4.4203400&date=today gives free JSON responses that include solar noon
- You can compute that just as readily by knowing sunrise and sunset times, and your latitude.
- In my "SiteSensor" thread, this formula would likewise provide Solar Noon for the specified lat/lon location:
Sn
:=openWx.sys.sunrise + floor((openWx.sys.sunset - openWx.sys.sunrise) / 2)
I'll expand on how you could use this to modulate the awning position tomorrow.
-
MSR also has native sun calcs. I guess I need to expose some of those features more, eh?
-
No matter which source you use (MSR's built-in sunrise/sunset feature is probably optimal!), here's some back-of-the-napkin thoughts on how to calculate when and how to adjust your awning throughout the morning, assuming you start the process at Sunrise:
Rule Expressions:
shade_range
= (<shade_max> - <shade_min>)
elapsed_time
= floor((<sunset_time> - <sunrise_time>) / 2)
shade_move_per_cycle
= N
cycle_interval
= floor(<elapsed_time> / (<shade_range>/N))Then in your Rule's Set Action:
[INTERVAL] [EVERY] [<cycle_interval> seconds]
[ENTITY ACTION] [MOVE SHADE] [N steps]NOTE: THIS IS ALL PSEUDO-CODE. I leave the actual formulae as an exercise for the reader.
-
Sun angle is now part of a new "Sun Information" entity that will be published by the System Controller.
-
Whoa, sweet! I know my out of left field suggestions might be a bit too much at times, but is there any chance that MSR will track statistics such as how often a particular rule runs during a given time span?
And how will users ultimately be notified if circular logic causes a rule to run excessively? Perhaps it is premature to be asking about that. -
Sun angle is now part of a new "Sun Information" entity that will be published by the System Controller.
@toggledbits said in Incrementing an outside awning with Reactor/MSR:
Sun angle is now part of a new "Sun Information" entity that will be published by the System Controller.
All great replies and food for thought. I played around with the heliotrope plugin with PLEG, as I mentioned previously but couldn't make it work - but reactor is a different beast.
Any chance of exposing the sun & moon functions ( I assume that Moon functions are also present) in Reactor as well as MSR? -
It doesn't have moon functions yet. Tell me how you want to use them.
-
Sounds good. When you figure out what your logic inputs need to be to make it work the way you want, let me know and we can talk about maybe getting those implemented.