I'm going to try and make this as clear as possible, but I'm new with the terminology in regards to Indigo/Applescript, so bear with me.
In an office space, I have a basic setup using motion sensors and Indigo to control the lighting in this space. But now I want to try something using an X10 wireless remote pad with basic on/off switches. Here's the situation:
Pretend I am occupying this office with the motion sensors controlling the lights, and I want to optimize the amount of time that the lights are on and there's no one in the room. Say I have the time delay on the countdown in Indigo (next action in:) set to 5 minutes. I want the occupant of the office to be able to hit the ON button on this keypad, and when they do that, the time delay countdown will reset and the lights will come back on. AND on top of that, reset the time delay at an increment of thirty seconds.
So hypothetically, the lights turn off on me while I'm sitting still for too long, I hit the key pad and they come back on and the time delay automatically adjusts to 5 minutes and 30 seconds. If I hit it again, it will reset to 6 minutes, and so on.
A couple other things I'd like it to do:
-Have a ceiling of ten minutes for the time delay
-neglect a rapid succession of button presses (if the occupant gets frustrated and hits the button 20 times in a row, only account for the 1st 3)
-After 2 weeks, the delay gradually comes down from the ceiling in 10 second increments every day (or week) (ex: after 2 weeks, the time delay drops to 00:05:50, after another week it goes to 00:05:40, and so on)
I feel that all of these things are possible from my observations the past couple of weeks, but my skills and knowledge of Indigo and Applescript aren't up to par to make this happen. I've gathered some insight by reading some other threads on this site, I just can't seem to make it all come together. I know a lot of the basic stuff in Indigo especially, but I lack in the programming ability with Applescript.
Can anyone give me some insight or coding tips? And if you could, speak simply? I would GREATLY appreciate it.