Jump to content

apostolakisl

Members
  • Posts

    6869
  • Joined

  • Last visited

Everything posted by apostolakisl

  1. I'm guessing you are having communication issues. I doubt the querry all is the issue. The "not specified" is what happens when a program is set to control a device or scene and then the device or scene is deleted. A querry all command is not necessary for ISY to run properly. It is just sort of a clean up that ensures ISY has the correct status of everything at least once per day. Are you getting any failure to communicate warnings? You have all dual band stuff, are the switches within rf range of the plm? Also sometimes if you try sending too many Insteon commands all at once I have found that things get missed. I assume that this is from too much traffic on the power lines. I don't know how that relates to the daul band stuff. Anyway, try having the programs run a second or two apart instead of all at once. However, I have only found this to be a problem when sending far far more commands than you are. Since it worked when you manually did the run then command, I suspect you either have an if statement error, or you are getting insteon traffic overload issues. With only a few devices, however, I am leaning more towards an if statement error.
  2. No, these are different. They are connected to the unit via an RS-485 connection I believe. The thermostats can pull up all kinds of info, like static pressures in all of the various air handling stages, freon pressures, outside temp, a history of any fault codes, status of accessories like humidifiers, air filters, hours in operation on all of the different modes (high heat, low heat, high cool, low cool,) hours since installation and on and on it goes.
  3. Your program makes me wish I had thermostats I could control. I have a Carrier Infinity system that uses special thermostats. Oh well.
  4. I have had inconsistent results when I write one program with a boat load of scenes to execute (or shut off). They usually work, but not always. I am sure it has something to do with Insteon signal overload. However, if you have multiple lights in the basement that you want to control independently while in the basement, and you want one kpl button upstairs to shut them all off, you pretty much have to use a program like you are using. If you are willing to use multiple kpl buttons, then you could use one kpl button for each set of lights in the basement and join it to a scene as a controller/responder for each set along with the actual basement switches. This is going to be the most reliable and require no programs, but it will eat up several kpl buttons. If you only care to have all of the lights in the basement turn on and off as a single group, you can create a single scene with each switch plus your upstairs kpl button as controller/responders.
  5. Below is my program for creating an every other, every third, every fourth, and every fifth variable. The value of each of those variables will start at 0, count up to it x-1 where x is every x days. ie, for every fourth, it will go 0,1,2,3,0,1,2,3 etc. If Time is 12:00:00AM Then $iDay.Counter += 1 $iEvery.Other.Day.Counter = $iDay.Counter $iEvery.Thrid.Day.Counter = $iDay.Counter $iEvery.Fourth.Day.Counter = $iDay.Counter $iEvery.Fifth.Day.Counter = $iDay.Counter $iEvery.Other.Day.Counter %= 2 $iEvery.Thrid.Day.Counter %= 3 $iEvery.Fourth.Day.Counter %= 4 $iEvery.Fifth.Day.Counter %= 5 $iDay.Counter Init To $iDay.Counter $iEvery.Other.Day.Counter Init To $iEvery.Other.Day.Counter $iEvery.Thrid.Day.Counter Init To $iEvery.Thrid.Day.Counter $iEvery.Fourth.Day.Counter Init To $iEvery.Fourth.Day.Counter $iEvery.Fifth.Day.Counter Init To $iEvery.Fifth.Day.Counter Else - No Actions - (To add one, press 'Action') Now for your sprinkler program If Time is 6am And ievery.other.day.counter = 0 (or you could use 1 for the other half of every other day) Then Sprinkle The beauty of this is how simple it is to change it to a different schedule, so in the spring and fall you might want every 3 or 4. In the winter you might make an every 15'th or 20th depending on your climate. And you can pull these same variables for any other program you want to happen like this. Edit: I added init to's for reboot protection.
  6. You need to make a counter program. I suggest just haveing a counter that counts days from now to forever ($integervariablecounter). (at 12 am $integervariablecounter += 1) Then in your program, use the %= command to calculate a remainder. $integervariableremainder=$integervariablecounter $integervariableremainder %=2 this will allow an every other day. for example. if the variable is currently 3 and you divide by 2, the remainder will be one. If it is 4, the remainder will be 0. Set your sprinkler to go off on $integervariableremainder either 1, or 0. Either way, it will be every other day. If you change your mind and want every 3rd day, just change to %=3 and so forth. I would write the full out code, but am not at my isy computer.
  7. I have no clue what is Insteon Group Messaging. So far, this lack of understanding has not hindered my use of insteon. I suspect the phrase used in the insteon standard is "scene". In my mind, a scene is analogous to a set of devices all having the same X-10 address, with the ability to define some as transmitters of, others as responders to, or some as both transmitters AND responders to that address. To me, introducing "group" terminology adds an unecessary complication into the picture. I wouldn't think of a scene like sharing an x10 address, it will unfairly constrict your expectations on what you can accomplish with Insteon. With Insteon, the same device can be in multiple scenes each with a completely different assortment of devices. You can even have multiple scenes with the exact same devices, just having them behave differently. It is only like sharing an x10 address if your device was able to simultaneously have a dozens (or more) x10 addresses.
  8. Clever idea. Two questions. 1) What does this mean, " <0>" in the following line of code? "If $Test.State <0> 1000" 2) I can't find any line that sets $test.state to 1
  9. From the wiki: "Catch up schedules at Restart - When this box is checked (default) the ISY will attempt to run all programs that are time dependent beginning at midnight until the present time.' Does that mean that a program that was set to run at 5am and I reboot my isy at 6pm, then the program will run again? If this is so, rebooting your ISY after a counter program has already done its daily count, will then add an extra count for that day. Correct? Edit: Answered my own question and it is YES. I rebooted my ISY after writing this program. If Time is 6:00:00 am Then Int_1+=1 the reboot was done at 11:10. When it first rebooted I want to the variables page and the value was at the init value (1). About 10 seconds later it upped it to 2. Presumably the ISY just hadn't gotten to running that program when I first loaded the page. This is definitely a new twist to consider if you are writing any kind of counting variable program. Perhaps you should have the count occur at 11:59pm or perhaps you should uncheck that box and use the 15 minute catchup instead. Since I have my ISY on a UPS, typically I only reboot when I do firmware updates and that only takes about 5 minutes. I think I will uncheck the box and use a 5 or 10 minutes catchup.
  10. Back to poor Teken, if you write the last version of what I posted, it will work. Thanks to Andy for pointing out that it can be made one program instead of 2. And, I am stilling wishing there were some way to make the program foolproof in the event of a poorly timed power failure. Thoughts???
  11. Like Tim said. I like to think of a wait or repeat as making the if "available". The same exact rules apply to an if running during a wait as when the program is not running at all. Oh, and Andy, I apologize for very poor arythmatic, 11:10 is more than 3 hours after 8, so indeed your program would run fine, it is just that the 11:10 part of it is just superfluous.
  12. The program you just wrote will behave exactly the same as the wait were not even there at all. The logic follows in this order When a "then" or "else" is executed. All of the line by line stuff is done in order without possiblity for interuption until a "wait" is encountered. The program pauses for the specified time in the wait. During that time, the contents of the if are opened back up for triggering. If any line of the if statement gets triggered, then the wait is killed, the if gets run in full, and the then or else clause executes. Here is an example program that is easy to do. If Control 'switchlinc' is switched on Then set 'device 1' on wait 30 seconds set 'device 2' on Else set 'device 3' on This statement triggers when you push switchlinc "on" so it runs and evaluates to true. It promptly turns on device 1, (and assuming you don't do anything) waits 30 seonds, then turns on device 2. Device 3 never turns on. This is what actually happens. If, as is implied in the wiki, the wait clause looped back and forced a re-evaluation of the if clause, it would now be false (no one pushed the button a second time), and device 3 would turn on, and device 2 would never turn on. This does not happen. But, if during that 30 second wait, you manually turned off device 1, and then pushed the switchlinc "on" button again, device 1 would turn back on, and the wait 30 second timer would start over again followed by device 2 turning on. This is becuase the "if" clause was available for interuption by pushing the "on" button. As this program is written, there is no way for the else clause to run except if a separate program called it since "control on" can't evalute to false all by itself.
  13. Andy, That isn't written properly. An if statement is not actually run, it won't become false when it hits the wait. It will only become false if there is a statement in there that is a trigger (like a state variable that changes value, or a status of a light). I promise you. Try it. I swear.
  14. No, that isn't how it works. A wait clause does not run an if clause, it only makes it available to run. Your program will run the if clause at 11:10 becuase 11:10 is a trigger. This will kill your then clause prematurely and execute your else clause. This came up in another thread earlier in the week. During a wait, the program's if section becomes available again for triggers, but the wait itself is not a trigger. The if section will sit idle unless some part of it is a trigger, just like it does at any other time, "waiting" or not. In my program there is only one thing that will run the if clause, and that is the time becomming 1pm. Try it, I swear.
  15. My bad, or set the program to trigger on 1 instead of 0. I think setting the trigger to 1 is best, it makes it easier to think about every 15 days if you are setting that variable to 15. And Andy, I don't think you need the time interval 8 to 11:10 in your program. 8 am is the trigger and since you are using an integer variable nothing can interupt the wait except the time becomming 8 am again (which won't happen for 24 hours, well after the three hour wait). Edit: Actually I think the 11:10 part will kill the program. At 11:10 the program will trigger again but be false. The then clause (and the wait) will end and the charger won't get shut off, and the else clause will run. If there is a power failure that crosses that 1pm time frame, the program will shift back one day. If there is a power failure during 1 to 4 pm on the charging day, it will charge again the next day and also set the program back one day. I would love to hear any ideas about how to make that stop. Andy's program would get shifted back one week If $Integer_1 is = 1 And Time is 1:00:00pm Then Set 'battery charger' on wait 3 hours Set 'battery charger' off Send Notification to 'me' $Integer_1 = 15 $Integer_1 Init to $Integer_1 Else $Integer_1 -= 1 $Integer_1 Init to $Integer_1
  16. If $Integer_1 is <= 0 And Time is 1:00:00pm Then Set 'battery charger' on wait 3 hours Set 'battery charger' off Send Notification to 'me' $Integer_1 = 15 $Integer_1 Init to $Integer_1 Else $Integer_1 -= 1 $Integer_1 Init to $Integer_1 Taking from Andy, this merges the two programs into one. You must switch to an integer variable now or the program will get caught in an endless loop.
  17. Teken "If the time is 1pm" is what triggers the program to count down the variable once per day. You need the variable to go from 15 to 14 to 13 etc till it hits 0 which triggers the battery charger, then it resets back to 15. So, at 1pm, it subtracts 1. You could set it for any time you want. I just arbitrarily picked 1pm. The "init" variable is what the variable sets to at reboot. The line "$state_1 -=1" is what drops the value of the variable by 1 each day, and the line $state_1 Init to $state_1 simply sets the initialized value to the same thing as the current value, so after a reboot it will pick up where it left off (not go back to 0). Edit: Andyf0's program structure won't work for you. The difference is he is on a weekly program, you wanted every 15 days. That makes a big difference. ISY has no built in structure for that.
  18. If $State_1 is <= 0 Then Set 'battery charger' on wait 3 hours Set 'battery charger' off Send Notification to 'me' $State_1 = 15 $State_1 Init to $State_1 If Time is 1:00:00 pm Then $State_1 -= 1 $State_1 Init to $State_1 I added one line to this program to fix things up in the event of a reboot. After a reboot it will maintain the same value as when it shut down. This would only get messed up if the unit was off at 1pm. In that event it would lose one day. I also changed to <=0 on the first if. This avoids the risk of a power failure during the three hours it is waiting, which could restart the countdown from 0, getting into negative numbers where it would never fire again. With the addition of the last line, I now think this is about as robust a program as you are going to get to do what you want. If anyone knows how to fix things so it sets the variable correctly in the event of a power failure that crosses the 1pm mark, I would like to hear it.
  19. I just played around with the "repeat" command. It lets you set it to 360 hours which is 15 days. So you could write a program with a then section of repeat every 360 hours and leave the "if" blank. Once you manually do a "run then" on it, it should keep going until you have an ISY reboot. How you would manage that automatically is a whole other story. I like my first solution. Just be aware that an ISY reboot will reset the schedule to whatever you set your "init" value to. I have my ISY plugged into a UPS so reboots only occur with firmware upgrades and I can manually reset stuff at that time.
  20. And one more thing, set your "init value" to something more than 0. If your isy reboots for some reason the value would go to 0 otherwise and the program would never execute again. (it would go -1, -2, -3 and so on) This page might help explain variables to you a little better. http://forum.universal-devices.com/viewtopic.php?t=6063
  21. I am not sure I understand your question. If you are asking what the last line is doing, it is subtracting 1 from the variable. Every day it drops by one. You need to set your variable's value to something more than 0 and after that it will drop by one every day till it hits 0, then it will jump back to 15 and start over. It is all under the variable tab. As I wrote the program, every day at 1pm it will subtract one from the variable, when the variable hits 0, your battery charger turns on for three hours, then the variable resets back to 15. As far as testing the program, I forgot that isy doesn't have a "every second" command like my Elk. It would be a pain to test. You would need to write your if statement to be If time is 1:00:00pm (or pick a time like 10 minutes from now so you don't have to wait till tomorrow!) or time is 1:00:01pm or time is 1:00:02pm or time is 1:00:03pm etc etc. Maybe you just write it like it is and trust me. I am confident it will work. You could check your variables every day and watch the number keep counting down to 0 then it will pop back up to 15. Also, you will get your email confirming it. Or write 45 lines of code as above and follow it through three cycles. And this is about as simple a program as you can get for something to happen every 15 days indefinitely. It really isn't much, just 2 programs and 1 variable. Because you want it every 15 days and ISY has no way to do every 15 days as a built in feature, this is the best I can think of. If you were OK with every 7 days then you could just set it to happen every Sunday at 1pm (or whatever).
  22. If you haven't updated to the 3.1.x series of firmware you won't have variables. So . . . update if you haven't already. I didn't actually write the program and test it. I suggest you do that but instead of having it subtract 1 at 1pm, have it subtract 1 every second and set it to turn a light on for like 3 seconds instead of the charger for three hours. You should see the light turn on for 3 seconds every 15 seconds and get an email every 15 seconds. Once it does that cycle 3 or 4 times I think you can be confident it will work. I have lots of programs on my Elk M1G that are like this. The Elk deosn't have nearly as many time options as ISY, so this is how I do it.
  23. If $State_1 is 0 Then Set 'battery charger' on wait 3 hours Set 'battery charger' off Send Notification to 'me' $State_1 = 15 If Time is 1:00:00 pm Then $State_1 -= 1 Set your initial value of $state_1 to a number which equals the number of days until you want it to trigger for the first time (taking into account whether you are writing the program before after 1pm, or whatever time you are having the program subtract 1).
  24. If Time is Sunset Then Set 'rope lights (Main)' on If control 'lightsOnDemand' is switched On Then Set 'rope lights (Main)' on $State_1 = 1 Wait 20 minutes $State_1 = 0 Set 'lightsOnDemand' Off If From 11:00:00pm To Sunset - 1 second (Next Day) And $State_1 = 0 Then Set 'Rope Lights (main)' Off I have assume the 'rope lights (main)' is the load carrying switch. I also assumed that 'lights on demand' is kpl button or some other switch that is only used to initiate that 20 minute extra. I haven't tested the program series, but think it should work. If 'lights on demand' is a kpl, you will need to turn it off, then back on to reset the timer. If it is a switchlinc, just hitting the up paddle will reset it.
  25. ISY is going to take care of you, don't worry. First off, write one simple program to turn the lights on at sunset. Right a second program to turn the lights off at 11pm. But include a stipulation that a variable should equal something, like 0 for it to happen. Right a third program that says if button x is pushed, turn the light on and set variable to 1, wait 20 minutes set to zero. Right another program that says when variable becomes 0, and time is after 11pm, turn the light off. Now, whenever you push that button, the light will stay on for 20 minutes, or until 11pm, whichever is later. And if you pushed it once, and then 5 minutes later you push it again, it will reset to 20 minutes again. Sorry I didn't write this in full out program language, but I am not at a computer that I can get to my ISY language.
×
×
  • Create New...