Sleep Timer
Has anyone ever added a sleep timer function to an netlinx file?
How is this done?
Any examples would be appreciated as well!
How is this done?
Any examples would be appreciated as well!
Comments
-
sleep timer
use time lines -
Sleep Timer
Hi Burkie,
Can you elaborate on what you mean by a sleep timer? Are you trying to implement an inactivity timeout (sleep) for a device or do you have something else in mind. Provide some details on exactly what you want to accomplish and what you mean by a sleep timer (how you want to use it) and I am sure you will get some posts with ideas/hints.
Reese -
I had a customer who wanted her bedroom TV to shut off after a certain amount of time if she happened to fall asleep if it was on (which entirely baffled me, since the TV was a Runco projector over the bed with a motorized screen - I have no idea how the screen retracting doesn't wake her up).
I implemented it by using a one minute interval repeating timeline. When she presses her "sleep" button, the timeline is created, and a variable is set to an amount representing an hour. The timeline event decrements this timeout variable each minute until it reaches zero, then shuts down the system and kills the timeline. If the button is pressed at any time while the timeline is still running, it increments the running time to the closest 15 minute interval (if there are 10 minutes left, it jumps to 15; if there is an hour, it jumps to 1 hour, 15 min.), so she can keep it on longer than the default hour if she likes. If she holds the button for 10 seconds, the whole thing is canceled. I used a variable text field on the button itself that is updated when the timeout variable is to show how much longer the timer will run.
You could just as easily make this a one-time timeline and dyamically change the intervals as needed and reset the timeline to adjust the timeout. I liked my approach better because I could use my timeout variable not only to track the status of the timeout period, but to send my button feedback showing time left.
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums