Jump to content

Programs Run Randomly


jwagner010

Recommended Posts

I have a whole house music system and have set up a number of programs that call Network Resources that lets me control the music via my insteon Switchlincs in a particular room. The behavior of the programs achieves the following:

 

- If the light switch is on and music is off and I press on then turn on the music to z100

- If the light switch is on and music is already on and I press on then toggle to the next playlist

- If the light switch is pressed fast on then turn on the music to z100

- If the light switch is off and music is off and I press off then turn on the music to z100

- If the light switch is on and music is on and I press off then turn off the music

- If the light switch is pressed fast off then turn off the music

 

My set of programs are below. My problem is the program will turn on the z100 music stream randomly when it shouldn't turn on. For example, the light switch is off and I turn the light switch on, will end up with z100 playing - this happens randomly, ie program will run as expected (ie turn light on only) a number of times but sometimes it ends up turning the light and music on. Even weirder is that last time it triggered randomly the program summary page showed all 6 programs triggering when the light switch was pressed on (music was off) and all programs showed a status of False but the music was still triggered on, but variables had been set to 1, so clearly program had triggered. The Switchlinc is a dual band. This is driving me nuts as I have the same programs in some rooms that work fine, but in a couple of rooms trigger randomly. I am running on 4.02 and had same problem on 3.3.10.

 

Music - Kitchen Down - On

If
       (
            Status  'Downstairs - Kitchen' is Off
        And Status  'Downstairs - Kitchen' < 1%
        And (
                 Control 'Downstairs - Kitchen' is switched Off
              Or Control 'Downstairs - Kitchen' is switched Fast Off
            )
       )
    Or (
            Status  'Downstairs - Kitchen' is 100%
        And Status  'Downstairs - Kitchen' > 99%
        And Control 'Downstairs - Kitchen' is switched On
       )
    Or Control 'Downstairs - Kitchen' is switched Fast On
   And $SB_DN_Kitchen_OnOff is 0

Then
       Stop program 'Music - Kitchen Down - Off'
       Stop program 'Music - Kitchen Down - Toggle - Jacky Playlist'
       Stop program 'Music - Kitchen Down - Toggle - Jason Playlist'
       Stop program 'Music - Kitchen Down - Toggle - Jebediah Playlist'
       Stop program 'Music - Kitchen Down - Toggle - Z100'
       Stop program 'Music - Remote - Jacky - Kitchen - On'
       Stop program 'Music - Remote - Jeb - Kitchen - On'
       $SB_DN_Kitchen_OnOff  = 1
       $SB_DN_Kitchen_Toggle  = 1
       Resource 'SqueezeBox On - Downstairs - Kitchen - Z100'
       $SB_DN_Kitchen_OnOff  = 1
       $SB_DN_Kitchen_Toggle  = 1
       Set 'Downstairs - Kitchen' Query

Else
       Set 'Downstairs - Kitchen' Query

 

Music - Kitchen Down - Off

If
       (
            $SB_DN_Kitchen_OnOff is 1
        And Control 'Downstairs - Kitchen' is switched Off
       )
    Or Control 'Downstairs - Kitchen' is switched Fast Off
    Or Control 'Remote Black - Button A' is switched Off
    Or Control 'Remote Black - Button A' is switched Fast Off
    Or Control 'Remote Black - Button A / Remote Black - Button D' is switched Off
    Or Control 'Remote Black - Button A / Remote Black - Button D' is switched Fast Off

Then
       Stop program 'Music - Kitchen Down - On'
       Stop program 'Music - Kitchen Down - Toggle - Jacky Playlist'
       Stop program 'Music - Kitchen Down - Toggle - Jason Playlist'
       Stop program 'Music - Kitchen Down - Toggle - Jebediah Playlist'
       Stop program 'Music - Kitchen Down - Toggle - Z100'
       Stop program 'Music - Remote - Jeb - Kitchen - On'
       Stop program 'Music - Remote - Jacky - Kitchen - On'
       $SB_DN_Kitchen_OnOff  = 0
       $SB_DN_Kitchen_Toggle  = 0
       Resource 'SqueezeBox Off - Downstairs - Kitchen'
       $SB_DN_Kitchen_OnOff  = 0
       $SB_DN_Kitchen_Toggle  = 0

Else
  - No Actions - (To add one, press 'Action')

 

Music - Kitchen Down - Toggle - Jebediah Playlist

If
       (
            Status  'Downstairs - Kitchen' >= 1%
        And (
                 Control 'Downstairs - Kitchen' is switched Fast On
              Or Control 'Downstairs - Kitchen' is switched On
            )
        And $SB_DN_Kitchen_Toggle is 1
       )
   And $SB_DN_Kitchen_OnOff is 1

Then
       Stop program 'Music - Kitchen Down - Off'
       Stop program 'Music - Kitchen Down - On'
       Stop program 'Music - Kitchen Down - Toggle - Jacky Playlist'
       Stop program 'Music - Kitchen Down - Toggle - Jason Playlist'
       Stop program 'Music - Kitchen Down - Toggle - Z100'
       Stop program 'Music - Remote - Jacky - Kitchen - On'
       Stop program 'Music - Remote - Jeb - Kitchen - On'
       $SB_DN_Kitchen_Toggle  = 2
       Resource 'SqueezeBox On - Downstairs - Kitchen - Jebediah Playlist'
       $SB_DN_Kitchen_Toggle  = 2

Else
  - No Actions - (To add one, press 'Action')

 

Music - Kitchen Down - Toggle - Jason Playlist

If
       (
            Status  'Downstairs - Kitchen' >= 1%
        And (
                 Control 'Downstairs - Kitchen' is switched Fast On
              Or Control 'Downstairs - Kitchen' is switched On
            )
        And $SB_DN_Kitchen_Toggle is 2
       )
   And $SB_DN_Kitchen_OnOff is 1

Then
       Stop program 'Music - Kitchen Down - Off'
       Stop program 'Music - Kitchen Down - On'
       Stop program 'Music - Kitchen Down - Toggle - Jacky Playlist'
       Stop program 'Music - Kitchen Down - Toggle - Jebediah Playlist'
       Stop program 'Music - Kitchen Down - Toggle - Z100'
       Stop program 'Music - Remote - Jacky - Kitchen - On'
       Stop program 'Music - Remote - Jeb - Kitchen - On'
       $SB_DN_Kitchen_Toggle  = 3
       Resource 'SqueezeBox On - Downstairs - Kitchen - Jason Playlist'
       $SB_DN_Kitchen_Toggle  = 3

Else
  - No Actions - (To add one, press 'Action')

 

Music - Kitchen Down - Toggle - Jacky Playlist

If
       (
            Status  'Downstairs - Kitchen' >= 1%
        And (
                 Control 'Downstairs - Kitchen' is switched Fast On
              Or Control 'Downstairs - Kitchen' is switched On
            )
        And $SB_DN_Kitchen_Toggle is 3
       )
   And $SB_DN_Kitchen_OnOff is 1

Then
       Stop program 'Music - Kitchen Down - Off'
       Stop program 'Music - Kitchen Down - On'
       Stop program 'Music - Kitchen Down - Toggle - Jason Playlist'
       Stop program 'Music - Kitchen Down - Toggle - Jebediah Playlist'
       Stop program 'Music - Kitchen Down - Toggle - Z100'
       Stop program 'Music - Remote - Jacky - Kitchen - On'
       Stop program 'Music - Remote - Jeb - Kitchen - On'
       $SB_DN_Kitchen_Toggle  = 4
       Resource 'SqueezeBox On - Downstairs - Kitchen - Jacky Playlist'
       $SB_DN_Kitchen_Toggle  = 4

Else
  - No Actions - (To add one, press 'Action')

 

Music - Kitchen Down - Toggle - Z100

If
       (
            Status  'Downstairs - Kitchen' >= 1%
        And (
                 Control 'Downstairs - Kitchen' is switched Fast On
              Or Control 'Downstairs - Kitchen' is switched On
            )
        And $SB_DN_Kitchen_Toggle is 4
       )
   And $SB_DN_Kitchen_OnOff is 1

Then
       Stop program 'Music - Kitchen Down - Off'
       Stop program 'Music - Kitchen Down - On'
       Stop program 'Music - Kitchen Down - Toggle - Jacky Playlist'
       Stop program 'Music - Kitchen Down - Toggle - Jason Playlist'
       Stop program 'Music - Kitchen Down - Toggle - Jebediah Playlist'
       Stop program 'Music - Remote - Jacky - Kitchen - On'
       Stop program 'Music - Remote - Jeb - Kitchen - On'
       $SB_DN_Kitchen_Toggle  = 1
       Resource 'SqueezeBox On - Downstairs - Kitchen - Z100'
       $SB_DN_Kitchen_Toggle  = 1

Else
  - No Actions - (To add one, press 'Action')

Link to comment

I must admit that I am not feeling overly ambitious about spending the time it would take me (I am sometimes a little slow) to try to sort through all this, but one thing that jumps out at me is that, within a given program, you have a lot of conditions based upon a single device (kitchen - downstairs).

 

I also subscribe to the theory that computers are not generally susceptible to random occurrences. More likely, there is a program that is incorrect.

 

I offer a couple of thoughts on the first program condition:

 

Status 'Downstairs - Kitchen' is Off <---what is the purpose of this, given the next condition?

And Status 'Downstairs - Kitchen' < 1% <---what is the purpose of this one? What about using "NOT ON"?

And (

Control 'Downstairs - Kitchen' is switched Off

Or Control 'Downstairs - Kitchen' is switched Fast Off

)

)

Or (

Status 'Downstairs - Kitchen' is 100%

And Status 'Downstairs - Kitchen' > 99% <--what is this purpose, given the condition above

And Control 'Downstairs - Kitchen' is switched On

)

Or Control 'Downstairs - Kitchen' is switched Fast On

And $SB_DN_Kitchen_OnOff is 0

 

 

My gut reaction is that you have created a bit of an overly complicated mess. I also wonder, given your original requirements, whether your kitchen light is on a dimmer or relay. I am also a little suspicious that this condition, overall, is working in ways you are not expecting. Let's suppose that the kitchen light is at 50% and you turn it off. The status would change, forcing an evaluation of the first two conditions. You have also received a CONTROL OFF from that switch. I expect this program to evaluate TRUE. Is this what you want?

 

I would start from scratch. My suspicion is that your set of conditions might be best met with an integer (non triggering) variable , where:

 

variable = 1 means kitchen light is on

variable - 0 means kitchen light is off

 

Perhaps create a single program (kitchen assumed relay, ON/OFF only):

 

if

status downstairs kitchen is not off

then

set variable = 1

else

set variable = 0

 

I would re-write the condition of the first program:

 

if

variable = 0

and

(

control downstairs kitchen light is off

or

control downstairs kitchen light is fast off

)

or

variable = 1

and

(

control downstairs kitchen light is switched on

or

control downstairs kitchen light is switched fast on

)

 

then

....

else

...

 

Maybe a few of these thought can help stir the thought processes.

Link to comment
Status 'Downstairs - Kitchen' is Off <---what is the purpose of this, given the next condition?

And Status 'Downstairs - Kitchen' < 1% <---what is the purpose of this one? What about using "NOT ON"?

 

Status 'Downstairs - Kitchen' is 100%

And Status 'Downstairs - Kitchen' > 99% <--what is this purpose, given the condition above

This is just in there for some debugging I did, you can remove the Off and 100% lines. I use > 99% because if the light is dimmed and I want to get it to 100% I don't want to trigger the music on.

 

My gut reaction is that you have created a bit of an overly complicated mess.

I must respectfully disagree, these programs work in my other rooms flawlessly and do exactly what I want but do not work on this particular dualband switchlinc. The problem started when I changed out the Switchlinc to a dualband switchlinc so I suspect that has something to do it with it. Further, what is most troublesome is that the programs on this switchlinc do not run consistently in terms of there is random outcome or at least one that does not follow the program logic.

Link to comment

"The problem started when I changed out the Switchlinc to a dualband switchlinc"

 

There is a problem with Dual Band SwitchLincs at 4.0.1 where a paddle press may not trigger a program if the paddle is pressed too quickly. It is corrected in 4.0.2

Link to comment
I must respectfully disagree,

 

While I did not intend to offend, part of the reason I stated this was because extra lines that, after your follow-on evaluation, you admit that were unnecessary. They just struck me as extra lines without much functional purpose (which was true). Perhaps I should have been more tactful, but this still strikes me as overcomplicated.

 

The problem started when I changed out the Switchlinc to a dualband switchlinc so I suspect that has something to do it with it.

 

I missed that part in the original post. So, you know that these programs once worked, but now do not. I do not believe that programs, in general, quit working. I would focus on other possible explanations for why a program once worked but would stop.

 

light is dimmed

 

OK. I cannot help but wonder how you want these programs to react when the kitchen light is <99% but >1%. But, since the programs worked as you wanted at one point, I would focus more on the change and what affect it had on your programs. I would focus on whether your ISY is seeing correct status from the new devices, or even from the old devices.

 

As a diagnostic tool, I would try a couple of things. I would temporarily disable all but one of the programs and determine if each is consistently reacting as you believe it should. If not, I would observe the input conditions (kitchen light, mostly) and see if the ISY is correctly seeing the status. If not, find out why.

 

Once you have confirmed each program is working again, try re-enabling the remaining programs, one at a time. Are they still working? If not, I wonder if having multiple programs triggered from the same device (kitchen light) is causing some sort of interaction between them.

Link to comment
While I did not intend to offend
Absolutely no offense taken, in fact I appreciate someone taking the time to help out.

 

It is the "Music - Kitchen Down - On" program that is triggering. I can now confirm that. The kitchen Switchlinc was OFF (0%) and I just turned it on (100%) via the paddle and the program triggered true. That makes absolutely no sense to me, how can that program trigger true, when switching the Kitchen light from off (0%) to on (100%) from a paddle press based on how that program's if statement is written:

If
       (
            Status  'Downstairs - Kitchen' < 1%
        And (
                 Control 'Downstairs - Kitchen' is switched Off
              Or Control 'Downstairs - Kitchen' is switched Fast Off
            )
       )
    Or (
            Status  'Downstairs - Kitchen' is 100%
        And Control 'Downstairs - Kitchen' is switched On
       )
    Or Control 'Downstairs - Kitchen' is switched Fast On
   And $SB_DN_Kitchen_OnOff is 0

Then
       ..................

Link to comment
That makes absolutely no sense to me, how can that program trigger true, when switching the Kitchen light from off (0%) to on (100%) from a paddle press based on how that program's if statement is written:

 

That was one of my original concerns. I wonder if breaking it down further may help both of us with understanding this. Consider this simple program:

 

if 
status downstairs kitchen is on
then
..
else
...

When the downstairs kitchen is turned on from off, this program will trigger and evaluate true, correct?

 

Let's consider a second simple program as follows:

 

if
control downstairs kitchen is switched on
then
...
else
...

This program would ALSO evaluate as true when the kitchen is turned on from off, correct?

 

What happens when one combines these two conditions into a single program:

 

if 
status downstairs kitchen is on
and control downstairs kitchen is switched on
then
...
else
...

Would this program also not evaluate as true (both conditions are true) when the downstairs kitchen is switched from off to on?

 

Given this, is it easier to see how the "music - kitchen Down - On" program might evaluate as true?

Link to comment

Ok so I simplified the program as follows:

 

If
       (
            Status  'Downstairs - Kitchen' is 100%
        And Control 'Downstairs - Kitchen' is switched On
       )
   And $SB_DN_Kitchen_OnOff is 0

Then
       $SB_DN_Kitchen_OnOff  = 1
       $SB_DN_Kitchen_Toggle  = 1
       Resource 'SqueezeBox On - Downstairs - Kitchen - Z100'
       Set 'Downstairs - Kitchen' Query

Else
       Set 'Downstairs - Kitchen' Query

 

I then simply went to the kitchen Switchlinc and using the paddle simply turned the Switch on then off, on, off, on, off,......... until the program triggerd the Network Resouce / then statement after about 20 on, off sequence presses (allowing about a second or more between paddle presses). Again based on my paddle presses I don't understand how this program triggers the Network resource/then statement. I have attached a copy of the event viewer below showing the last few paddle presses if that helps, this means nothing to me but perhaps someone with more knowledge can tell me what is going on. What is even stranger to me is when I go to the programs summary page it says the last time the program status is false???

 

 

Sun 03/03/2013 06:51:58 PM : [  20 93 9B 1]      DON   0

Sun 03/03/2013 06:51:58 PM : [iNST-SRX    ] 02 50 20.93.9B 11.00.01 C3 06 00           (00)

Sun 03/03/2013 06:51:58 PM : [std-Group   ] 20.93.9B-->11.00.01, Max Hops=3, Hops Left=0

Sun 03/03/2013 06:51:59 PM : [iNST-TX-I1  ] 02 62 20 93 9B 0F 19 00

Sun 03/03/2013 06:51:59 PM : [iNST-ACK    ] 02 62 20.93.9B 0F 19 00 06          LTSREQ (LIGHT)

Sun 03/03/2013 06:51:59 PM : [iNST-SRX    ] 02 50 20.93.9B 0D.FE.6B 23 04 FF           (FF)

Sun 03/03/2013 06:51:59 PM : [std-Direct Ack] 20.93.9B-->ISY/PLM Group=0, Max Hops=3, Hops Left=0

Sun 03/03/2013 06:51:59 PM : [  20 93 9B 1]      DOF   0

Sun 03/03/2013 06:51:59 PM : [  20 93 9B 1]       ST   0

Sun 03/03/2013 06:52:00 PM : [iNST-TX-I1  ] 02 62 20 93 9B 0F 19 00

Sun 03/03/2013 06:52:00 PM : [iNST-ACK    ] 02 62 20.93.9B 0F 19 00 06          LTSREQ (LIGHT)

Sun 03/03/2013 06:52:00 PM : [iNST-SRX    ] 02 50 20.93.9B 0D.FE.6B 23 04 FF           (FF)

Sun 03/03/2013 06:52:00 PM : [std-Direct Ack] 20.93.9B-->ISY/PLM Group=0, Max Hops=3, Hops Left=0

Sun 03/03/2013 06:52:00 PM : [  20 93 9B 1]      DON   0

Sun 03/03/2013 06:52:01 PM : [iNST-TX-I1  ] 02 62 20 93 9B 0F 19 00

Sun 03/03/2013 06:52:01 PM : [iNST-ACK    ] 02 62 20.93.9B 0F 19 00 06          LTSREQ (LIGHT)

Sun 03/03/2013 06:52:01 PM : [iNST-SRX    ] 02 50 20.93.9B 0D.FE.6B 27 04 FF           (FF)

Sun 03/03/2013 06:52:01 PM : [std-Direct Ack] 20.93.9B-->ISY/PLM Group=0, Max Hops=3, Hops Left=1

Sun 03/03/2013 06:52:01 PM : [  20 93 9B 1]       ST 255

Sun 03/03/2013 06:52:01 PM : [iNST-TX-I1  ] 02 62 20 93 9B 0F 19 00

Sun 03/03/2013 06:52:01 PM : [iNST-ACK    ] 02 62 20.93.9B 0F 19 00 06          LTSREQ (LIGHT)

Sun 03/03/2013 06:52:02 PM : [iNST-SRX    ] 02 50 20.93.9B 0D.FE.6B 23 04 FF           (FF)

Sun 03/03/2013 06:52:02 PM : [std-Direct Ack] 20.93.9B-->ISY/PLM Group=0, Max Hops=3, Hops Left=0

Sun 03/03/2013 06:52:02 PM : [  20 93 9B 1]      DOF   0

Sun 03/03/2013 06:52:02 PM : [  20 93 9B 1]       ST   0

Sun 03/03/2013 06:52:02 PM : [iNST-TX-I1  ] 02 62 20 93 9B 0F 19 00

Sun 03/03/2013 06:52:02 PM : [iNST-ACK    ] 02 62 20.93.9B 0F 19 00 06          LTSREQ (LIGHT)

Sun 03/03/2013 06:52:02 PM : [iNST-SRX    ] 02 50 20.93.9B 0D.FE.6B 27 04 FF           (FF)

Sun 03/03/2013 06:52:02 PM : [std-Direct Ack] 20.93.9B-->ISY/PLM Group=0, Max Hops=3, Hops Left=1

Sun 03/03/2013 06:52:02 PM : [  20 93 9B 1]       ST 255

Sun 03/03/2013 06:52:02 PM : [iNST-TX-I1  ] 02 62 20 93 9B 0F 19 00

Sun 03/03/2013 06:52:02 PM : [iNST-ACK    ] 02 62 20.93.9B 0F 19 00 06          LTSREQ (LIGHT)

Sun 03/03/2013 06:52:03 PM : [iNST-SRX    ] 02 50 20.93.9B 0D.FE.6B 27 04 FF           (FF)

Sun 03/03/2013 06:52:03 PM : [std-Direct Ack] 20.93.9B-->ISY/PLM Group=0, Max Hops=3, Hops Left=1

 

I have attached the full event viewer log.

ISY-Events-Log.v4.0.2__Sun 2013.03.03 06.58.10 PM.txt

Link to comment

jwagner010

 

Comm with this device is poor

 

Sun 03/03/2013 06:51:58 PM : [std-Group ] 20.93.9B-->11.00.01, Max Hops=3, Hops Left=0

 

Sun 03/03/2013 06:51:59 PM : [std-Direct Ack] 20.93.9B-->ISY/PLM Group=0, Max Hops=3, Hops Left=0

 

Sun 03/03/2013 06:52:00 PM : [std-Direct Ack] 20.93.9B-->ISY/PLM Group=0, Max Hops=3, Hops Left=0

 

If an Off message is missed the On/Off/On/Off paddle sequence will get out of sequence with the ISY status.

 

Also why are two Querries being done? One in Then, one in Else?

Link to comment
Again based on my paddle presses I don't understand how this program triggers the Network resource/then statement.

 

(
Status  'Downstairs - Kitchen' is 100%
        And Control 'Downstairs - Kitchen' is switched On
       )
   And $SB_DN_Kitchen_OnOff is 0

 

Of those three conditions, which do you believe should prevent the execution of the THEN statement? (I am a little unclear about what causes the variable to change value.) BTW, the parentheses are no longer needed.

Link to comment

oberkc,

 

Of those three conditions, which do you believe should prevent the execution of the THEN statement? (I am a little unclear about what causes the variable to change value.) BTW, the parentheses are no longer needed.

 

Not sure I understand your question. If the light is Off and I turn it On, or if the light in On and I turn it Off that should not trigger the Then Statement based on the program above ie Status is 100% and Paddle is Switched on

 

Lee,

 

Also why are two Queries being done? One in Then, one in Else?
That was simply my attempt to try and ensure the ISY has the correct status after a paddle press. Initially I didn't have these in the program but added them.

 

I don't have any other issues with comms around this phase and run, perhaps I will get myself a new PLM given my current one is going on 6 years.

 

You say if the ISY missed an off command, can you confirm it did? My last press before it triggered was an On.

Link to comment
If the light is Off and I turn it On, or if the light in On and I turn it Off that should not trigger the Then Statement based on the program above ie Status is 100% and Paddle is Switched on

 

I would not be so certain. I attempted to offer an explanation in an earlier (if lengthy) post. Perhaps rereading this would help.

 

In my mind, this program will trigger true going from off-to-on, assuming the variable is zero. From off-to-on, both control and status conditions would evaluate as true. If the variable is zero, then all three conditions are true, thus the entire program would be true.

Link to comment
In my mind, this program will trigger true going from off-to-on, assuming the variable is zero. From off-to-on, both control and status conditions would evaluate as true. If the variable is zero, then all three conditions are true, thus the entire program would be true.

 

If the light is off its status is considered off (not on) when the program triggers for evaluation when I press the paddle On.

Link to comment

Two On sequences in a row.

 

Sun 03/03/2013 06:51:47 PM : [iNST-SRX ] 02 50 20.93.9B 00.00.01 C3 11 00 LTONRR (00)

 

Sun 03/03/2013 06:51:47 PM : [std-Group ] 20.93.9B-->Group=1, Max Hops=3, Hops Left=0

 

Sun 03/03/2013 06:51:47 PM : [iNST-SRX ] 02 50 20.93.9B 00.00.01 C3 11 00 LTONRR (00)

 

Sun 03/03/2013 06:51:47 PM : [std-Group ] 20.93.9B-->Group=1, Max Hops=3, Hops Left=0

 

Sun 03/03/2013 06:51:47 PM : [iNST-DUP ] Previous message ignored.

 

Sun 03/03/2013 06:51:47 PM : [iNST-SRX ] 02 50 20.93.9B 11.00.01 C3 06 00 (00)

 

Sun 03/03/2013 06:51:47 PM : [std-Group ] 20.93.9B-->11.00.01, Max Hops=3, Hops Left=0

 

Sun 03/03/2013 06:51:50 PM : [iNST-SRX ] 02 50 20.93.9B 00.00.01 C3 11 00 LTONRR (00)

 

Sun 03/03/2013 06:51:50 PM : [std-Group ] 20.93.9B-->Group=1, Max Hops=3, Hops Left=0

 

Sun 03/03/2013 06:51:50 PM : [iNST-SRX ] 02 50 20.93.9B 11.00.01 C3 06 00 (00)

 

Sun 03/03/2013 06:51:50 PM : [std-Group ] 20.93.9B-->11.00.01, Max Hops=3, Hops Left=0

Link to comment
What is even stranger to me is when I go to the programs summary page it says the last time the program status is false???

The reason for this is that once the program runs true it changes the variable state (of which it is monitoring in the IF)..which causes the program to run again, this time false.

 

The problem started when I changed out the Switchlinc to a dualband switchlinc so I suspect that has something to do it with it.
If the programs were working perfectly when the old switchlinc was in place and if the electrical connections are good and tight on the new dualband I would suspect the new dualband and would suggest either reinstalling the old switchlinc as an added test or if you have another dualband available try installing that one and testing. Odds may be slim that the dualband is defective..but its a possiblility.
Link to comment
If the light is off its status is considered off (not on) when the program triggers for evaluation when I press the paddle On.

 

I think this is where the confusion lies. In fact, the light is ON when the program triggers for evaluation, because turning the light on is the action triggering the evaluation. I believe this to be the root of your program problem in this example. Of course, communication problems could also be in play, here, as suggested by LeeG.

 

To use an example in an attempt to explain, how would you expect the following program to react (true or false?) when toggling the switch from off-to-on?

 

if
status downstairs-kitchen is on
then
...
else
...

 

I believe you will find that it evalates TRUE! Given this, how would you expect this program to evaluate when toggling the switch from off-to-on?

 

if
status downstairs-kitchen is on
and control downstairs-kitchen is switced on
then
...
else
...

 

I believe you will find that this evaluates TRUE, as well.

Link to comment

oberkc, if I understand what you are saying correctly then I sadly have to disagree with you this time. I have seen this type of program structure work in the past. I have also seen comm. problems cause the program to malfunction if there were less than 1 or 2 hops left.

I just ran a test with this program:

If
       Status  'WR Bench Lite' is On
   And Control 'WR Bench Lite' is switched On

Then
       Set 'Vent Fan' On

Else
  - No Actions - (To add one, press 'Action')

When the Bench lite is off and the switch is turned On the program executes Else (actually it executes false twice).

If the Bench Lite is On and is switched On the program executes Then (and stays true).

If the Bench Lite is On and the switch is turned Off the program executes Else.

 

In the first test where the light was off and the switch was turned on, the switch turning on caused the program to evaluate but at the exact moment the switch was turned on the status of the light in fact was off so the program evaluated false. When the status of the light updated to On the program re-evaluated but because the program evaluated when the status change occurred the control switching on didn't occur the program evaluated false again. To test I added an integer variable to the Else condition which would +1 for every evaluation which ran the Else.

Link to comment
oberkc, if I understand what you are saying correctly then I sadly have to disagree with you this time.

 

I hope, for jwagner010' sake, you are correct. I can tell you that, were each of these conditions in a separate program, they would both evaluate as true. Given this, I expect that both conditions in a single program would, therefore, be true. I have not, however, run an experiment to confirm.

 

In the first test where the light was off and the switch was turned on, the switch turning on caused the program to evaluate but at the exact moment the switch was turned on the status of the light in fact was off so the program evaluated false. When the status of the light updated to On the program re-evaluated but because the program evaluated when the status change occurred the control switching on didn't occur the program evaluated false again.

 

So your experience suggests that both conditions are not evaluated simultaneously. Do you suppose order of the conditions matters?

Link to comment
So your experience suggests that both conditions are not evaluated simultaneously. Do you suppose order of the conditions matters?
Yes it has been my experience. But like I said, comm issues will alter the results of the program.

Good question about the order. I just tested the order and it did not make a difference. I am not sure exactly why it works this way. Perhaps since programs are event triggered the first trigger sets the evaluation in motion and at the time of the trigger the status of the lite was off which caused the program to evaluate as false. Then the status changed of the light triggering the second evaluation again as false because at that moment the control was not being switched on.

 

Plus, I keep going back in my head to what the op has stated that these same programs work fine in other parts of his house and that this problem occurred after he replaced a SL with a DB SL which suggests either the DB SL is defective, his wiring is defective or something in the powerline has changed causing poor comm issues.

Link to comment

I jut ordered a few more SwitchLincs (they are on discount plus free shipping) and a new PLM (cannot hurt to have a backup even if it proves not to be the PLM) to see if that (plus unplugging everything on that circuit) improves the Comms and report back. Appreciate the help

Link to comment

Sorry for the long post. Did not want to edit the event traces.

 

A Program triggered by If Control has the If evaluated ‘before’ the Status changes from the same On command.

 

I used this test Program with a Dual Band SwitchLinc. Starting with the SwitchLinc Off, a tap of the On paddle triggers the Program with a True If. Status is Off when On command received. The If Control On triggers the Program with the If evaluated before any changes the On command may have to Status. Note the event trace shows the X10 A1 On issued when the Program initially triggers True because Status was Off when the On command is received. The Program is triggered a second time when Status changes to On, driving the Else clause and issuing the X10 A1 Off.

 

A second tap of the On paddle is done. The Program is triggered again by the If Control On but this time Status is On from the first On paddle tap so the If is False driving the Else clause issuing the X10 A1 Off only.

 

If
       Status  'SwitchLinc DB Dimmer v40' is Off
   And Control 'SwitchLinc DB Dimmer v40' is switched On

Then
       Send X10 'A1/On (3)'

Else
       Send X10 'A1/Off (11)'

 

Event trace of first On paddle press.

 

Mon 03/04/2013 11:42:28 AM : [iNST-SRX ] 02 50 1D.38.00 00.00.01 CB 11 00 LTONRR (00)

 

Mon 03/04/2013 11:42:28 AM : [std-Group ] 1D.38.00-->Group=1, Max Hops=3, Hops Left=2

 

Mon 03/04/2013 11:42:28 AM : [ 1D 38 0 1] DON 0

 

Mon 03/04/2013 11:42:28 AM : [ 1D 38 0 1] ST 255

 

Mon 03/04/2013 11:42:28 AM : [ X10] A1

 

Mon 03/04/2013 11:42:28 AM : [ X10] A1/On (3)

 

Mon 03/04/2013 11:42:28 AM : [ X10] A1

 

Mon 03/04/2013 11:42:28 AM : [ X10] A1/Off (11)

 

Mon 03/04/2013 11:42:28 AM : [iNST-SRX ] 02 50 1D.38.00 19.70.06 41 11 01 LTONRR (01)

 

Mon 03/04/2013 11:42:28 AM : [std-Cleanup ] 1D.38.00-->ISY/PLM Group=1, Max Hops=1, Hops Left=0

 

Mon 03/04/2013 11:42:28 AM : [iNST-DUP ] Previous message ignored.

 

Mon 03/04/2013 11:42:28 AM : [X10-RSP ] 02 63 66 00 06

 

Mon 03/04/2013 11:42:29 AM : [X10-RSP ] 02 63 62 80 06

 

Mon 03/04/2013 11:42:30 AM : [X10-RSP ] 02 63 66 00 06

 

Mon 03/04/2013 11:42:31 AM : [X10-RSP ] 02 63 63 80 06

 

 

Event trace of second On paddle press.

 

 

Mon 03/04/2013 11:42:34 AM : [iNST-SRX ] 02 50 1D.38.00 00.00.01 CB 11 00 LTONRR (00)

 

Mon 03/04/2013 11:42:34 AM : [std-Group ] 1D.38.00-->Group=1, Max Hops=3, Hops Left=2

 

Mon 03/04/2013 11:42:34 AM : [ 1D 38 0 1] DON 0

 

Mon 03/04/2013 11:42:34 AM : [ X10] A1

 

Mon 03/04/2013 11:42:34 AM : [ X10] A1/Off (11)

 

Mon 03/04/2013 11:42:34 AM : [iNST-SRX ] 02 50 1D.38.00 19.70.06 41 11 01 LTONRR (01)

 

Mon 03/04/2013 11:42:34 AM : [std-Cleanup ] 1D.38.00-->ISY/PLM Group=1, Max Hops=1, Hops Left=0

 

Mon 03/04/2013 11:42:34 AM : [iNST-DUP ] Previous message ignored.

 

Mon 03/04/2013 11:42:34 AM : [X10-RSP ] 02 63 66 00 06

 

Mon 03/04/2013 11:42:35 AM : [X10-RSP ] 02 63 63 80 06

 

Mon 03/04/2013 11:43:58 AM : [All ] Writing 0 bytes to devices

 

 

This is the same test run with a SwitchLinc that is not Dual Band. Same results. If Control On triggers the Program with the If evaluated before any Status changes resulting from the On command.

 

If
       Status  'SwitchLinc Dimmer' is Off
   And Control 'SwitchLinc Dimmer' is switched On

Then
       Send X10 'A2/On (3)'

Else
       Send X10 'A2/Off (11)'

 

Event trace of first On paddle press from a SwitchLinc Off Status

 

Mon 03/04/2013 12:04:08 PM : [iNST-SRX ] 02 50 16.3F.93 00.00.01 CB 11 00 LTONRR (00)

 

Mon 03/04/2013 12:04:08 PM : [std-Group ] 16.3F.93-->Group=1, Max Hops=3, Hops Left=2

 

Mon 03/04/2013 12:04:08 PM : [ 16 3F 93 1] DON 0

 

Mon 03/04/2013 12:04:08 PM : [ 16 3F 93 1] ST 255

 

Mon 03/04/2013 12:04:08 PM : [X10-RSP ] 02 63 6E 00 06

 

Mon 03/04/2013 12:04:08 PM : [ 1D 23 6B 1] ST 255

 

Mon 03/04/2013 12:04:08 PM : [ X10] A2

 

Mon 03/04/2013 12:04:08 PM : [ X10] A2/On (3)

 

Mon 03/04/2013 12:04:08 PM : [ X10] A2

 

Mon 03/04/2013 12:04:08 PM : [ X10] A2/Off (11)

 

Mon 03/04/2013 12:04:09 PM : [iNST-SRX ] 02 50 16.3F.93 19.70.06 4B 11 01 LTONRR (01)

 

Mon 03/04/2013 12:04:09 PM : [std-Cleanup ] 16.3F.93-->ISY/PLM Group=1, Max Hops=3, Hops Left=2

 

Mon 03/04/2013 12:04:09 PM : [iNST-DUP ] Previous message ignored.

 

Mon 03/04/2013 12:04:09 PM : [X10-RSP ] 02 63 62 80 06

 

Mon 03/04/2013 12:04:10 PM : [X10-RSP ] 02 63 6E 00 06

 

Mon 03/04/2013 12:04:11 PM : [X10-RSP ] 02 63 63 80 06

 

Second On paddle press

 

Mon 03/04/2013 12:04:24 PM : [iNST-SRX ] 02 50 16.3F.93 00.00.01 CB 11 00 LTONRR (00)

 

Mon 03/04/2013 12:04:24 PM : [std-Group ] 16.3F.93-->Group=1, Max Hops=3, Hops Left=2

 

Mon 03/04/2013 12:04:24 PM : [ 16 3F 93 1] DON 0

 

Mon 03/04/2013 12:04:24 PM : [ X10] A2

 

Mon 03/04/2013 12:04:24 PM : [X10-RSP ] 02 63 6E 00 06

 

Mon 03/04/2013 12:04:24 PM : [ X10] A2/Off (11)

 

Mon 03/04/2013 12:04:24 PM : [iNST-SRX ] 02 50 16.3F.93 19.70.06 4B 11 01 LTONRR (01)

 

Mon 03/04/2013 12:04:24 PM : [std-Cleanup ] 16.3F.93-->ISY/PLM Group=1, Max Hops=3, Hops Left=2

 

Mon 03/04/2013 12:04:24 PM : [iNST-DUP ] Previous message ignored.

 

Mon 03/04/2013 12:04:25 PM : [X10-RSP ] 02 63 63 80 06

Link to comment

Thanks, LeeG and TJF1960. This is certainly NOT what I expected. However, knowing this creates some methods and tricks for programming that I had not considered. I am probably still curious enough about this that I might try another similar experiment to see if the order (status--->control versus control--->status) matters. I also assume that this is near 100% repeatable, and that there are no timing issues that can affect this.

 

JWagner010, I guess this means that my concerns are demonstrated nonvalid. Perhaps it is communication problems (whatever they may be) that are the sole cause of your difficulties.

Link to comment

oberkc

 

I have not seen timing issues or variations with this example. Would be great to have additional testing done.

 

EDIT: if you do find something unexpected see if it can be reproduced with the event trace running and post the event trace. thanks

Link to comment

LeeG, I will keep everyone advised of anything I find out. This one surely has my interest piqued.

 

Because my mind is evil, I cannot help but take this type of scenerio to an extreme and wonder what would happen if one had two controls or two status conditions, or some other combination of conditions triggered by the same device....

 

if control deviceA is switched on

and control deviceA is switched on

then...

else...

 

or

 

if status of switchA is on

and status of switchA is on

then...

else....

 

Should the experiments so far be taken to suggest that there is some heierchy of conditions, such as control before status. I wonder where that might leave a variable whos value changes based on switchA. I also wonder if this hierchy is simply a natural outcome of timing, or whether it is hard-coded.

 

But then, I realize that life is sometimes too short to spend a lot of time worrying about such things.

Link to comment

Archived

This topic is now archived and is closed to further replies.


  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      36.9k
    • Total Posts
      370.3k
×
×
  • Create New...