Jump to content

Can Alexa use a timer to turn off an ISY light?


RichTJ99

Recommended Posts

Posted

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

 

Posted

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.

Posted

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.

 

Posted

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.

 

Posted (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 by larryllix
Posted
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.

Posted (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:

  1. Created a state variable name "lamp.timer"
  2. via the portal added a spoke "lamp timer" (i used the default type of 'scene')  (default 'off' value: 0) (default 'On' value: 23)
  3. "Alexa, Discover devices"
  4. "Alexa, Set lamp timer to 70" -- as expected the value of the variable changed to 70.
  5. "Alexa, turn on lamp timer" -- as expected the value of the variable changed to 23.
  6. "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 by MrBill
  • Like 1
Posted

@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. 

  • Like 2
Posted

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

 

 

Posted

You create variables in the admin console:

image.png.e86fa1b1829c338feec40fee06a55542.png

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.

 

 

  • Like 1
Posted
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

Posted
2 hours ago, MrBill said:

You create variables in the admin console:

image.png.e86fa1b1829c338feec40fee06a55542.png

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?

Posted

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

Posted
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! :) 

  • Haha 1
Posted
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.

Posted (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 by dbwarner5
Posted

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

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.4k
×
×
  • Create New...