Jump to content

Is this possible in a scene?


tome

Recommended Posts

Posted

I have 2 Outdoor ApplianceLincs and Two Dual-band LampLincs running xmas lights and want to tie them to button "C" on a Keypad linc with the following operational criteria:

 

1. If ANY or ALL of the 4 devices is on (via manual control, program, etc) the light on the KPL will be on. Pushing the button will turn ALL off

 

2. If ALL 4 devices are off the KPL button will be off. Pushing the button will turn ALL on

-----

 

I made a scene with button C as the controller and added all devices as responders. And I made another scene with button C as the responder and tried to all the others as controllers but that didn't work. I could add the LampLincs as controllers, but not the Outdoor ApplianceLincs. But, even adding the two LampLincs with one on and one off, the button didn't light....

 

Is it even possible to have the behavior I describe?

Tome

Posted

I would personally use ISY Programs to accomplish what you desire.

 

I would create a scene containing all your devices called "HolidayLights" or whatever you choose. I would create a scene containing the KPL button and call it "HolidayLightStatus" or whatever you choose.

 

I would write a program that checks the status of your individual devices and, if any are NOT OFF, turn "HolidayLightStatus" ON.

 

I would write a program that turns "HolidayLights" OFF if your KPL button is pressed OFF, and turns "HolidayLights" ON if your KPL button is pressed ON.

 

Check out this thread for some similar scenarios and example Programs:

http://forum.universal-devices.com/viewtopic.php?t=2280

Posted
I would personally use ISY Programs to accomplish what you desire.

 

I would create a scene containing all your devices called "HolidayLights" or whatever you choose. I would create a scene containing the KPL button and call it "HolidayLightStatus" or whatever you choose.

 

I would write a program that checks the status of your individual devices and, if any are NOT OFF, turn "HolidayLightStatus" ON.

 

I would write a program that turns "HolidayLights" OFF if your KPL button is pressed OFF, and turns "HolidayLights" ON if your KPL button is pressed ON.

 

Check out this thread for some similar scenarios and example Programs:

http://forum.universal-devices.com/viewtopic.php?t=2280

 

Well, I thought I had this figured out after your message and reading the thread you linked, but instead I managed to put on a light show... :( I am sure the logic is broken, just not sure where...

 

I have 2 scenes:

XmasLightsAll - which contains my 4 devices as responders

XmasLightsStatus - which contains KPL.C as responder

 

I have the following 2 programs:

 

#1 XmasLightsKPLStatus

If

Status 'DRX' is not off

Or Status 'TFPX' is not off

Or Status 'ODW' is not off

OR Status 'ODE is not off

 

Then

Set Scene 'XmasLightsStatus' On

 

Else

Set Scene 'XmasLightsStatus' Off

 

Alone, the above seems to work for the KPL status light if I enable it, and then when something triggers it (a change in the state of one of the devices).

 

#2 XmasLightsKPL-OnOff

If

Status 'DRX' is not off

Or Status 'TFPX' is not off

Or Status 'ODW' is not off

OR Status 'ODE is not off

And Control 'KPL.C' is switched On

 

Then

Set Scene 'XmasLightsAll' Off

 

Else

Set Scene 'XmasLightsAll' On

 

This is where all hell breaks loose. With both the above enabled, a press of the switch causes all the lights to cycle on/off over and over.... I have to go to the prpgram detail and disable both programs to get the ISY to calm down and stop.

 

Originally I tried two different programs for the second part (XmasLightsKPL-On and XmasLightsKPL-Off) but that had the same effect.

Posted

Since your status program is accurately controlling the state of that KPL button, I don't think you need your condition checks. I would just do:

 

 

If

Control 'KPL.C' is switched On

And Control 'KPL.C' is not switched Off

 

Then

Set Scene 'XmasLightsAll' On

 

Else

Set Scene 'XmasLightsAll' Off

Posted

Got this working (see programs below), now three questions:

 

1)Why do I need "is switched off" as well as "is not switched on" in the same If statement for both the Keypad-C-On and Keypad-C-Off programs (see below)? It seems redundant.

 

2)When the various controlled lights are on and I push KPL.C to turn off the lights, a strange thing happens. The sequence goes:

 

Push KPL.C off

KPL.C indicator light goes off

Controlled lights go off

KPL.C indicator light goes back on (!!!?)

1-2 seconds later, the KPL.C indicator light goes back off and stays off

 

Why does the indicator come on before going back off?

 

3)Is this the most efficient way to accomplish this task?

 

Tome

----------------------------------------------------------

I have two scenes:

 

1. IndoorXmasLights contains two LampLincs (DiningXmas and LivingRoomXmas) as responders

2. HolidayButtonCStatus contains KPL.C as responder

 

Status program called Keypad-C-Indication:

----------------------------------------------

If

Status 'DiningXmas' is not off

Or Status 'LivingRoomXmas' is not off

 

Then

Set Scene 'HolidayButtonCStatus' On

 

Else

Set Scene HolidayButtonCStatus' Off

---------------------------------------------

 

Control program called Keypad-C-Off:

---------------------------------------------

If

Control 'KitchenKeypad.C' is switched off

And Control 'KitchenKeypad.C' is not switched on

 

Then

Wait 1 second

Set Scene 'indoorXmasLights' Off

 

Else

No actions

---------------------------------------------

 

Control program called Keypad-C-On:

---------------------------------------------

If

Control 'KitchenKeypad.C' is switched on

And Control 'KitchenKeypad.C' is not switched off

 

Then

Wait 1 second

Set Scene 'indoorXmasLights' On

 

Else

No actions

---------------------------------------------

Posted
1)Why do I need "is switched off" as well as "is not switched on" in the same If statement for both the Keypad-C-On and Keypad-C-Off programs (see below)? It seems redundant.

 

The ELSE statement only runs if the IF statement is explicity not true. Saying "not switched on" makes the IF statement explicitly not true when you press the KPL button on, triggering the execution of the ELSE portion of your program.

 

2)When the various controlled lights are on and I push KPL.C to turn off the lights, a strange thing happens. The sequence goes:

 

Sounds like a timing issue. Clean up your programs as I'll mention below, and if still happens add/remove WAIT commands to your THEN and ELSE statements to adjust the timing as needed.

 

 

Control program called Keypad-C-Off:

---------------------------------------------

If

Control 'KitchenKeypad.C' is switched off

And Control 'KitchenKeypad.C' is not switched on

 

Then

Wait 1 second

Set Scene 'indoorXmasLights' Off

 

Else

No actions

---------------------------------------------

 

Control program called Keypad-C-On:

---------------------------------------------

If

Control 'KitchenKeypad.C' is switched on

And Control 'KitchenKeypad.C' is not switched off

 

Then

Wait 1 second

Set Scene 'indoorXmasLights' On

 

Else

No actions

 

You should be able to combine these to something like:

 

If 
Control 'KitchenKeypad.C' is switched on 
And Control 'KitchenKeypad.C' is not switched off 

Then 
Wait 1 second 
Set Scene 'indoorXmasLights' On 

Else 
Wait 1 second 
Set Scene 'indoorXmasLights' Off

 

Did you find you needed the WAIT command? If not, try removing to see if your program still executes reliably.

Posted
The ELSE statement only runs if the IF statement is explicity not true. Saying "not switched on" makes the IF statement explicitly not true when you press the KPL button on, triggering the execution of the ELSE portion of your program.

 

Got it, thanks. Though, in my case there weren't any statements in the Else clause, so nothing would happen, so I guess it was redundant for the way I had it written. For your method below, it is needed though...

 

Sounds like a timing issue. Clean up your programs as I'll mention below, and if still happens add/remove WAIT commands to your THEN and ELSE statements to adjust the timing as needed.

 

Ok, I cleaned up per your example, but it was still happening. What I had to do to fix it was to put a Wait 1 in the Indication program (not the control program). I guess what was happening is that the Indication program was triggering a moment before the control program had finished (or something like that)...

 

So now I have two programs, the indication program:

If 
Status 'DiningXmas' is not off 
Or Status 'LivingRoomXmas' is not off 

Then 
Wait 1
Set Scene 'HolidayButtonCStatus' On 

Else
Wait 1 
Set Scene HolidayButtonCStatus' Off 

 

and your revised control program minus the Waits:

If 
Control 'KitchenKeypad.C' is switched on 
And Control 'KitchenKeypad.C' is not switched off 

Then  
Set Scene 'indoorXmasLights' On 

Else 
Set Scene 'indoorXmasLights' Off 

 

I must say, that things seem a little less reliable and I am not sure why. Sometimes I press the button, say Off, and the indicator light on the button goes out, but the controlled lights don't go out. I'm not sure if this is a program issue or a communications issue :(

 

Did you find you needed the WAIT command? If not, try removing to see if your program still executes reliably.

 

No, I put them in because they were used in the examples in the thread you sent me. I didn't really get why they were there.

 

Thanks.

Posted
I must say, that things seem a little less reliable and I am not sure why. Sometimes I press the button, say Off, and the indicator light on the button goes out, but the controlled lights don't go out. I'm not sure if this is a program issue or a communications issue

 

Check the status of that KPL button on the ISY's Admin Console. Did the ISY see the button being pressed OFF? If it did, I think you'll need to adjust your programs. If it did not, you'll need to figure out why the ISY is not always seeing the button press (probably a communications issue).

 

No, I put them in because they were used in the examples in the thread you sent me. I didn't really get why they were there.

 

In this scenario WAITs can be used to give the ISY time to correctly evaluate the status of yoru devices before triggering the action. Also, when scenes are controlled there can be substantial traffic on the powerline (the larger the scene, the more traffic due to cleanups, etc.). Adding WAITs can space commands out to avoid powerline collisions and increase reliability.

Posted
Check the status of that KPL button on the ISY's Admin Console. Did the ISY see the button being pressed OFF? If it did, I think you'll need to adjust your programs. If it did not, you'll need to figure out why the ISY is not always seeing the button press (probably a communications issue).

 

What do you mean by check status, do a query on the KPL after a failure, or do you mean look at the Current State or something else?

 

In this scenario WAITs can be used to give the ISY time to correctly evaluate the status of yoru devices before triggering the action. Also, when scenes are controlled there can be substantial traffic on the powerline (the larger the scene, the more traffic due to cleanups, etc.). Adding WAITs can space commands out to avoid powerline collisions and increase reliability.

 

Ok, thanks.

Tome

Posted
What do you mean by check status, do a query on the KPL after a failure, or do you mean look at the Current State or something else?

 

I mean, for example, if you have multiple programs that react based on the status of the same device. You may need to add a WAIT to one of the programs for them to operate as intended, for one to take priority over another, etc.

Posted
What do you mean by check status, do a query on the KPL after a failure, or do you mean look at the Current State or something else?

 

I mean, for example, if you have multiple programs that react based on the status of the same device. You may need to add a WAIT to one of the programs for them to operate as intended, for one to take priority over another, etc.

 

Understood. How do I tell if the KPL saw the button press exactly?

Thanks for you help.

Tome

Posted

If you press the KPL button ON, the ISY's Admin Console should show that the button is ON - and vice versa. If the ISY and the actual KPL are out of sync, there is a problem.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...