Traditore Posted February 9, 2022 Share Posted February 9, 2022 Hey all, Super simple. And I know I asked something similar a few years ago, but I can't find the answer in the forum anymore. I want to make sure that a footrest heater is off after 10 p.m. and have Elk warn me if it's on. So far I have this (sorry, can't remeber how to insert code inline): But I know it won't work because the time condition will not be met after the 5 minutes wait. And there might be a Repeat command missing in there as well. I want Elk to stop speaking once I turn off the heater. How do I fix this? Link to comment
MrBill Posted February 9, 2022 Share Posted February 9, 2022 If Time is 10:00:00 PM then Run Program 'Footrest heat' (if) --- and then delete the time line from your existing program and disable it, and the rest should work fine. Disabled programs do run when called by another program. Link to comment
Traditore Posted February 9, 2022 Author Share Posted February 9, 2022 Ok, that works with the following 2 programs (1st one enabled, 2nd one disabled). If Time is 9:00:00PM Then Run Program 'Footrest warning' (If) If 'Guest Room Footrest' Status is On Then Set Elk Speak Word 'Bedroom' Set Elk Speak Word 'Heat' Set Elk Speak Word 'Is_on' Wait 5 minutes Run Program 'Footrest warning' (If) That works but I swear that's not how I did something similar before. And I appreciate that ISY allows many different solutions to a particular problem. So if anyone has other ideas, I'm open. I guess my next step is to find a way to stop the 2nd program from repeating in case I do want to let the heater run after 9:00 p.m. Link to comment
MrBill Posted February 9, 2022 Share Posted February 9, 2022 6 minutes ago, Traditore said: I guess my next step is to find a way to stop the 2nd program from repeating in case I do want to let the heater run after 9:00 p.m. Another method is to put a time period instead of a specific time If from 9PM to 6 am (next day) and 'Guest Room Footrest' Status is On then (same as before) ..... but personally i like the 2 program method better because I think it's more obvious what's happening when you read it 3 years later... "Repeat" can also be used, but I rarely use it because I was around before "repeat" existed and just got used to looping programs by running them again... Link to comment
Traditore Posted February 13, 2022 Author Share Posted February 13, 2022 Thanks so much. I agree that the 2-program method is better in the long end. Link to comment
Geddy Posted February 13, 2022 Share Posted February 13, 2022 On 2/9/2022 at 3:35 PM, Traditore said: sorry, can't remeber how to insert code inline I see you found it, but it's right click on the program and select "Copy to Clipboard" then paste into the post on the forums. Make sure you use the "COPY to Clipboard" option...should be last on the menu when you right click on the program. I think you might have been looking for this really, really old post you made: At least seems similar enough to me. Found it using Google Site Search (In Google type: site: https://forum.universal-devices.com/ <search term>) I agree with @MrBill's method of using 2 programs. You could also put them in a folder so they're together in case you give them wildly different names and they aren't next to each other in the "My Programs" root folder. So (years) down the road when you see them you know they belong together. Perhaps the only issue with having a time range is if the heat turns on again in the middle of the night it will be true and run the other program. So if you want it to ONLY run at 10pm until you turn that heat source off just use the one time. Then the "run if" line you have after the wait will only check the status of the heat and only once it's been run in the first place (assuming it's disabled). On 2/9/2022 at 4:37 PM, Traditore said: I guess my next step is to find a way to stop the 2nd program from repeating in case I do want to let the heater run after 9:00 p.m. Perhaps you could setup a variable and have it advance each time the system reminded you and after several reminders turn the program off. I think others are better with variables than me, but that would be my suggestion. Of course it would be annoying the few time it reminds you if you did want to leave it on, but it would stop it...but then you run the risk of forgetting it...which isn't the point of the reminder/notification anyway? Just need to have a program reset that variable at a later time. Maybe then it could remind you again. Maybe? Sorry to offer up an option, but not have an example how to use it. The other option would be a way to make the "if" statement false if you wanted to let it run. Then you wouldn't get the reminder at all to know that you're ignoring it. Link to comment
dbwarner5 Posted February 13, 2022 Share Posted February 13, 2022 @Traditore If you go with the two program method and require one of the programs to be disabled, you may consider sometime of "tag" in the title. I use LD for leave disabled. The reason for this is that at times programs can get enabled or disabled, at startup etc, and this is a really quick way, when looking at the summary tab, moving columns to check all your programs for the correct setting, and it also is a good reminder that it is disabled for a purpose, not just because you wanted to stop it one day for a break, ie guests in the house or something. Link to comment
MrBill Posted February 14, 2022 Share Posted February 14, 2022 15 hours ago, dbwarner5 said: @Traditore If you go with the two program method and require one of the programs to be disabled, you may consider sometime of "tag" in the title. I use LD for leave disabled. The reason for this is that at times programs can get enabled or disabled, at startup etc, and this is a really quick way, when looking at the summary tab, moving columns to check all your programs for the correct setting, and it also is a good reminder that it is disabled for a purpose, not just because you wanted to stop it one day for a break, ie guests in the house or something. This is very true... I had the "reboot that enables everything" happan to me just 2 days ago. I have a "run at startup" program that disables all the disabled programs, but apparently I had a few that never made it onto that list. As I continue to search for the last few programs I'm also going to follow @dbwarner5 advice and have BOTH the program that disables disabled programs in startup and a tag in the program name. Link to comment
sjenkins Posted February 14, 2022 Share Posted February 14, 2022 This is very true... I had the "reboot that enables everything" happan to me just 2 days ago. I have a "run at startup" program that disables all the disabled programs, but apparently I had a few that never made it onto that list. As I continue to search for the last few programs I'm also going to follow @dbwarner5 advice and have BOTH the program that disables disabled programs in startup and a tag in the program name. A light just went on in my head of why all my seasonal programs (temp of the lake which is under 6” of ice) came on when I moved to ISY on Poly. I will do both of these as well. Is there a best practice program page on wiki. Both of these need added. I will check after this meeting I’m on. Sent from my iPhone using Tapatalk Link to comment
dbwarner5 Posted February 14, 2022 Share Posted February 14, 2022 Two additional thoughts: -I tag programs as I mentioned above with LD for leave disabled and SD for sometimes disabled for those that get disabled / re-enabled through programs, again, just so I can more easily remember quickly. Sometimes expand in the comment of the program as well. -Use of the letter I for integer based variables and the letter S for state. ( I choose to just use I and then assume w/o it, it is a State) Link to comment
Traditore Posted April 3, 2022 Author Share Posted April 3, 2022 Thanks all for your input. I appreciate it. Good advice. Link to comment
dbwarner5 Posted April 3, 2022 Share Posted April 3, 2022 11 hours ago, Traditore said: Thanks all for your input. I appreciate it. Good advice. ok.. one last piece of advice, since you are now going to 2 programs to accomplish one task: -the beginning name should be the same so that alphabetically in your list or folder, they are close to each other. For example... all my door lock programs all start with the word LOCK, so they are all together, especially in the summary tab. for some more flexibility, for your above situation, you can also think of a third program that monitors it after the 9pm warning, but with a delay more like 1 hour for the first warning. If program two runs, it enables the third program that watches for it to be on and then waits 1 hr then warns. this may require a fourth program to "reset " and disable the fourth program each morning like at 6am. much more complicated, but the ISY can do most anything. Good luck Link to comment
larryllix Posted April 3, 2022 Share Posted April 3, 2022 Two additional thoughts: -I tag programs as I mentioned above with LD for leave disabled and SD for sometimes disabled for those that get disabled / re-enabled through programs, again, just so I can more easily remember quickly. Sometimes expand in the comment of the program as well. -Use of the letter I for integer based variables and the letter S for state. ( I choose to just use I and then assume w/o it, it is a State)I do the opposite marking only State variables. However I also mark integer variables with c for constants that never changeeg. $cTrue I comment programs that need to stay disabled in the IF section at the top.Sent from my SM-G781W using Tapatalk Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.