x046866x Posted December 1, 2016 Posted December 1, 2016 I am interested in running a command after my repeat loop is complete. For example I am running this: then Repeat 4 times Set 'MainHouse / Bulb - Office' On Set 'MainHouse / Bulb - Foyer' On Wait 1 second Set 'MainHouse / Bulb - Office' Off Set 'MainHouse / Bulb - Foyer' Off Wait 1 second but every so often one of the bulbs is left on. I'd like to do something to the effect of (I recognize the brackets are not appropriate in this context...I put them here for demonstration) {Repeat 4 times Set 'MainHouse / Bulb - Office' On Set 'MainHouse / Bulb - Foyer' On Wait 1 second Set 'MainHouse / Bulb - Office' Off Set 'MainHouse / Bulb - Foyer' Off Wait 1 second} Set 'MainHouse / Bulb - Office' Off Set 'MainHouse / Bulb - Foyer' Off I know I can run commands before the loop. I'm going to wrap the loop into a separate program and try that, but hate cluttering the folder. Should I just get over that? Quote
MWareman Posted December 1, 2016 Posted December 1, 2016 (edited) After the commands you want to loop, put a 'Repeat 1 time' command. Commands after that won't repeat. Edited December 1, 2016 by MWareman Quote
larryllix Posted December 1, 2016 Posted December 1, 2016 (edited) Hitting an Insteon Network with repeated commands sometimes bogs it down and the ISY/PLM transmit buffers may overflow and forget/miss things. Try a longer wait time in your loop for an experiment. This sounds like you have some flakey comms and that will increase the Insteon traffic congestion even more with repeated tries. Yu could also try putting the devices into one scene and flash it on and off. It causes less Insteon traffic. I use with 20 devices in it (whole house) and it works much better for flashing. Two second delays work better though. Edited December 1, 2016 by larryllix Quote
x046866x Posted December 1, 2016 Author Posted December 1, 2016 I actually wrapped it up in the program and it looks like this. In the end this really is a better organization and if I want to clean up clutter I can move sub-routines (of sorts) to a folder. So far this seems to work fine. I may also inject some additional pause as advised by larryllix. The comm does have to travel from one box to a sub panel box to get to the bulb in question (yes, I have a phase coupler) which may add to some flakiness. Would injecting the pause between the on's and off's help that any? FlickerForDrivewayMotion program: if Control 'Mainhouse / MotionSensorDriveway / Sensor-Sensor' is switched On then Run Program 'BulbsFlicker' (Then Path) Run Program 'BulbsTurnOff' (Then Path) BulbsFlicker program: then Repeat 4 times Set 'MainHouse / Bulb - Office' On Set 'MainHouse / Bulb - Foyer' On Wait 1 second Set 'MainHouse / Bulb - Office' Off Set 'MainHouse / Bulb - Foyer' Off Wait 1 second BulbsTurnOff program: then Set 'MainHouse / Bulb - Office' Off Set 'MainHouse / Bulb - Foyer' Off Quote
larryllix Posted December 1, 2016 Posted December 1, 2016 (edited) I actually wrapped it up in the program and it looks like this. In the end this really is a better organization and if I want to clean up clutter I can move sub-routines (of sorts) to a folder. So far this seems to work fine. I may also inject some additional pause as advised by larryllix. The comm does have to travel from one box to a sub panel box to get to the bulb in question (yes, I have a phase coupler) which may add to some flakiness. Would injecting the pause between the on's and off's help that any? FlickerForDrivewayMotion program: if Control 'Mainhouse / MotionSensorDriveway / Sensor-Sensor' is switched On then Run Program 'BulbsFlicker' (Then Path) Run Program 'BulbsTurnOff' (Then Path) BulbsFlicker program: then Repeat 4 times Set 'MainHouse / Bulb - Office' On Set 'MainHouse / Bulb - Foyer' On Wait 1 second Set 'MainHouse / Bulb - Office' Off Set 'MainHouse / Bulb - Foyer' Off Wait 1 second BulbsTurnOff program: then Set 'MainHouse / Bulb - Office' Off Set 'MainHouse / Bulb - Foyer' Off Your main program calls the flicker program and then immediately calls a program to turn them off while Flicker is running. You have no control on which program ISY will execute first. Put your program lines from both program back into the DrivewayMotion program and addd a "Repeat 1 times" as per MWareman, if you want another Off insurance. Increase at least one Wait to 3 seconds. I like make the Off time 3 seconds and the On time 1 second so it looks more attention getting. Edited December 1, 2016 by larryllix Quote
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.