Haiku UPB Status Updating

tannebil

Member
One of the issues I'm finding using UPB with an HAI Omni is that it's easy for HAI to get out of sync with the status of the light as it doesn't update when the light is changed at a switch using a link. It works for lights on the load for the switch but not for non-load lights.  I've found a few ugly workarounds but wondered if I could do it in HaikuHelper instead. Does HaikuHelper see all the UPB links transmitted on the powerline? I see the onUPBLink function but it only seems to deal with off/on/set/fade commands and there are lots of other commands when I look at the log in UpStart.
 
I'd like to do something like whenever HaikuHelper sees any command on Linknnn, it queries the status of light x after y seconds.
 
Thanks.
 
Are you using HLC or UPB?
Status will never track properly if using UPB.
The HLC system is merely a strict allocation of links and units, but the internal programming associated with the allocation scheme keeps the status updated.


You can do the same status programming in the HAI you want to do in Haiku Helper.
 
The link off/on/set/fade commands should be all you need I think. And yes, you can react to particular link numbers and request status for the devices you need to update.
 
Like Desert_AIP asked - are you using UPB or HLC mode?  HAI tracks status very good if you strictly adhere to the HLC room/unit/link conventions they have pre-allocated.  If you are using a switch to activate a link that is outside of the switch's normal room, you'll need to put a status query in your automation code to trigger the other room to send it's status.  When a unit or link is triggered within a room, HAI automatically queries all devices in that same room to make sure it has accurate status.  You only need helper code when you do your own links across rooms.
 
I'm not using HLC because my UPB configuration pre-dates the installation of my Omni.  I don't really want to redo it into HLC unless I'm sure it's actually going to be an overall better solution.  I've read some postings about the hoops some people are jumping through to get UPB-HLC to do what they want so it doesn't appear to be a solution that's better in every way. Plus, I use SA switches US2-40 switches that use links a bit differently than HAI switches so I'm not sure if that's going to be an additional complication.
 
My installation is small enough that the code complexity of updating status should be managable as long as I can do it in HaikuHelper to avoid programming limitations of the Omni. I'll lose a bit of responsiveness and reliability doing it outside the Omni but it's not that big a deal for syncing status.  Of course, my Javascript and HH API skills are close to zero which is going to make it an interesting undertaking.
 
I use SA UPB switches nearly exclusively in my HAI HLC install.
It's purely a structured allocation scheme.

I re-did my 60+ switch install changing to HLC and the status tracking alone is worth the effort.

You do not have to use the HLC links for the default behaviors, 80, 60, 40, 20; but they are associated with room and unit allocations.
You do not even need all units in a physical "room".
e.g., I have all of my bathroom fans in one HLC room so I can turn them all on or off and use each individual link, A, B, C, D to control the individual fans.
That way the status is always correct.

HLC gives you the advantage of internally programming status tracking that is virtually transparent without additional programming required.

So your first statement should be expected.
The HAI WILL get out of sync when using UPB vice HLC.

If you don't use the HLC convention you will have to hard code all status updates in either the HAI or, in this case, Haiku Helper.
 
My UPB installation pre-dated HAI even supporting UPB.  I used it with my HomeVision system way back when.  Going through the re-org to put units into rooms is very much worth the effort to get the status tracking.  Once it is setup, it works very good and still let's you do all kinds of custom stuff through Upstart.
 
FWIW, I use the Elk with SA UPB and there are of course no options for HLC - I did find that just having the $99 version of Elve running with its own CIM attached causes it to keep track of the status of all the switches using its own internal mechanisms to know which switches are involved in links and also to query for status updates after a link is triggered, and also periodically; the nice thing is that the Elk sees the status updates too, so this effectively keeps my UPB statuses accurate.
 
I'm sure anything that can accurately monitor UPB would create the same effect with both UPB and HAI even without going to HLC
 
I tried running Elve for the status updates but it took a minute or two for the sync to happen and I decided it was too much complexity for too little reward. My installation is small so Elve didn't really offer any advantage over just doing an EVERY 1 MIN refresh in the Omni. I was originally going to use Elve with my Omni but it didn't support the LTe and, since Elve is no longer in active development, I decided to switch to Haiku/HaikuHelper.
 
The advantages of HLC seems clear but there are always "gotchas" and I want to understand them I burn my configuration to the ground and redo it.
 
A simple example. RoomA has two lighting loads in it and two US2-40 switches at either end of it. RoomB has one lighting load and a single US2-40 switch.  Switch1 is a dual rocker with one rocker for the Light1 load and a second for links to Light2.  Switch2 is a quad rocker for the Light2 load and links for Light1 and Light3. Switch3 is a single rocker for the Light3 load.  
 
What is that going to look like in UpStart and HLC?
 
You could do that all as one logical "room" or break it into two separate rooms.

For a single room
We'll use the first HLC Room
HLC room 1 is allocated units 1-8 and links 1-6.

The first load in a room is ALWAYS reserved for a room controller.
You don't have to have a room controller ther, but it can't be a regular switch.
It also MUST BE NAMED, even if there is no physical device in that slot.
Naming the room tells the HAI that the room exists.

So let's call it "Room"

So in PCAccess
Unit 1 is named Room and set to HLC.
Setting unit 1 to HLC automatically desugnates units 1-16 as HLC since the HLC convention pairs consecutive rooms together.

Unit 2 is Load 1
Unit 3 is Load 2
Unit 4 is Load 3

Leave the remaining units 5-8 blank

In the scenes section of PCAccess ( I like to name both the HLC and UPB scenes, the UPB scenes have more natural English titles, if you use the UPB links in programming, PCAccess automatically changes it to the proper HLC link- this is only semantics as the UPB link number that is sent out on the wiring is the same for either naming convention).
You do not have to use the default behaviors for the room links, the links are associated with the room units, but their behavior is arbitrary. The HAI will send out a status request to all units in the room whenever it sees any of the 6 links.
In general I try to keep the room ON and OFF links (the first two links in the room) the default behavior, all room units on and off respectively. You can make the on behavior a "scene" and make the loads come on at levels other than 100%. The HAI uses these links for the ALl ON and ALL OFF commands.
Let's keep the default for the first two links.
So in the scenes section.
Link 1 is Room ON
Link 2 is Room OFF

You can use the other links as you wish. In this case you could use three of the links for individual load control and the fourth to control the two loads that are located in the same physical room.
i.e.
Link 3 is Load 1 ON
Link 4 is Load 2 ON
Link 5 is Load 3 ON
Link 6 is Load 1 & 2 ON

You can also selectively turn these loads off by sending The links with a Deactivate command.

In UPStart

Change the 240 connected to Load 1 to Unit 2
The one connected to Load 2 to Unit 3
And the one connected to Load 3 to Unit 4.

For Unit 2
Receive section
Link 1 ON
Link 2 OFF
Link 3 ON
Link 6 ON
Transmit section
Rocker 1 Upper transmit Link 3 Activate
Rocker 1 Lower transmit Link 3 Deactivate
Rocker 2 Upper transmit Link 4 Activate
Rocker 2 Lower transmit Link 4 Deactivate

For Unit 3
Receive section
Link 1 ON
Link 2 OFF
Link 4 ON
Link 6 ON
Transmit section
Rocker 1 Upper transmit Link 4 Activate
Rocker 1 Lower transmit Link 4 Deactivate
Rocker 2 Upper transmit Link 3 Activate
Rocker 2 Lower transmit Link 3 Deactivate
Rocker 3 Upper transmit Link 5 Activate
Rocker 3 Lower transmit Link 5 Deactivate
Rocker 4 Upper transmit Link 6 Activate
Rocker 4 Lower transmit Link 6 Deactivate

For Unit 4
Receive section
Link 1 ON
Link 2 OFF
Link 5 ON
Transmit section
Rocker 1 Upper transmit Link 5 Activate
Rocker 1 Lower transmit Link 5 Deactivate

That's a very long detailed post but I wanted to explain it in depth.
Actual programming goes quickly.
I planned my system out on a spread sheet first, then took about an hour to reconfigure everything.
Working in rooms one or two at a time is the best way to avoid errors.
 
Thanks for taking the time to provide a clear example.  It makes things a lot clearer.
 
A couple of things I want to confirm.
 
1.  The Unit number in HLC matches the Device number in UpStart.
2.  The non-transmitted "internal" Link241 used on the US2-40 switches is replaced with the regular links that have to be transmitted.
 
Let's say I make two rooms to give me room for expansion since I've only done about 25% of my loads so far.
 
RoomA
Unit1 - RoomA
Unit2/Load1
Unit3/Load2
Link1-Room On
Link2-Room Off
Link3-Load1 On/Off
Link4-Load2 On/Off
 
RoomB
Unit9 - RoomB
Unit10/Load3
Link7-Room On
Link8-Room Off
Link9-Load3 On/Off
 
The UpStart configuration gets done per your example (more or less).
 
If Link3/Activate appears on the line, Load1 comes on through the magic of UPB, the Omni sees the link, associates it with Room1, and updates the status for Unit1/2. Omni plays no role in the changing of the light levels when switches are used, it just monitors the status.
 
A few more questions:
 
1.  How good is the status tracking in HLC and Haiku?  If a light fades over an hour, does the controller request a status update every few seconds over the course of that hour or does it understand the command and doesn't need to query the status again?  Does the light level decrement smoothly in Haiku over the hour?
 
2.  Do "rooms" in HLC correspond to "rooms" in extended setup in PC Access or are they something completely different? As I've used them, PC Access extended setup rooms only provide a way of organizing the presentation of information and controls in Haiku.
 
3.  Why would I want to put multiple Units in a room?  The LTe only supports 32 Units so it will (almost) completely fit in the 31 available Rooms. Am I missing something in the way the Omni uses Rooms?
 
4.  Will changing the US2-40's from using the internal 241 link to a normal link have any effect on the speed of the switch or the LED tracking the load? I know I'll have to set Enable Transmits for Rocker 1 in Options for the switch in UpStart but are there any other configuration tweats needed in UpStart?
 
5.  In the Receive section in UpStart, I currently configure one link to set the level to 100% and a second link to set the level to 0%.  Am I "wasting" as link doing that, i.e. if I configure just a single link with a level of 100%, is the 100% just overridden by the link command actually received (activate, deactivate, fade start, etc.)?
 
6.  I do some stuff with UPB I/O modules and the current links are not in the 225-240 range recommended by HAI. However, the link numbers are way above the links that are going to be allocated to the rooms I'm going to create.  Any downside to not changing them? Is the Omni going to be confused by seeing links for Rooms that have not been confgured?
 
I'll need to really review your questions to provide you good answers.
Your understanding of the programming for two separate rooms looks correct at first glance.
More later.
 
My default is going to be to map physical rooms to HLC rooms the same way that I've mapped them in UpStart.  It sounds like it's more for clarity of presentation rather than anything actually depending on it.
 
Desert_AIP, what's the benefit in putting all your fans in one HLC room?  Is it to avoid "ALL ON/ALL OFF" applying to them?
 
In answer to the fan question, Yes.
 
If I turn the Bathroom off I want the fan to continue running for a period of time after showering.
Same in the powder room, with a shorter timer.
A Room OFF would turn off the fan if it belonged to the room.  I could make it not respond to the room commands but that would make the status tracking more difficult.
 
Also for security alarms and fire alarms functionality.
I don't have them set up to respond to ALL ON or ALL OFF.
 
On a burglar alarm I want all fans off so there is less noise in the house (after I turn off the siren)  :D .
On a fire alarm I want all fans on to exhaust smoke.
I can do that with a single command rather than individual unit commands, that saves programming lines.
 
Plus fans are only On or Off so they don't need the dimmer links, which allowed me to tailor the behavior.
 
Same thing with the other bedrooms in the house.
They are all in one "Room" so I can secure them all with a single command.
 
I also have all the mechanical areas, attics, crawl space etc., in one "room".
Each night the HAI verifies all of these utility and little visited areas are truly OFF, so I don't leave a light burning in there for a week straight.
 
tannebil said:
Thanks for taking the time to provide a clear example.  It makes things a lot clearer.
 
A couple of things I want to confirm.
 
1.  The Unit number in HLC matches the Device number in UpStart.
Correct
 
tannebil said:
2.  The non-transmitted "internal" Link241 used on the US2-40 switches is replaced with the regular links that have to be transmitted.
Correct if you want the HAI status tracking to work. 
The only time you may want to leave it in place is when using a US1140 switch or HAI equivalent. 
When the HAI sees the 241/242 link from the switch that is how it triggers the "When UPB Switch ON or OFF". 
But you can run into sync issues and can't send links, and since the HAI can see the links, you can write automation triggering on the links.
 
 
tannebil said:
Let's say I make two rooms to give me room for expansion since I've only done about 25% of my loads so far.
 
RoomA
Unit1 - RoomA
Unit2/Load1
Unit3/Load2
Link1-Room On
Link2-Room Off
Link3-Load1 On/Off
Link4-Load2 On/Off
 
RoomB
Unit9 - RoomB
Unit10/Load3
Link7-Room On
Link8-Room Off
Link9-Load3 On/Off
 
The UpStart configuration gets done per your example (more or less).
 
If Link3/Activate appears on the line, Load1 comes on through the magic of UPB, the Omni sees the link, associates it with Room1, and updates the status for Unit1/2. Omni plays no role in the changing of the light levels when switches are used, it just monitors the status.
Your setup above is correct.
Correct, you program the light levels into the switches in UPStart based on the links you want each unit to respond to. 
The default behavior for Link 3 (Scene A) is all units in room 1 to 80%.
But you could make it one or more lights on at any levels you choose.
When the HAI sees the link it sends out the status request.
The unit responds back with whatever level it is really at and the HAI updates its status accordingly.
 
Now, if you have a link that affects loads across multiple rooms, you'll have to tell the HAI to update the other room.
So if you made a link (from Room A for example) that turned on Load 1 in Room A and Load 3 in Room B, you'd have to add a line in PCAccess that says
 

WHEN UPB Room A Link A ON

    THEN Request Status UPB Unit 10
If a scene changes the levels of a lot of units across rooms, this can get cumbersome. 
Which is why I generally try to reserve Link D in each room as a status update link.
I don't program any switch to change status when receiving the D link, but the HAI associates it with the room and will request status for all units in the room when the link is transmitted.
If a link changes 5 loads in another room (Room B for example), I can check them all with one line rather than programming status for each separately.
This:

WHEN UPB Room A Link A ON

    THEN UPB Romm B Link D ON

Instead of this:

WHEN UPB Room A Link A ON

    THEN Request Status UPB Unit 10

    THEN Request Status UPB Unit 11

    THEN Request Status UPB Unit 12

    THEN Request Status UPB Unit 13

    THEN Request Status UPB Unit 14
 
tannebil said:
A few more questions:
 
1.  How good is the status tracking in HLC and Haiku?  If a light fades over an hour, does the controller request a status update every few seconds over the course of that hour or does it understand the command and doesn't need to query the status again?  Does the light level decrement smoothly in Haiku over the hour?
No, status updates are instantaneous to the time they are requested.  That's a UPB thing.
If you have the HAI send a direct timed command, not a link, such as "Unit 10 Brighten 50% for 1 Hour", at the end of the hour it will send a "Dim 50%" command to return the light to the original setting and update accordingly.
About the only way I see to track a fading light is either with an "WHEN Every (Time)" trigger, or with a timer flag that loops and each time it times out it checks status and resets the timer.  The second is probably more efficient because it doesn't dedicate controller cycles when the light is off.
 
 
tannebil said:
2.  Do "rooms" in HLC correspond to "rooms" in extended setup in PC Access or are they something completely different? As I've used them, PC Access extended setup rooms only provide a way of organizing the presentation of information and controls in Haiku.
No.
Rooms in extended setup are convenience constructs.
You place the items you want to control in one room.
So an Extended Setup Room could contain lights, thermostats, zones, buttons, flags, anything you want that are associated with controlling a particular room or you can also group functions together like I do with my fans.
You could group adjacent rooms together to control, the Kitchen, Dining Room and Family room for instance, since they are generally clustered together and controlled as a macro room rather than individually like a bedroom.
 
 
tannebil said:
3.  Why would I want to put multiple Units in a room?  The LTe only supports 32 Units so it will (almost) completely fit in the 31 available Rooms. Am I missing something in the way the Omni uses Rooms?
I used the example of placing multiple units in a single room to demonstrate efficiency.  If you don't have a lot of units in a single room and don;t need to use all the links for a single room, grouping them together makes the status tracking easier because you don't have to add status tracking programming lines like my example above to maintain status across the rooms.  The HAI checks all the units in one block every time any load is changed (by a link).  It saves programming lines.
 
 
tannebil said:
4.  Will changing the US2-40's from using the internal 241 link to a normal link have any effect on the speed of the switch or the LED tracking the load? I know I'll have to set Enable Transmits for Rocker 1 in Options for the switch in UpStart but are there any other configuration tweats needed in UpStart?
No.  The only thing different is it transmits the link on the power line. 
The delay setting in the switch is still the same and it responds the same to an internal link or a transmitted link.
 
 
tannebil said:
5.  In the Receive section in UpStart, I currently configure one link to set the level to 100% and a second link to set the level to 0%.  Am I "wasting" as link doing that, i.e. if I configure just a single link with a level of 100%, is the 100% just overridden by the link command actually received (activate, deactivate, fade start, etc.)?
I would say yes.
If you "Activate" the 100% link the load will come on at 100%.  If you "Deactivate" the same link, the load will turn off.  No need for a 0% link unless it is part of a larger scene where you definitely want that light to go to 0% while other lights remain on.
ANY link sent with a "Deactivate" will turn a load off.
I have an "ALL LIGHTS ON" link.  I Activate it to turn everything ON and Deactivate it to turn everything OFF rather than having a separate "ALL LIGHT OFF" link.
 
 
tannebil said:
6.  I do some stuff with UPB I/O modules and the current links are not in the 225-240 range recommended by HAI. However, the link numbers are way above the links that are going to be allocated to the rooms I'm going to create.  Any downside to not changing them? Is the Omni going to be confused by seeing links for Rooms that have not been confgured?
As long as the link numbers are not associated with HLC rooms it should be OK.  Just make sure the rooms that do not have units assigned to them are still set to UPB rather than HLC.
The only exception I see are the house status links 193-224.
When these get sent the HAI actually sends a Room ON link prior to status update, so you can get some funky behaviors using these links to do other things.
I haven't found a way yet to make that behavior change.
 
 
Thanks for the thread by the way, this is a good exercise for me to go back and review things because I need to make some mods and I'm a bit rusty.
Good luck!
 
Back
Top