dakall Posted December 9, 2021 Posted December 9, 2021 Is there a way one program can stop/cancel another program that is already running? Example: I have some lights turn on at sunset, then wait for 30 minutes, and then some others turn on. Sometimes I would like to not have the other lights go on. Ideally, I would set this up as an Alexa command that I could say sometime in that 30 minute window. I know I could probably do a similar thing by setting a variable with the "cancel" program and checking the value once the 30 minutes times out to see whether or not the other lights should go on. It just seems cleaner to me to be able to cancel the running program.
Geddy Posted December 9, 2021 Posted December 9, 2021 I've personally never tried (or wanted to do) this, but I guess you could break it up into different programs. Could you copy & paste the program you're using now (right click on the program, at the bottom of the menu it should say "copy to clipboard" then paste in a reply). So you're wanting to stop something from triggering, but only if you tell it you don't want it to happen? It sounds like you want a way to make it re-evaluate the program during the "wait" time and not fire the rest of the program. It's probably possible to keep it in one program, but others might have a way of doing it.
MrBill Posted December 9, 2021 Posted December 9, 2021 24 minutes ago, dakall said: Is there a way one program can stop/cancel another program that is already running? Example: I have some lights turn on at sunset, then wait for 30 minutes, and then some others turn on. Sometimes I would like to not have the other lights go on. Ideally, I would set this up as an Alexa command that I could say sometime in that 30 minute window. I know I could probably do a similar thing by setting a variable with the "cancel" program and checking the value once the 30 minutes times out to see whether or not the other lights should go on. It just seems cleaner to me to be able to cancel the running program. you can do exactly that Just create a program that has no IF, then in either then Then or the Else (depending on what you want to say to ALexa) have a Stop Program NameOfProgram assuming that it's waiting 30 or whatever, that program will be stopped before the next statement. Of course you'll also have to link Alexa in the portal to run the program (then) or (else). Probably be simplest when mapping the "program" to Alexa to have it behave like a "Scene" (there's a dropdown for that). In that case you would put the Stop Program in the Else of the program, You could add a Then block that would turn on the extra lights immediately. Then if you said "Alexa, turn off extra light" she would run Else, if you said "Alexa, turn on extra light she would run then. 1
dakall Posted December 9, 2021 Author Posted December 9, 2021 16 minutes ago, Geddy said: I've personally never tried (or wanted to do) this, but I guess you could break it up into different programs. Could you copy & paste the program you're using now (right click on the program, at the bottom of the menu it should say "copy to clipboard" then paste in a reply). So you're wanting to stop something from triggering, but only if you tell it you don't want it to happen? It sounds like you want a way to make it re-evaluate the program during the "wait" time and not fire the rest of the program. It's probably possible to keep it in one program, but others might have a way of doing it. The logic here is this: if no one is home (and obviously cannot issue a "stop/quit" command) I want the side lights to come on as this is the way into the back of the house. If we are at home, and in for the night, there is no need for those lights to come on. And I am not getting into geofencing because sometimes we do want them on if we are leaving later. Heaven forbid we have to flip a switch as we leave the house. 1
dakall Posted December 9, 2021 Author Posted December 9, 2021 8 minutes ago, MrBill said: you can do exactly that Just create a program that has no IF, then in either then Then or the Else (depending on what you want to say to ALexa) have a Stop Program NameOfProgram assuming that it's waiting 30 or whatever, that program will be stopped before the next statement. Of course you'll also have to link Alexa in the portal to run the program (then) or (else). Probably be simplest when mapping the "program" to Alexa to have it behave like a "Scene" (there's a dropdown for that). In that case you would put the Stop Program in the Else of the program, You could add a Then block that would turn on the extra lights immediately. Then if you said "Alexa, turn off extra light" she would run Else, if you said "Alexa, turn on extra light she would run then. I didn't even think of that. I do have other IF-less Alexa programs that work great. I'll play around with this idea and see what happens.
MrBill Posted December 9, 2021 Posted December 9, 2021 2 minutes ago, dakall said: And I am not getting into geofencing because sometimes we do want them on if we are leaving later. That logic doesn't make sense. I'd use a geofence. the lights don't turn on if your home, they do turn on if you leave. the only thing you might need the switch for turning them on ahead of leaving.. in which case it won't hurt that the geofence also turns them on... if they are already on, and get turned on it's not a problem.
Geddy Posted December 10, 2021 Posted December 10, 2021 16 hours ago, dakall said: And I am not getting into geofencing because sometimes we do want them on if we are leaving later. Heaven forbid we have to flip a switch as we leave the house. Why not have a geofence turn the lights on if you leave the house in the evening? If they're not on and you leave the geofence would turn them on for when you return. I've specifically done that since COVID and working from home more so don't need some entry lights on since I'm already at home, but have them turn on if I leave the geofence during the evening so they're on when I/we return. The fun with that is having 2 phones trigger because some settings don't need to run if others are still home. Sadly though, if you have iOS and have already upgraded to iOS15 the Geofence settings are messed up for most apps. Hopefully they're getting fixed soon, but you can find others talking about this issue elsewhere in the forums and many other issues of this in other forums. So I've had to disable most geofence events for the time being since I haven't been as lucky as others that get them to work after recreating or reinstalling Locative. But to add automation to your efforts, Geofence would eliminate the "need" to flip a switch as you leave the house.
larryllix Posted December 10, 2021 Posted December 10, 2021 Is there a way one program can stop/cancel another program that is already running? Example: I have some lights turn on at sunset, then wait for 30 minutes, and then some others turn on. Sometimes I would like to not have the other lights go on. Ideally, I would set this up as an Alexa command that I could say sometime in that 30 minute window. I know I could probably do a similar thing by setting a variable with the "cancel" program and checking the value once the 30 minutes times out to see whether or not the other lights should go on. It just seems cleaner to me to be able to cancel the running program.Stopping any program at a ramdom spot can leave programs hanging where you may not want them. Lights, and or appliances could be running for hours or even weeks if you are away.Care must be taken to clean up any mess for each program if the program is stopped from another process. Usually it is best to always have cleanup routines inside the else of those type programs and just Run Else.For occupancy detection I use a myriad of MSes, including ecobee stat sensors that install a preselected number of minutes into a programmable timer. when that timer expires...we are not home.Sent from my SM-G781W using Tapatalk
MrBill Posted December 10, 2021 Posted December 10, 2021 26 minutes ago, Geddy said: Sadly though, if you have iOS and have already upgraded to iOS15 the Geofence settings are messed up for most apps. with one exception iOS 15.1.1 has made ours work well. I'm not sure what the magic combination actually is tho.... and more importantly... WHY ISN'T APPLE SOLVING THIS? to @dakall stopping programs is really the "band-aid" method to "fix" this. And for "automation" why do you want to be responsible for remembering to tell Alexa what you want everyday? "Automation" should take into account all the the possibilities.
dakall Posted December 10, 2021 Author Posted December 10, 2021 (edited) I have nothing against geofencing. I get it; if my wife and I are home, the lights won't turn on. But a couple of times a week, one of our kids comes by and so the light should be on for them. Yes, I could add them to the geofencing, too. But that's way more involved than I want to get. Perhaps I should just go with motion detectors at each end of the walkway. Edited December 10, 2021 by dakall 1
larryllix Posted December 10, 2021 Posted December 10, 2021 If one has ever used a GPS in a vehicle one knows there are places where satellite location just isn't reliably accurate to more than a few blocks.Sent from my SM-G781W using Tapatalk
lilyoyo1 Posted December 10, 2021 Posted December 10, 2021 28 minutes ago, larryllix said: If one has ever used a GPS in a vehicle one knows there are places where satellite location just isn't reliably accurate to more than a few blocks. Sent from my SM-G781W using Tapatalk GPS isnt the only thing to use with Geofencing. There's also the Ping nodeserver which can use your phone connecting to your wifi.
Recommended Posts