Geddy Posted October 22, 2018 Posted October 22, 2018 I've tried a few searches, but cannot find the method of doing what I am attempting so wanted to ask for the best/proper way to handle this... I have a light in the a room that will get left on that I would like to turn off after 20 or 30 minutes and get a notification email that the light went off. I've had it working decently, but found that even if the light is turned off the program runs and send me an email at 20 minutes saying it turned the light off...even though it was manually turned off within 3-5 minutes of it going on. The program is currently setup like this: ------------------------------------------ Bonus Light - Off - [ID 0040][Parent 0001][Run At Startup] If Control 'Bonus' is switched On Then Wait 30 minutes Set 'Bonus' Off Send Notification to 'Primary Email' content 'Bonus Timed Off' Else Stop program 'Bonus Light - Off' ------------------------------------------ What I'm trying to accomplish is to set it to turn the light off, but only notify me if it had to be turned off by timer. If the light is manually turned off then it shouldn't be turned off by timer, and shouldn't email me. I'm guessing the "best/proper" way would be to somehow break this up into 3 programs, but I was hoping that there was a simple 1 program way to do this. Looking forward to the process. ISY firmware version 4.6.2
paulbates Posted October 22, 2018 Posted October 22, 2018 Think your best bet would be to not use Control, but rather Status for the If clause. The change in status will cause the program to stop on its own and you won't need the Else clause Paul 1
oberkc Posted October 22, 2018 Posted October 22, 2018 Using status may be the easiest approach, but would depend on your goals. If you desire only to track and react to the switch being manually turned on (as opposed to being turned on as a scene responder, for example), another approach could be: if control 'bonus' is switched on and control 'bonus" is not switched off then ….unchanged.... 1
Geddy Posted October 22, 2018 Author Posted October 22, 2018 10 hours ago, paulbates said: Think your best bet would be to not use Control, but rather Status for the If clause. The change in status will cause the program to stop on its own and you won't need the Else clause Paul Paul - Thanks, I'll try it out. I think I had this at one point, but was still getting notifications. 9 hours ago, oberkc said: Using status may be the easiest approach, but would depend on your goals. If you desire only to track and react to the switch being manually turned on (as opposed to being turned on as a scene responder, for example), another approach could be: if control 'bonus' is switched on and control 'bonus" is not switched off then ….unchanged.... oberkc, I'm 100% sure I had this first and something didn't work right, but if status doesn't change getting the notification then I'll try this method. The main desire is to get confirmation (through the email notification) that the light had been turned off. I just hate leaving this light on randomly. I don't want/need notification every time it is turned off, but only if the timer triggered it to turn off. Thanks for the quick replies. If there are other methods I'm willing to try those as well.
paulbates Posted October 23, 2018 Posted October 23, 2018 Are you sure there is solid communications from the switch to the isy? can you open the admin console near the switch, turn the switch on / off 10 times while watching the admin console response? it should 10 ons an 10 offs Paul
oberkc Posted October 23, 2018 Posted October 23, 2018 23 hours ago, Geddy said: oberkc, I'm 100% sure I had this first and something didn't work right, but if status doesn't change getting the notification then I'll try this method. If this fails to work, I would be looking at issues other than programmatic. And, as I said, it depends on your goals. If you want only to trigger when the switch is manually activated, use control conditions. If you want to trigger when the switch is turned on in any way (manually, program, scene) then use the scene condition as suggested by paulbates.
Geddy Posted October 23, 2018 Author Posted October 23, 2018 10 hours ago, paulbates said: Are you sure there is solid communications from the switch to the isy? can you open the admin console near the switch, turn the switch on / off 10 times while watching the admin console response? it should 10 ons an 10 offs Paul - I'll test it, but it hasn't been a problem in the past to think it wouldn't be solid communication with the ISY. 2 hours ago, oberkc said: If this fails to work, I would be looking at issues other than programmatic. And, as I said, it depends on your goals. If you want only to trigger when the switch is manually activated, use control conditions. If you want to trigger when the switch is turned on in any way (manually, program, scene) then use the scene condition as suggested by paulbates. oberkc - seemed to work fine. I tested a couple of times yesterday, and it seems to work better than the way I had it. I knew the light was turned off and I didn't get any notifications about it having to be turned off by the timer. The goal is to turn off the light after 20-30 minutes (typically this is in a room that we don't spend a lot of time in so we come/go to the room, and sometimes either we'll forget to turn the light off or just not turn it off there's no reason to leave it on all day. So I want a timer to turn it off. The thing I like to know is that it turned off because of the timer rather than if it turned off manually or through app/echo interaction. So, the status seemed to make the best sense. I think the biggest thing was that I was getting notifications even though the light was turned off manually. The timer was still running and just sent a reminder even though the light was off. I think with the status it's working the way I wanted it to.
larryllix Posted October 23, 2018 Posted October 23, 2018 Another technique you may consider is creating a program to run about 4:00 AM each day that turns off every device that shouldn't be left on permanently. This can help if all-else-fails, on vacation etc.. You can rest assured that things will get turned off while you are gone.\ and is in addition to what you are doing here. Luckily with the LED bulbs now, most of this is not so critical as it was with a few hundred watts of incandescent burning away.
Recommended Posts