Jump to content

Problem with my Program or Communications Issue?


Illusion

Recommended Posts

Posted

I have a KPL v.2D that I have been having intermittent problems with for some time. I have my front porch light as the load for this 6 button KPL, which is triggered by the ISY in response to motion. Sometimes the light will be on when I know it should have turned off. I created a program to query the state of the switch for conformation, but that did not help. I would notice the light on when it should be off, open the Admin Console and see that the ISY was complaining of 'Failure to Communicate' with this device and the status of the device would show as off. I added a SwitchLinc v.27 to the circuit and the programs to test whether I have a comm issue, or a defective switch, but the results of this test confuse me even more.

 

Motion-Front Porch Enabled

If
       Control 'Front Porch-Sensor' is switched On
   And Program 'Dark Outside' is True

Then
       Run Program 'Front Porch Motion On' (If)
       Wait  5 minutes 
       Run Program 'Front Porch Motion Off' (If)
       Repeat Every  0 seconds
          Wait  10 seconds
          Set 'Front Porch KPL' Query
          Wait  5 seconds
          Run Program 'Front Porch Motion Off' (If)
          Wait  5 seconds
          Wait  15 seconds (Random)

Else
       Repeat Every  0 seconds
          Run Program 'Front Porch Motion Off' (If)
          Wait  10 seconds
          Set 'Front Porch KPL' Query
          Wait  5 seconds
          Wait  15 seconds (Random)

Front Porch Motion On Not Enabled

If
       Status  'Front Porch KPL' is not On

Then
       Set 'Front Porch KPL' On
       Set 'XX- Test Switch V.27' On

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


Front Porch Motion Off Not Enabled

If
       Status  'Front Porch KPL' is On

Then
       Set 'Front Porch KPL' Off
       Set 'XX- Test Switch V.27' Off

Else
       Stop program 'Motion-Front Porch'


 

I had the failure the other night. I open the Admin Console and get the expected warning about comm failure with the KPL, but no exclamation point on the device tree.

 

The ISY shows the status of the KPL as off which is false, but expected with the comm failure. As the ISY believes the KPL off, the loop in 'Motion-Front Porch' is stopped.

 

The ISY shows the status of the test switch as On.

 

A query of both devices changes the status in the ISY to On for the KPL and the test switch also has its status stay as On. How can this be? If the program ran as it should, the test switch should have been off. Does the failure of the KPL to respond affect the ISY's ability to send the next command in a program.

 

If I had a comm failure to the switch as well as the KPL I would expect the ISY to show an Off condition for the switch just like the KPL regardless of reality. If I did not have a comm failure, why is the test switch on?

 

Any thoughts or help would be appreciated. I am missing something here, I just do not know what it is...

Posted

Hi Illusion,

 

It seems that the comm errors happen when your motion sensor is activated. Does this motion sensor control any other devices (in a scene)? Since the issue seems to revolve around when the motion sensor is activated, I would try to figure out what else may turn on at the same time. In short, we have to figure out what's causing the comm errors.

 

With kind regards,

Michel

Posted

Hi Illusion,

 

Are the SWL and KPL on the same circuit?

 

Also, can we make the programs simpler? For instance, you do not have to check the status of the KPL before you turn it on. i.e. sending an On command to an already On device is not going to cause any problems.

 

Furthermore, from experience, I can tell you continuously querying devices might cause communication errors. I know you added these to ensure the status is OK ... but it would be best to figure out why the status would be wrong in the first place rather than querying the KPL all the time.

 

With kind regards,

Michel

Posted

Lets assume a comm failure. The SWL and KPL are on the same circuit.

 

At this point, I am only trying to understand one thing:

 

Why does the ISY think that the test switch is on, and in fact it is on, after this program sequence has run? But it thinks the KPL is Off.

 

If there is a comm failure to a device in a program, does the program stop running? That is the only explanation I can currently come up with.

 

In fact, I am going to reverse the position of the devices in the program so the ISY talks to the test switch first.

Posted

Hello Illusion,

 

This program becomes false when the KPL is switched Off and the Test Switch will not be switched Off. If you switch the actions in the Then portion the switch will be switched off before the program changes status.

 

Front Porch Motion Off Not Enabled

If
       Status  'Front Porch KPL' is On

Then
       Set 'Front Porch KPL' Off
       Set 'XX- Test Switch V.27' Off

Else
       Stop program 'Motion-Front Porch'

 

Rand

Posted

Rand,

 

Thanks for taking the time to wade through those interrelated programs. I thought the same thing about the program becoming false, but the program is Not Enabled.

 

As I understand the ISY, and as I have these programs set up, that action changing a condition of the program should not be a factor here. The "IF" is only evaluated when specifically called on from Motion-Front Proch. A change to any condition after this evaluation should not have any effect. Or so I thought. Am I wrong on this point? Have I been misunderstanding the way the ISY functions? If so, I have a whole bunch of programs that are Not Enabled where the conditions are changed by the actions that I will have to revisit.

Posted

I re-wrote the programs so the test switch is first in the program and it happened again last night and the results were the same.

 

I went to the log and found this relevant entry:

 

XX- Test Switch V.27 On 255 Mon 10/26/2009 08:20:44 PM Program Log

Front Porch KPL On 255 Mon 10/26/2009 08:20:44 PM Program Log

XX- Test Switch V.27 Status 100% Mon 10/26/2009 08:20:44 PM System Log

 

The detector sees motion, runs the initial program, but the ISY does not realize that it succedded in turning on the front porch, so when it runs Front Porch Motion Off Not Enabled it stops the program because it runs the Else Clause erroneously.

 

Notice that there is no System Log for the KPL status! The ISY still thinks the KPL is off even though it is really on. This prevents the test switch from getting turned off because the ISY thinks the KPL is already off!

 

So I have answered the question of how this is even possible, but now I have another question:

 

If the ISY sends a direct command to a device like "turn on" is there a communication failure that would allow the device to turn on but have the ISY think the device is still off?

Posted

Hi Illusion,

 

Based on the logs, ISY does think that the Front Portch KPL is On. I am not sure why your program would run the else clause unless there's another program that's running it explicitly.

 

Direct commands all get a response back from the device and, as such, either they will be in error (with the ! mark) or they will have the correct status.

 

With kind regards,

Michel

 

I re-wrote the programs so the test switch is first in the program and it happened again last night and the results were the same.

 

I went to the log and found this relevant entry:

 

XX- Test Switch V.27 On 255 Mon 10/26/2009 08:20:44 PM Program Log

Front Porch KPL On 255 Mon 10/26/2009 08:20:44 PM Program Log

XX- Test Switch V.27 Status 100% Mon 10/26/2009 08:20:44 PM System Log

 

The detector sees motion, runs the initial program, but the ISY does not realize that it succedded in turning on the front porch, so when it runs Front Porch Motion Off Not Enabled it stops the program because it runs the Else Clause erroneously.

 

Notice that there is no System Log for the KPL status! The ISY still thinks the KPL is off even though it is really on. This prevents the test switch from getting turned off because the ISY thinks the KPL is already off!

 

So I have answered the question of how this is even possible, but now I have another question:

 

If the ISY sends a direct command to a device like "turn on" is there a communication failure that would allow the device to turn on but have the ISY think the device is still off?

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.4k
×
×
  • Create New...