Jump to content

Strange Problem with a Program


Go to solution Solved by hart2hart,

Recommended Posts

Posted (edited)

Howdy,

I am having a problem with a program. It runs fine (triggered by Zigbee sensor) as it executes the first instruction in the THEN clause (a SET command which works fine) and when it hits the second instruction (a WAIT) it goes to end of program without executing the WAIT or any subsequent commands.

Any ideas?

image.png

Edited by JP
Posted

Mmmm, never had to deal with this possibility. This is occurring with the Zigbee sensors only. I’ll be surprised if this is the problem because the sensors hold their value for 30 seconds and the set command is only 1 second or less and the WAIT times out immediately.
 

I’ll try some different methods tomorrow to test this theory.

Posted (edited)

@hart2hart is correct. The motion sensor is returning to a "no motion detected" or "system alarm off" state before the 3 minute wait in the program completes. The "if" statement evaluates as false, and the program cancels at that moment during the 3 minute wait. A way around this is to make 2 programs: 

  • copy the program and call the copy "JP's closet detector 2"
  • Remove the "if" from program 2, leaving it blank
  • remove the "then" statements from program 1
  • add a single statement to program 1 that is a program statement that calls program 2.. Run program JPs closet detector 2

Because program 2 has no "if", it can't be evaluated as false, and it will run through without the sensor stopping it. If the closet sensor trips again in program 1, that will restart program 2 so the light will stay on if you are in the closet for a while.

If you post the program steps as text instead of a graphic, i could copy that and show both programs 

Edited by paulbates
  • Like 2
Posted (edited)

Why not use CONTROL instead of STATUS in the IF field.  The THEN clause would run until completion. You could  keep it as one program.  If motion continues to be detected the then clause would restart.

Edited by Techman
Posted
1 hour ago, Techman said:

Why not use CONTROL instead of STATUS in the IF field.  The THEN clause would run until completeion. You could  keep it as one program.  If motion continues to be detected the then clause would restart.

This works for Insteon motion sensors.

Does it apply to Zigbee/Z-wave? 

Posted

Techman the answer is that CONTROL does not work with Zigbee devices (as far as I can see). When I use CONTROL the sensor does not show in the drop down list.

Posted

paulbates the program already is split between two programs. I'll moved the WAIT command to the second program and see if that helps.

Posted

@JP as @hart2hart suggests, it sounds like the "IF" is becoming false while the waits are in process. As soon as the program becomes false it will quit running. 

Try removing the waits and see if the program performs all the lines in the "THEN" statement. If you must have the waits then @paulbates suggestion of having 2 programs with one blank "IF" would help as it wouldn't re-evaluate as the program is possibly currently doing. 

As @paulbates posting a text version of the program is preferred. It helps others help you directly with comments/changes to the program. Text is also easier to read on mobile devices. Screen shots become tiny and have to be zoomed in and moved around a lot. 

Right click on the program and select the last item "COPY to Clipboard". Then paste as text in your forum post. This way the program is available for others to make suggestions/changes. 

Posted

The preliminary test looks good. It was the WAIT command. It was confusing because the program summary screen was not showing the program as Running for the 30 seconds that the sensor was holding On condition high.

 

I am in the process of replacing my Insteon MD-II devices with Zigbee ones. With the Insteon devices the CONTROL statement work fine but the Zigbee ones do not. With the CONTROL I could have the WAIT in the first program and it did not care that the status was, but oh well.

With the Zigbee devices I have less work to do in the Admin System, they do not work with Scenes but their program reaction time is almost as good as Scenes and a lot quicker than Insteon program reactions.

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