Jump to content

Do you think in terms of Events or Things?


carealtor

Recommended Posts

Posted

I have several Things that turn on in relation to sunset.  Porch lights, landscape lights, hall lights, pool lights, etc.  Some of these Things turn off at a certain time, some when we go to bed, some in relation to sunrise.

Should I program in terms of Events:

     Program 1:  at sunset, turn on all the Things

     Program 2:  at bedtime, turn off some Things

     Program 3:  at time x, turn off some Things

     Program 4:  at sunrise, turn off some Things

 

Or should I program in terms of Things:

     Program 1:  from sunset to bedtime, turn on some Things, otherwise turn those Things off.

     Program 2:  from sunset to time x, turn on some Things, otherwise turn those Things off.

     Program 3:  from sunset to sunrise, turn on some Things, otherwise turn those Things off.

 

Both will work, but I wonder which approach is "better".

 

Posted

People seem to think in terms of "things" -- and as long as the conditions and actions associated with "things" are relatively simple, the "thing" approach offered by the ISY's programming language works just fine.

If you have non-simple things -- lots of other conditions, or where the "then" or "else" clause has waits embedded in them, etc, then you quickly find that ISY's programming language just makes your head explode.  In those cases, programming in terms of "events" is almost always easier, and almost always results in fewer "surprises" (aka bugs).  At least in my experience -- I suspect this varies based on how one learned logic and coding, and may even vary depending on how individual brains are wired...

Posted (edited)

As a rule, I think of events, in that the programming model is event programming. However, the exception to this is I think of things first in the divisions I have created for my devices: Outdoor, Mainfloor, Backyard, Master BR, Basement, etc. I tend to group programs in these categories as well (at least logically, if not physically). So I have a set of programs that control outdoor lighting (minus the "backyard"): one that runs at sunset, one that runs at bedtime, one that runs in the morning, etc. But I may have another group of programs for my Master BR that run at bedtime and/or morning - I don't try to combine those with the outdoor lighting programs that run on the same event.

Edited by Goose66
Posted

I am not sure that I think either way, and not sure I even understand the difference.  My personal approach is to minimize number and size of programs, in that order.

Best approach is what fits your way of thinking and is easiest to understand after time has passed and you need to go back and look at your programs.

Posted

When creating programs, I consider triggers as either events or devices. What happens usually occurs to devices and/or scenes. There are variations, but I don't consider any of them  as things. But how you think is really personal. I don't see how it matters.

Posted

I purposely avoided the use of the term Device in my question and used Things instead.  I suppose I could used the term Scenes, but it needs to be understood that the Scene that would get turned on at a certain event is not necessarily (and probably isn't ) the same Scene that gets turned off at some other Event.

 

Guest
This topic is now closed to further replies.

×
×
  • Create New...