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?
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?