-
Nested If's?
Wow - Guy - thanks for all of this. This is really expanding my horizons about what I might be able to do and potentially simplify some of the things I have already done. Truly appreciated!!! Now.....about world peace.......
-
Nested If's?
Well now you have piqued my interest even more. So if I create a program (NOT Disabled) with an 'IF" statement that simply looks at a state variable (e.g. in my case the "Poll_Running" integer variable) - so for example "If Poll_Running = 1" - does that mean that this program will run whenever that variable gets set to 1 without specifically being called by another program? If so - does that not mean that the "else" portion of that program would be "true" almost all the time (except when Poll_Running = 1") and hence would be constantly "running"? I must be missing something here..... If so - that blows my mind - I had assumed that programs were only triggered either by looking at insteon device state or control statements when someone manually operates a switch OR when called by another program. Is this not the case - and that programs with a simple variable in the IF will be automatically triggered if that variable changes to the required value? I also remember someone telling me that programs that have Control/State "if" tests of insteon devices are only triggered by manual changes to a device and NOT by changes initiated by a program - so that would then kinda be in conflict with the above would it not? Or perhaps I just have made a leap of logic to somewhere that does not exist LOL.... Please elaborate. This is extremely interesting......
-
Nested If's?
No all you have to do is tell me how to make program calls in a synchronous manner (so that my parent program waits for the called programs to finish before executing the next command) rather than executing them all (basically) simultaneously and then moving on immediately LOL. If you can do that - I'm thinking you may also have a solution for world peace?
-
Nested If's?
That is very interesting - so if you mark a program as disabled you can still call it? I was not aware of THAT - I thought if it was disabled - then it is disabled. Thate introduces some quite interesting concepts for me. Just to clarify - setting to disabled then really only means "do not react automatically to status or control changes within the insteon network" (for example if I use a Status or a Control element in the "if" for a device - if that device is manually turned on or off - the program will not fire), however it WILL run if I call it from another program? Very interesting - please confirm that my understanding of that is correct.
-
Nested If's?
Yes - this is the approach I decide to try out. It does work - but it's just a lot of programs (as I need to do this for many rooms (one program per room, and one line of the if statement for each device in a room) - hence looking to try and reduce number of programs by finding some potential alternative. This is very interesting - I have never used the "Repeat While" function - I will investigate that. This "could" be the solution to reducing the number of programs significantly. I'll let you know how it goes.
-
Nested If's?
I originally thought about this (the Poll_Running variable is already an integer - set by a prior program). Unfortunately if I add th ePoll_Running variabel to the if clause - then when this runs if Poll_Running is "not" 1 - then it will default to the "else" clause when triggered - which I do not want it to do.
-
Nested If's?
Hi - trying to find out if there is a way to do a nested "if". In other words - I need the "if" to be inside the "Then" and the "Else" (I need to do this for a variable test as part of a program that tests status of several devices). I cannot add this test as part of the first "if" because then the "else" will fire and run those commands - though I need the same "if" within the else. Basically the code would be: IF status Device_X is off AND status Device_Y is off AND status Device_Z is off Then if variable Poll_Running =1 Then do something Else if variable Poll_Running =1 then do something different Bottom line - if the Poll_Running variable is not 1 - then I don't want anything to happen irrespective of the state of the devices. Any thoughts?
-
SMonk started following All Off Keypadlinc with notice , Nested If's? , Synchronous or Asynchronous? and 2 others
-
All Off Keypadlinc with notice
I discovered the reason. I needed to introduce a delay into the process before attempting to turn off the LED. If looks like the program was performing the command to turn off the LED - but it looks like the system had not "settled" down to all the activities that were happening. The button controlled (turned off via a scene) 90 insteon devices - as a result this took a little time to complete. I added a 10 second delay just prior to setting the LED scene to off - and this works pretty reliably. 5 seconds and it never worked. Thought I should let everyone know.
-
Synchronous or Asynchronous?
EISY IoX Firmware: 6.0.5 Due to a requirement to handle a lot of devices I have created a number of programs that look at various "groups" of devices (basically rooms, areas and floors) to determine their status prior to then executing other programs. I wanted to try to create this is a modular fashion so as to minimize the amount of code created and to make maintenance easier (define the code once - call it from multiple sources). In some cases some of the programs call several of these programs in sequence. This gets to the root of this question - and I think I know the answer - but I wanted to confirm. Does the EISY execute program commands in a Synchronous or Asynchronous way? I think I have discovered that it is Asynchronous (basically when calling several programs - it calls the next program immediately without waiting for the first program to finish). Can this be confirmed? If it is indeed Asynchronous - is there an approach that can be used to create (basically) modular subroutines (other programs) that will make the calling program wait until its execution has finished?
-
Non-Toggle[Off] - Flashes?
Hi, KeyPadLinc secondary button (Master Off) set up as Non-Toggle[Off] (so it only sends off to any responders in a scene where it is the controller). Works perfectly. I noticed that when I click the button it flashes twice - I am guessing that this is just to let you know it did something. I created a program that turns the "Master Off" keypadlinc LED "On" when a user clicks any of the other switches that this "Master Off" controls - works perfectly. Here is what I have found that is weird (took me literally HOURS of trying to work this out due to the debugging I put in the program). I created another program that will turn this LED light off when the "Master Off" is clicked - but what I found is that unless I program a 5 second delay into the program just before the command to turn off the "Master Off" LED - the LED will stay lit....If I program a 5 second delay you can see the button doing its own "flashing" thing - then a couple of seconds later the LED will dim. If its anything less than 5 seconds - the LED will flash away - but will then stay lit.... If the delay is less than the 5 secs - then the program is definitely triggered (I created some variables to debug and capture what the program was going) - its just that the LED "off" command seems to be sent before the "flashing" process concludes - and for some reason the LED stays on. Has anyone encountered this - and have any insights why this might be happening? I suppose I can live with the delay at the Master Off when I click it - it just is a little weird...... Thoughts/pointers/ideas? Has anyone set up a Non-Toggle[Off] - "Master Off" like this (that becomes lit when any of its "children" are On and Off when not, and will also turn off when you push it)?
-
Start Linking- cannot exit?
No button in the console worked - in the end I pulled the plug and had it reboot…. That did work 😁
-
Start Linking- cannot exit?
Hi - II accidentally clicked start linking - there was no "cancel" and the "x" in the top right of the window did not work - so I ended up just closing the browser. No each time I open - it basically reopens some window that says "linking" Any one any idea: a. What it is doing b. how to stop it? Thanks!
-
All Off Keypadlinc with notice
noticed an error in the program - here is the corrected version (still does not work :-) ). Note that I also cleared the log and then clicked that keypad linc button - and - nothing in the log at all - completely empty (as it happens the admin console generates errors when the log is empty ). But - it is empty. So does that mean that when a keypadlinc button is set up like this and someone presses it that the EISY does not get any kind of notification? MainLevelAllOffLEDReset - [ID 0025][Parent 0022] If 'MainLevel / Kitchen Area / Entry / KitEntPad3_5_MainAllOff' Status is Off Or 'MainLevel / Kitchen Area / Entry / KitEntPad3_5_MainAllOff' is switched Off Then Set 'MainLevel / Kitchen Area / Entry / Scenes / MainLevelOffLEDControl' Off Else - No Actions - (To add one, press 'Action')
-
All Off Keypadlinc with notice
Hello all, Me again. I am now trying to set up a keypad linc button to only send an "off" signal - that part has been done and is working great. (set keypad linc secondary button toggle mode to "Non-Toggle [Off]" - add to a scene as a controller and then the other items I want to turn off added as responders). All good works like a charm. Now we get to the tricky bit. The keypadlinc pad is by the door and I want it to "light" if any of the responders are switched on by a person. Ok - I also got that to work by writing a program the monitors for each of the "responders" to get switched - and if so then it sets the keypadlinc button to "On" (created a scene where the keypad linc button is a responder and program turns on the scene). This also works fine - and whenever I turn something on - the keypadlinc secondary button lights up - all good so far. Here is the issue - when I click the keypad linc button - it turns everything off still as it should - but the keypad linc button stays lit (which I thought it would anyway due it no longer being defined as a toggle switch). So I thought the way around this would be to write a program to capture when the keypad linc button is pressed - and then just set its own LED to "off" (I used a scene for this where the keypad linc button is simply a responder - so I set the scene to off). However, this program simply will not "fire" - or its not working (I have the If statement checking if the keypadlinc button is switched off OR if the status is off. Anyone any idea on how I can what I thought would be a simple process to work to turn off the LED when I click the keypadlinc button? Here is the program watching for the keypadlinc button press: MainLevelAllOffLEDReset - [ID 0025][Parent 0022] If 'MainLevel / Kitchen Area / Entry / KitEntPad3_5_MainAllOff' Status is Off Or 'MainLevel / Kitchen Area / Entry / KitEntPad3_3_InAllOff' is switched Off Then Set 'MainLevel / Kitchen Area / Entry / Scenes / MainLevelOffLEDControl' Off Else - No Actions - (To add one, press 'Action')
-
One KeyPadLinc Button to Rule Them All?
Wow - very interesting (and I must admin a little over my head - never looked at logs - so not sure exactly what everything means in there). Just a huge THANK YOU to all who commented and responded. It is TRULY appreciated!
SMonk
Members
-
Joined
-
Last visited