randomize lighting on/off times for security
-
- Member
- Posts: 53
- Joined: Wed Feb 01, 2006 11:48 pm
- Location: Philly burbs
randomize lighting on/off times for security
I've got several lights that I've got time based tasks set up for so that they come on at various times after sunset for security purposes. Before HouseBot I used to accomplish this task with the X10 timer device (I forget it's exact name but it looks like an alarm clock) that can control up to 4 different lights. I like the flexibility of HouseBot and the fact that all my home automation is configured from one application. However, since setting up HB to perform this task I've lost the "security" feature of the X10 timer device. That device has a security feature where it can randomize the on/off time within an hour of what you specify. Is there a way I can do something similar in HB? I realize I could make tasks for each day of the week with a slightly different on/off time but a better solution would be to be able to generate a random number within a specific range (like a random number between 1 and 60 for the minutes in an hour so that I could randomize how much time I add to the SUNSET_DATE_AND_TIME variable. I'm sure a VB script could accomplish this but I was curious if there was a simpler way it could be done directly in HB that I'm not aware of. No point in making things more complicated then they need to be.
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
Why can't you still use your timer device for this? This timer should still function togehter with HouseBot!
If you want HB to do it, I would write a small VB script that puts a random number (between 1 to 60 or so in minutes) in a null device property. Run this VB script at sunset and setup a task that switches your lights at SUNSET + The Properties Random Time in minutes.
If you want HB to do it, I would write a small VB script that puts a random number (between 1 to 60 or so in minutes) in a null device property. Run this VB script at sunset and setup a task that switches your lights at SUNSET + The Properties Random Time in minutes.
-
- Member
- Posts: 53
- Joined: Wed Feb 01, 2006 11:48 pm
- Location: Philly burbs