RichTJ99 Posted April 14, 2020 Posted April 14, 2020 Hi I would like to be able to have Alexa turn off a light after a given time. Something along the lines of Alexa turn off the kitchen lights in 30 minutes. Is that a possibility? Thanks Rich
lilyoyo1 Posted April 14, 2020 Posted April 14, 2020 Ask it to do that and see what happens. Depending on your use case, you can program the isy to do that for you
larryllix Posted April 14, 2020 Posted April 14, 2020 Alexa has a sleep timer but I am not sure whether she will use it on devices. It works on cloud music she plays. Alexa... play some sleeping music. Alexa. set a sleep timer for 30 minutes. Alexa will respond with a confirmation of turning off the music. I would use ISY so haven't tried it.
DaveStLou Posted April 15, 2020 Posted April 15, 2020 Alexa won't turn off light after a delay but she will run an ISY program with a 30 minute wait statement followed by a command to turn off the light. We use a similar program to turn off our attic fan 2 hours after we go to bed in the summer time.
nadler Posted April 15, 2020 Posted April 15, 2020 You can create an Alexa routine. Name the routine: "Kitchen off Routine" WHEN YOU SAY: "Alexa, Turn Off the Lights in 30 Minutes ALEXA WILL: Add action: Wait 30 minutes Add anoter action: Smart Home: (Choose your device) : Power off That should do it.
larryllix Posted April 15, 2020 Posted April 15, 2020 (edited) I played around with the SET verb in the ISY Portal thinking I could create a variable timer in ISY programming. It can be done but the verbal needs to include the word PERCENT and sounds clumsy. Alexa ...set lamp off to 32 percent Can cause a "lamp off" named variable and cause a device to turn of after a 32 minute timer. Edited April 15, 2020 by larryllix
MrBill Posted April 16, 2020 Posted April 16, 2020 22 hours ago, larryllix said: I played around with the SET verb in the ISY Portal thinking I could create a variable timer in ISY programming. It can be done but the verbal needs to include the word PERCENT and sounds clumsy. Alexa ...set lamp off to 32 percent Can cause a "lamp off" named variable and cause a device to turn of after a 32 minute timer. The word off might be getting in your way. We use this routinely with lamps where the meaning of the variable actually is a percent but we don't say the word percent when we talk to her. "Alexa, set lamp one to 50" works just fine.
MrBill Posted April 16, 2020 Posted April 16, 2020 (edited) On 4/15/2020 at 11:06 AM, larryllix said: Can cause a "lamp off" named variable and cause a device to turn of after a 32 minute timer. 22 hours ago, MrBill said: The word off might be getting in your way. We use this routinely with lamps where the meaning of the variable actually is a percent but we don't say the word percent when we talk to her. "Alexa, set lamp one to 50" works just fine. I just played with this: Created a state variable name "lamp.timer" via the portal added a spoke "lamp timer" (i used the default type of 'scene') (default 'off' value: 0) (default 'On' value: 23) "Alexa, Discover devices" "Alexa, Set lamp timer to 70" -- as expected the value of the variable changed to 70. "Alexa, turn on lamp timer" -- as expected the value of the variable changed to 23. "alexa, turn off lamp timer" -- as expected the value of the vaiable became zero. so @larryllix you're correct the timer can be created in this manner. the only caveat is with the default type "scene" the value can only be set 0 to 100.. I'm not sure if any of the other "types" (portal) would expand the value that can be set. if lamp.timer > 0 then Wait 1 min lamp.timer -= 1 else <whatever happens when the time runs out> Edited April 17, 2020 by MrBill 1
dbwarner5 Posted April 16, 2020 Posted April 16, 2020 @RichTJ99 For me the most strait forward method is to have Alexa trigger an ISY program either directly, "turn on xyz", or through a simple routine that turns on a variable". I have a ton of Alexa routines, but after a while they get hard to track / read/ edit etc. so I am slowly migrating everything I can to the ISY where editing is easier etc. For example, at night, I simply say to Alexa. "goodnight" and that triggers a variable which triggers ISY to run a whole series of integrated programs, arming security, slowly changing lights that mesh with my nighttime routine etc and step up automatic morning routines such as alarm clocks, coffee lighting, master bedroom fireplace etc. Much easier in ISY. 2
RichTJ99 Posted April 17, 2020 Author Posted April 17, 2020 Im still a little confused. Where do I make a variable to have it go off via a timer - through the ISY itself? Can you give me an example program? or basic way to do this? If the device is basement appliancelinc - what is the best way to do it
MrBill Posted April 17, 2020 Posted April 17, 2020 You create variables in the admin console: For this purpose you will need a "state" variable. (be sure to click SAVE at the bottom of the page, or it won't actually be created). 2) You link that variable to Alexa via the portal. Which will let you set the time via Alexa. 3) this program will start anytime the value of the variable is above 0 and run until it drops the variable back to zero, at which time it will turn off the device: aaatest_delete - [ID 00E1][Parent 0001] If $lamp.timer > 0 Then Wait 1 minute $lamp.timer -= 1 Else Set 'LR Lamp 3#' Off turning the device ON isn't covered, and requires a second program. If the time you want to turn the device back off doesn't change, there are other approaches, but I'm not sure what your exact goals are. if you get specific we can help. 1
dbwarner5 Posted April 17, 2020 Posted April 17, 2020 also look at this wiki https://wiki.universal-devices.com/index.php?title=ISY_Portal_Amazon_Echo_Integration_V3#State_Variables Two sections: State Variables and ISY can talk to you. Holler back if you continue to have trouble
lilyoyo1 Posted April 17, 2020 Posted April 17, 2020 On 4/14/2020 at 6:39 PM, RichTJ99 said: Hi I would like to be able to have Alexa turn off a light after a given time. Something along the lines of Alexa turn off the kitchen lights in 30 minutes. Is that a possibility? Thanks Rich What is your use for this? There may be other ways to accomplish what it is you're looking for
larryllix Posted April 17, 2020 Posted April 17, 2020 2 hours ago, MrBill said: You create variables in the admin console: For this purpose you will need a "state" variable. (be sure to click SAVE at the bottom of the page, or it won't actually be created). 2) You link that variable to Alexa via the portal. Which will let you set the time via Alexa. 3) this program will start anytime the value of the variable is above 0 and run until it drops the variable back to zero, at which time it will turn off the device: aaatest_delete - [ID 00E1][Parent 0001] If $lamp.timer > 0 Then Wait 1 minute $lamp.timer -= 1 Else Set 'LR Lamp 3#' Off turning the device ON isn't covered, and requires a second program. If the time you want to turn the device back off doesn't change, there are other approaches, but I'm not sure what your exact goals are. if you get specific we can help. Nice and exactly what I was thinking but..... just thought of another method...maybe? Two programs so that the syntax would go like this. Alexa set lamp timer to 15 Sets the variable to 15 (minutes)Alexa turn off lamp - Runs Then or Else of a program labelled "lamp" The On is immediate On/Then while the Off/Else looks at the timer and if = 0 does it immediately or runs your countdown. Hopefully this could be "logic'd" out in two programs. Put the -1 line below the Off action?
RichTJ99 Posted April 17, 2020 Author Posted April 17, 2020 Hi, I am trying to set a "Xbox" shutoff timer so we don't need to fight with my son about when it so time to be done. Ideally we can say shutdown the Xbox in 60 minutes or something like that. It avoids the conflict at the end. Thanks Rich
larryllix Posted April 17, 2020 Posted April 17, 2020 1 minute ago, RichTJ99 said: Hi, I am trying to set a "Xbox" shutoff timer so we don't need to fight with my son about when it so time to be done. Ideally we can say shutdown the Xbox in 60 minutes or something like that. It avoids the conflict at the end. Thanks Rich Ever think about cutting his web access off in your router? Most routers have complex routines that can cut off/restrict/block by IP address, URL, timeframe, wording etc.. combinations. It might be easier to just kill his MAC address at bed times. I don't know if they can work independently though. He certainly couldn't play multiplayer games. My kids are big on those but at 43,41 and 35 they need to find their own way now! 1
MrBill Posted April 18, 2020 Posted April 18, 2020 58 minutes ago, RichTJ99 said: Hi, I am trying to set a "Xbox" shutoff timer so we don't need to fight with my son about when it so time to be done. Ideally we can say shutdown the Xbox in 60 minutes or something like that. It avoids the conflict at the end. Thanks Rich Since the xbox is already on, just use what I wrote above, with the names changes appropriately... Alexa turn off Xbox in 60 minutes. Caveat: if he has access to Alexa, he can easily override. We could add minor complexity and make it a non-resettable timer.
dbwarner5 Posted April 18, 2020 Posted April 18, 2020 (edited) 12 hours ago, MrBill said: Since the xbox is already on, just use what I wrote above, with the names changes appropriately... Alexa turn off Xbox in 60 minutes. Caveat: if he has access to Alexa, he can easily override. We could add minor complexity and make it a non-resettable timer. also assumes that the xbox is plugged into an isy controlled outlet and that the child cant unplug it and plug it in elsewhere. Router would be a safer way to go. But to build on Mr Bills thoughts, you can easily have the timer program when it ends, disable the program / switch until the next morning. Edited April 18, 2020 by dbwarner5
lilyoyo1 Posted April 18, 2020 Posted April 18, 2020 Cutting power to the Xbox at the wrong time could potentially damage the console by corrupting the hard drive. That is one thing to consider. Taking that into consideration, you could use a Harmony hub along with the Harmony nodeserver to turn off the console. Granted, he could remove the pieces that allows that but regardless of how things are done the same would hold true for other options as well. If the time limit doesn't change, there are multiple ways you can program this. Simply let an outlet turn off the Xbox at a set time, or run for a period of time during certain hrs, voice control, or a combination of all. If you already have a zwave network, you could use a plug in module capable of detecting energy use. Then you can say If time is from 5pm to 11pm & Xbox is on, then wait 2 hrs and turn off. Or Plug the Xbox into a Standard outlet and simply let the game turn off at bedtime. If time is 11pm then turn off outlet If you want voice control only You'd still use an outlet (or Harmony) and set up Alexa like you would any other device. You don't necessarily need the then if you don't want to turn it on with Alexa. However if you're turning it off, I'm sure you would want some way to turn it on so that he could use it. This would automatically turn the outlet on at 8 and allow you turn it on via voice for whatever reason. By putting a wait in the or else, when Alexa runs that program, the wait will trigger prior to actually triggering the off. If time is 8am Then: turn on outlet. Or Else: wait 60 minutes and turn Xbox off. If you want to have different time limits, you would need to use variables and add each to Alexa. However, the problem I've found with voice assistants is that too many like sounding things will cause more headaches than what it works. Having 1 or 2 set times would probably work best
Recommended Posts