Need help with Room Status Switch

asnopek

Member
Hello,
I am trying to detect if a light is on in a room.  1ST FL EAST has about 7 switches. 
When I switch one of the lights on that belong to the room then the 1ST FL EAST room goes into "ON" status in the "Status/Control" tab in PC Access.
Unfortunately, the code doesn't execute. 
The only time the codes executes is when I go into the "Status/Control" tab in PC Access and click the 1ST FL EAST room in the "ON" status. 
 
 
1.    WHEN 1ST FL EAST ON
            THEN 1ST Floor East Flag ON
            THEN ISLAND ON FOR 10 SECONDS <--- this is just to test

2.    WHEN 1ST Floor East Flag ON
            THEN BK SMALL ON FOR 20 SECONDS  <--- this is just to test
 
 
What I am really trying to do is to turn off sections of my house with a 8 button status switch.  I would like to combine few rooms into one button.  If one of the lights are on the status switch lights up.  When I press the lit button then that section of the house turns off.
My thought was to set a flag when one of the lights in the room comes on.  When the flag is on, I would light up the LED.  When the button is pressed I would set the flag to off and turn off sections of the house. 
Any advice?

       
 
 
You have to use the ON and OFF links (241 and 242) and have the switch transmit them.
That is how the Omni determines when a switch turns on or off.
 
Explained here
http://cocoontech.com/forums/topic/26748-upb-configuration-into-ominpro/#entry218273
 
Link 241 is the universal signal for Local Load ON
Link 242 is the universal signal for Local Load OFF
This is how the Omni tells when a particular switch is turned on or off.
When it sees link 241 or 242 it checks to see which unit it came from, and then updates the status of that switch as appropriate.
You have to use these links if you want to do any conditional programming based on a particular switch turning ON or OFF.
 
 
Everything I've learned about HLC is in this thread
http://cocoontech.com/forums/topic/26748-upb-configuration-into-ominpro/
 
After re-reading your post, is there a controller in the unit slot for the 1st Floor East room?
Or is it empty?
I assume you are using HLC
 
What switches and unit numbers are in that HLC room? 
Which links are you using?
 
[sharedmedia=gallery:images:795]
I am using all HLC switches in that room.  I guess I could group individual switches to change a flag but I was hoping to figure out something easier. 
I took some screen shoots plus logs from UpStart with what happens when one of the switches is switched on and off in the East Room. 
Tried another room, same outcome. 
 

[sharedmedia=gallery:images:796]
[sharedmedia=gallery:images:794]
[sharedmedia=gallery:images:793]
 
Unit 33 is a 6 button Room Controller that controls only the east room.
The 8 button status switch is in another room, which is the one I am trying to enable to control the entire house.   The Id is 158. 
 
[sharedmedia=gallery:images:798]
 
To signal the individual switches turning on you'll need to use the Local Load ON/OFF links as I described.
That is what triggers the WHEN Unit ON or Unit OFF trigger in PCAccess.
 
Hello,
This is what I did so far to test one room and it works.  Not great but since I don't know what I am doing it's the best I could come up with.
 
I am incrementing or decremening a flag if the top or bottom switches are pressed, repectively. Using PcAccess

1.    //    1st floor east room increment or decrement flag
2.    WHEN ENTRY CLST ON
            THEN INCREMENT 1ST Floor East Flag
3.    WHEN ENTRY CLST OFF
            THEN DECREMENT 1ST Floor East Flag
4.    WHEN OUTLETS ON
            THEN INCREMENT 1ST Floor East Flag
5.    WHEN OUTLETS OFF
            THEN DECREMENT 1ST Floor East Flag
6.    WHEN CEILNG ACCNT ON
            THEN INCREMENT 1ST Floor East Flag
7.    WHEN CEILNG ACCNT OFF
            THEN DECREMENT 1ST Floor East Flag
8.    WHEN FIRE ACCENT ON
            THEN INCREMENT 1ST Floor East Flag
9.    WHEN FIRE ACCENT OFF
            THEN DECREMENT 1ST Floor East Flag
10.    WHEN ENTRY HALL ON
            THEN INCREMENT 1ST Floor East Flag
11.    WHEN ENTRY HALL OFF
            THEN DECREMENT 1ST Floor East Flag
12.    WHEN CHANDOLIER ON
            THEN INCREMENT 1ST Floor East Flag
13.    WHEN CHANDOLIER OFF
            THEN DECREMENT 1ST Floor East Flag
14.    WHEN FIRE RECESSE ON
            THEN INCREMENT 1ST Floor East Flag
15.    WHEN FIRE RECESSE OFF
            THEN DECREMENT 1ST Floor East Flag
// when the flag is on turn on the 5th LED on the house status switch
16.    WHEN 1ST Floor East Flag ON
            THEN 8-BUTTON LED 5 ON
// when the flag is off turn off the 5th LED on the house status switch
17.    WHEN 1ST Floor East Flag OFF
            THEN 8-BUTTON LED 5 OFF
18.    //    // END of 1st floor east room
 
Now we are done with the LED turing on/off. 
 
Next I created a scene in Upstart that encompases the above devices.
When button 5 is pressed I deactivate the scene only.  The scene turns off all the lights in the scene, which is that area of the house.
[sharedmedia=gallery:images:800]
[sharedmedia=gallery:images:801]
[sharedmedia=gallery:images:799]

Not sure what the group 1 feature does but it has to be selected apparently.  If I select "do nothing" not sure what happens.
 
The one thing I don't know how to do is to capture that I pressed button 5 on the status switch.  I looked at the logs in UpStart and I get the following.
It says Unit 146 is Reporting State, not sure what that is and scene 110 and 211 indicate command. 
[sharedmedia=gallery:images:802]
 
Few questions
1) I would like to reset the flag to 0 in case someone presses the switch down or up twice or something like that.  The flag at that point would be in an inconsistent state.
 
2) Is this code...

WHEN ENTRY CLST ON
            THEN INCREMENT 1ST Floor East Flag
WHEN ENTRY CLST OFF
            THEN DECREMENT 1ST Floor East Flag
WHEN OUTLETS ON
            THEN INCREMENT 1ST Floor East Flag
WHEN OUTLETS OFF
            THEN DECREMENT 1ST Floor East Flag
WHEN CEILNG ACCNT ON
            THEN INCREMENT 1ST Floor East Flag
WHEN CEILNG ACCNT OFF
            THEN DECREMENT 1ST Floor East Flag

Same as this ?

WHEN ENTRY CLST ON
WHEN OUTLETS ON
WHEN CEILNG ACCNT ON
            THEN INCREMENT 1ST Floor East Flag

WHEN ENTRY CLST OFF
WHEN OUTLETS OFF
WHEN CEILNG ACCNT OFF
            THEN DECREMENT 1ST Floor East Flag
 
I tried to look for an OR statement but PCAccess makes you put a when statement first then you can put OR conditions.
 
3) If anyone has ideas on how to make this easier, please let me know.
 
Figured out # 1) I would like to reset the flag to 0 in case someone presses the switch down or up twice or something like that.  The flag at that point would be in an inconsistent state.
 
// when scene 109 off then sett flag to off
2.    WHEN UPB LINK 109 OFF
            THEN 1ST Floor East Flag OFF
           
 
 
Number 2, yes.  I was going to suggest it.
OR is only used for conditional tests, it's implied in the nested triggers logic.
You can nest triggers with the same action to save programming lines.
When any of the triggers occur, the action will execute.
That is a good way to increment/decrement flags with groups of triggers and keep track of them.
 
I need to read through your entire post above to provide feedback.
 
I ended up with the following.
In PcAccess, automation code to set flags and set the LED on and off.
 
51.    WHEN ENTRY HALL ON
    WHEN FIRE RECESSE ON
    WHEN FIRE ACCENT ON
    WHEN CHANDOLIER ON
    WHEN CEILNG ACCNT ON
    WHEN OUTLETS ON
            THEN INCREMENT 1ST Floor East Flag
52.    WHEN ENTRY HALL OFF
    WHEN FIRE RECESSE OFF
    WHEN FIRE ACCENT OFF
    WHEN CHANDOLIER OFF
    WHEN CEILNG ACCNT OFF
    WHEN OUTLETS OFF
            THEN DECREMENT 1ST Floor East Flag
53.    //    when the flag is on turn on the 5th LED on the house status switch
54.    WHEN 1ST Floor East Flag ON
            THEN 8-BUTTON LED 5 ON
55.    //    // when the flag is off turn off the 5th LED on the house status switch
56.    WHEN 1ST Floor East Flag OFF
            THEN 8-BUTTON LED 5 OFF
57.    //    Reset counter to 0(off) when scene 109 is set to off (pressing the 5 button will do it)
58.    WHEN UPB LINK 109 OFF
            THEN 1ST Floor East Flag OFF
 
In UpStart
set the scene 109 with the above components and configured the 8 button switch.
[sharedmedia=gallery:images:804]
[sharedmedia=gallery:images:803]
 
Sometimes it doesn't work consitently.  For some reason some switches do not set a flag... when I press a non-working/non-flag setting switch twice, sometimes it works.
Now unto next problem email board
 
Back
Top