JP Posted July 17 Share Posted July 17 (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? Edited July 17 by JP Quote Link to comment
Solution hart2hart Posted July 17 Solution Share Posted July 17 The If is evaluated false during that 3 minute wait. 1 Quote Link to comment
JP Posted July 17 Author Share Posted July 17 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. Quote Link to comment
paulbates Posted July 17 Share Posted July 17 (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 July 17 by paulbates 2 Quote Link to comment
Techman Posted July 17 Share Posted July 17 (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 July 17 by Techman Quote Link to comment
IndyMike Posted July 17 Share Posted July 17 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? Quote Link to comment
JP Posted July 17 Author Share Posted July 17 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. Quote Link to comment
JP Posted July 17 Author Share Posted July 17 paulbates the program already is split between two programs. I'll moved the WAIT command to the second program and see if that helps. Quote Link to comment
Geddy Posted July 17 Share Posted July 17 @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. Quote Link to comment
JP Posted July 17 Author Share Posted July 17 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. Quote Link to comment
JP Posted July 17 Author Share Posted July 17 Thanks to all the help you gave!!! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.