HAI OMNI Pro II Automation code

I am fairly new to programing myself, so I am not sure if this is the most efficient way to do this, but what I did was created an "All Off" link in UpStart. You can place only the devices you want to turn off in this link, then activate the link in programming.
 
madburg,

I'm not exactly sure where you stand in your programming, but here's a simple way to keep the a light set to a specific level at night:

Code:
1.  EVERY 5 MINUTES
			AND IF DARK
					THEN SET LIGHTING LEVEL Light TO 18%

2.  EVERY 5 MINUTES
			AND IF LIGHT
					THEN Light OFF


You could add an override flag if you wanted to prevent the light from changing automatically or to make sure the light is temporarily changed to a different level for a minimum time:

Code:
1.  EVERY 5 MINUTES
			AND IF Override Flg OFF
			AND IF DARK
					THEN SET LIGHTING LEVEL Light TO 18%

2.  EVERY 5 MINUTES
			AND IF Override Flg OFF
			AND IF LIGHT
					THEN Light OFF

3.  WHEN Driveway NOT READY
					THEN Override Flg ON FOR 5 MINUTES
					THEN SET LIGHTING LEVEL Light TO 100%


All of these will cause a command to be issued every five minutes. This is fine for ALC, but for powerline carrier systems you might only want to send the command if the state is not correct:

Code:
1.  EVERY 5 MINUTES
			AND IF Override Flg OFF
			AND IF DARK
			AND IF Light LEVEL IS NOT 18%
					THEN SET LIGHTING LEVEL Light TO 18%

2.  EVERY 5 MINUTES
			AND IF Override Flg OFF
			AND IF LIGHT
			AND IF Light ON
					THEN Light OFF

3.  WHEN Driveway NOT READY
					THEN Override Flg ON FOR 5 MINUTES
					THEN SET LIGHTING LEVEL Light TO 100%
 
Thanks Brian, now I am confussed.

Your program blocks is were I started, but was using SUNRISE/SUNSET and that caused my issue, I should have used If LIGHT/DARK as you stated.
But It was stated to NOT or LIMIT the use of the Trigger "EVERY"? and that is why the flag and User setting were recommended to be created and the programing blocks only executed should someone change the light level at the switch.

For me it is not who is right or wrong, but learning, and learning it well. And learning something that may not apply to my current situation is still very good, to know how to appy it in another situation :)

So my understanding is IF i where to use the "EVERY" 5 minutes from your suggestion above, it would at some point bog down the controller, if there are many blocks and alot of them use "EVERY". I do recall trying a few things and clearly they were not good program blocks, because it caused the controller to loop and it was awefully slow to show status, etc... and to write to the controller to remove the offending block/s took a LONG while. Once removed the controller was snappy again!

So I will have to assume that even though it required/used up 1-flag and 1-user setting, that "cornutt"'s approach should be the better way to go.

The question then became,. what are my options for "WHEN ALL OFF" is executed. See below or first page. Your suggestion would be most appreciated Brian, and/or anyone else.

So this has me thinking, what are the options in handling this type of ALL Triggers/conditions (I personal am on ALC lighting, but interested in all/most types as well).
This excersie is not complete as Entry Lights went OFF and stayed OFF, we only allow this at SUNRISE, right

OPTIONS:

1) We can move the ALC switch to another BRANCH if available and select "Enable All Off" to "NO" (I am sure this is the same for all if not most lighting standards that integrate with HAI Controllers, but named differently, like "ROOM", "UNIT", etc..)

2) A programming block I came up with, I hope this is not silly:
CODE
WHEN ALL OFF
AND IF DARK
THEN SET LIGHTING LEVEL Entry Hat Hat/Sconce Lighting TO 18%
It did work, all went OFF, and fired back up the Entry Lights to 18% (User Level is not affected by this so it to is still at "18" and ready for any new ON-types, until SUNRISE), but I dont know if this is the correct approach/optimized. Looking forward to comments.

3) %Other options%

4) %Other options%...
 
madburg,

The "EVERY 5 MINUTES" will not place a burden on the controller. It is simply a trigger that fires once every 5 minutes, which causes things to be checked. You could even speed this up without adding any appreciable load to the controller.

If you don't want a particular device to be affected by "all off", the easiest thing to do is move it to a different group of 16 with all off disabled for that group. Even without doing this, the programming I outlined above will take care of turning the light back on within 5 minutes. Again, the "every" interval could be reduced if faster response is desired.
 
Hi all, great looking forum, I'm 'Keen' to learn some tricks programming my OmniPro II. I have used the motion detectors to trigger a lights on command for certain times of the day, and I understand all the basics, but what I'm confused(and frustrated) about is how can I override the light manually with the switch so that if the light level I've set isn't what I want, how can I change the light level with the switch and override the motion detector?

This thread is the only thread that came up in my search, so I'm very curious how Brian wrote the OVERRIDE flag in his example, because that seems to be exactly what I'm looking for!


Thanks. ;)
 
Depending on exactly what you want to accomplish and the lighting system you are using, you could set the override flag on for a certain time every time you pressed the rocker switches on the wall switch. The rocker switches would let you changfe the setting to your liking, and setting the override flag would keep the motion detector from changing it.

Perhaps something like this:

Code:
WHEN Bedrm Lt ON PRESSED
WHEN Bedrm Lt OFF PRESSED
		  THEN Override Flg ON FOR 30 MINUTES
WHEN Motion Det NOT READY
	 AND IF Override Flg OFF
	 AND IF Bedrm Lt LEVEL IS NOT 70%
		  THEN SET LIGHTING LEVEL Bedrm Lt TO 70%
 
Sorry it took so long to get back here... Thanks for the reply Brian, I'll let you know how that goes!
 
Back
Top