HAI UPB Consecutive Command Delay

broconne

Active Member
I have two blocks of code that are execute when the mudroom door is opened. The first block is here:
Code:
1. WHEN Mudroom Door NOT READY
   THEN Front Door BEEP 1
   THEN MudroomAlert ON FOR 1 MINUTE

The second block is here:
Code:
6. WHEN Mudroom Door NOT READY
  AND IF DARK
   THEN Mudroom Light ON FOR 5 MINUTES
   THEN Sink Light ON FOR 10 MINUTES

I am experiencing a several second delay between when the Mudroom light turns on and the sink light turning on.
I have noticed that in between the mudroom light turning on and the sink light turning on the front door beep occurs. The sink light turns on almost immediately after the front door beep. How long should it take to run consecutive UPB commands or is there something in my code w/ the two different blocks that is causing the delay?
 
I'd put the block with the lights above the other one, it will move the UPB commands up in the internal queue, that might help slightly.

The UPB commands are sent to a queue so they don't collide with one another on the UPB net.
If there is another transmission on the line when these are trying to be sent there will be a delay, and there will be a delay between successive UPB commands. There is also a UPB retry setting and a delay setting imn PCAccess. That last one affects the amount of time the Omni waits before sending status requests.

Are you using HLC? If the two lights are in different rooms, there may be several seconds delay if the Omni is requesting status of one room before turning the other light on. I'd fire up UPStart and look at the log to see what exactly is happening on the UPB net.

There will be some delay depending on how much code the system is processing.
The zone open delay is a few miliseconds, the UPB delay can be longer if there is other activity.
I usually see a second or two delay between a zone or occupancy sensor and the light coming on.
Sometimes it's much faster.

You could put both lights on a link so they trip simultaneously, call the link "Welcome Home" or something similar.
You'd have to use either a flag as a timer to turn them off or is you have switches with internal timers, like the SA 1140 switches, you can use those to turn the lights off after receiving the link.

Also, there is a door beep function in the firmware that is part of the operating system.
If the "Entry Chime" (IIRC) is turned on (default is ON) in PCAccess, it will beep without the code segment.
 
Desert_AIP,
As always, thanks for the help.

I'd put the block with the lights above the other one, it will move the UPB commands up in the internal queue, that might help slightly.
I will give that a shot.

The UPB commands are sent to a queue so they don't collide with one another on the UPB net. If there is another transmission on the line when these are trying to be sent there will be a delay, and there will be a delay between successive UPB commands. There is also a UPB retry setting and a delay setting imn PCAccess. That last one affects the amount of time the Omni waits before sending status requests.
I timed it and it seems to be exactly 5 seconds, which is the length of time the status delay. Oddly when I set the status delay to zero to disable it, as described in the documentation, it still takes 5 seconds.

Are you using HLC? If the two lights are in different rooms, there may be several seconds delay if the Omni is requesting status of one room before turning the other light on.
Yes I am using HLC. That seems unfortunate that the HAI panel can't keep a list of outstanding status requests and process other lighting commands while waiting.


I'd fire up UPStart and look at the log to see what exactly is happening on the UPB net. There will be some delay depending on how much code the system is processing. The zone open delay is a few miliseconds, the UPB delay can be longer if there is other activity. I usually see a second or two delay between a zone or occupancy sensor and the light coming on. Sometimes it's much faster.
A second or two seems fine. 5 feels like an eternity.



You could put both lights on a link so they trip simultaneously, call the link "Welcome Home" or something similar. You'd have to use either a flag as a timer to turn them off or is you have switches with internal timers, like the SA 1140 switches, you can use those to turn the lights off after receiving the link.
Are you aware on any good documents or have an example of doing links with HAI/HLC? I know there are some rules about which links are actually available.

Also, there is a door beep function in the firmware that is part of the operating system. If the "Entry Chime" (IIRC) is turned on (default is ON) in PCAccess, it will beep without the code segment.
I have three keypads downstairs and they would all beep at different times when a door was opened. It was a little bit annoying. Now I do the beep manually and choose which keypad I want to beep.
 
The HLC docs on HAI's knowledge base detail which links are free to use for any purpose.
Primarily the higher numbered ones. I posted the links below.

I use links to coordinate actions across rooms. I make sure to program the Links in both the HLC and UPB Scene areas in PCAccess. I find the UPB Link names easier to remember than A, B, C, D etc. The software will automatically translate a UPB link to the correct HLC Scene.
Here's what I've done in a few cases.

I use one of the Room links, say "D" for instance. I don't necessarily set the room links up in the 80, 60, 40, 20 format.
I may only use two of the links for the two primary scenes I use in that room. So I use the others for other functions.
If the switches them selves are not programmed to respond to the links, nothing will happen.
So in a room I may only have a portion of the switches respond to a given "room" link.
The Omni still updates the status for all switches listed in that room.

So in your case, let's say we used link D in the Mudroom.
Program the Mudroom light to react to link D (at whichever level you like), leave the other switches in that room off the link, meaning do not program them to respond to it. Then add that link to the Sink Light, so it will respond to it.

When you send Mudroom Link D ON, both the mudroom and Sink lights will come on simultaneously. Then the Omni will automatically send the status requests for the Mudroom. If you want to update status of the Sink light you can add a status command after the link command in the code for just that switch.


Here's something else I do with rooms. This may illustrate better what I am getting at.
I have all of our spare bedrooms as one "Room", but each link in that room controls only one room, but the Omni updates the status for all the bedrooms anytime it sees any link in the virtual room. The overhead lights are all CFL, so I don;t need dimming steps. I group similar items together and use the ON/OFF links to trigger and maintain status. I do the same thing with exhaust fans, exterior lights, etc.

Room ON (Bedroom 2, 3, 4 ON)
Room OFF (Bedroom 2, 3, 4 OFF)
Room LINK A (Bedroom 2 ON)
Room LINK B (Bedroom 3 ON)
Room LINK C (Bedroom 4 ON)
Room LINK D (Bedroom 2 & 3 ON)

So 99% of the time I'm using the local staus transmit option to update the Omni as we enter and exit the rooms and use the wall switch. When I use links I primarily use Links A, B and C. But the Omni checks status for all the bedrooms any time it sees any of the 6 links.
To turn off the bedroom I use Room Link A OFF (Bedroom2), the HLC convention is to use link only in the activate or ON mode.
But if you send a link OFF and it is one of the 6 links for the room, the Omni still updates the status of the room.

You could also do this.
Make the sink light respond to the Link D in the Mudroom.
That way it will turn on with the mudroom light.
In the code have it turn on the mudroom AND turn on the sink light.
The sink light AND the mudroom will go on with the initial link simultaneously.
The Omni will check the status of the mudroom at this time.
The Omni will issue the Sink On link.
The link will go out over the UPB net, but you won't notice because the light will already be on, but this second link WILL trigger the Omni to do a status update (assuming it is one of the room links the sink light is assigned.

There are several ways to use the HLC rules to get the effect you are looking for. It takes some creative problem solving.

In essence the only hard and fast rule is that the six links assigned to each room are hard coded to that scheme.
But you can make them do almost anything you want.

I don't use the Omni ALL ON/ALL OFF function.
I unchecked all of the HLC units from that option because I don't like the slow response.
Instead I use an ALL LIGHTS ON link to turn the lights on simultaneously, and told the Omni to use the link when an ALL ON or OFF command is issued. IIRC it still checks the status of all the HLC units because the ALL ON function was used, even though it din;t go through room by room and turn things on. (need to verify this when I get home).
 
Thanks Desert_AIP,
Those documents helped.

On a side note.. I really wish HAI would implement a "do after <time>" instruction and a "if true for <time>" operation. Would simplify a lot of code!
 
Thanks Desert_AIP,
Those documents helped.

On a side note.. I really wish HAI would implement a "do after <time>" instruction and a "if true for <time>" operation. Would simplify a lot of code!

The "ON FOR" functions kind of act like built in triggers but can't be used with UPB links. I'd like to see "UPB LINK xx ON FOR xx" and at the end the Omni automatically sends a "LINK xx OFF" command. That way you wouldn't have to do the kludy timer flag thing and add extra code to do the simple act of turning a group of lights on and off with an opening and closing door.


I'm not sure what you mean by "if true for <time>"

You can trigger on a time with a WHEN command and make several boolean comparisons to time in the AND IF conditionals.
 
The "ON FOR" functions kind of act like built in triggers but can't be used with UPB links. I'd like to see "UPB LINK xx ON FOR xx" and at the end the Omni automatically sends a "LINK xx OFF" command. That way you wouldn't have to do the kludy timer flag thing and add extra code to do the simple act of turning a group of lights on and off with an opening and closing door. I'm not sure what you mean by "if true for <time>" You can trigger on a time with a WHEN command and make several boolean comparisons to time in the AND IF conditionals.

By "if true for <time>" I would like to be able to say. "If Mudroom not secure for <60 seconds>", then do X.. I can do it all with flags.. Ugly. and you end up w/ all these flags in your snaplink that mess with WAF :-)
 
That may not be possible. Every zone would have to have a timer associated with it, there may not be room in memory or the firmware.
The timer would have to be present and run even if it weren't used. That might bog down performance. I have 3 or 4 situations that I use similar logic. While I agree it would be easier for coding, it might produce a performance hit.
 
Following up on this. I am noticing the same type of delay even for switches that are in the same HLC room.

Here is my automation code:

Code:
64. //    Test Blocks
65. WHEN Test
   THEN Porch Coach Light ON
   THEN Porch Fan Light ON
   THEN Deck Flood Light ON

Here is what I see in the log:
Upstart Log.png



So, the system seems to tell the first light to go on. Waits 2 seconds, then tells the scene switch to "indicate", then tells the house controller (which I am not using) to "indicate", then goes and tells the other lights to turn on. Is there any way to change that order? I would rather it tell the other lights to turn on then worry about any indication?

While I could do this with a link, I want to understand why things are done in the order they are.
 
That is how the HLC system works.
Room scene activate - wait UPB delay - update room status - next room scene activate - wait UPB delay...

If you use the "All On" function it goes through room by room doing this. Which is why I use links to do that.

You can make the lights in the other rooms respond to a link from a room and then send a separate on command for that room to update the status.
The lights will respond immediately and the system will still update.

Use your same code, but use the link rather than unit commands and in UPStart program the fan light and deck light to respond to the coach light on link.
 
Back
Top