Your Universal Remote Control Center
RemoteCentral.com
Lighting & Home Control Forum - View Post
Previous section Next section Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Topic:
Ocelot - Randon Time
This thread has 5 replies. Displaying all posts.
Post 1 made on Friday May 25, 2001 at 13:11
David Hind
Historic Forum Post
Anyone found a way to create randon time events using the Ocelot language. I would like to cause my lights to go on and off at random times when I am not home.

Thanks in advance

Dave.
OP | Post 2 made on Saturday May 26, 2001 at 02:15
Dan Boone
Historic Forum Post
Dave,
I am guessing that you want to give your home an "occupied" look, while you are away.

Most "bad guys" won't sit outside your house, casing it for hours.
Neighborhood thugs will already know you are gone via the grapevine.
Drive-by thugs will look for papers in the driveway, they may even glance in the mailbox to see if you have accumulated mail. Some will even go so far as to ring the bell, then give some bogus excuse if you answer the door.
My experience has been to play a radio on a talk station, or better yet, leave a TV turned on. The bouncing video light gives the impression that someone is home.
You really don't need random lights ON/OFF. Set up a timer to fire up various lights at different times after sunset. You can initiate the macro by setting a variable when you are leaving town. Set the variable by issuing a unique X-10 command or IR command. Use a second unique X-10 command, or IR command, to reset the variable and disable the macro.
You can get a little more complex in this code segment by turning ON the TV at say 6:30 PM, then turning it OFF at 11:00 PM.
This is pretty effective, as nobody ever leaves the TV on while they are gone for extended periods of time.

I know this answer is kind of dancing around your question. You cannot easily generate random X-10 commands with the existing version of C-Max. The next version makes it a little easier, with the new variable compare feature.

My opinion, the random feature is not that much help.
Bad guys won't stop by three Wednesday nights in a row at exactly 7:17 PM to verify that the bathroom light went on for exactly 47 seconds.

If you really need to simulate random events, respond to this post, and I will provide some code snippets that will get you going...
Thanks for the question,
Dan Boone, ADI
OP | Post 3 made on Sunday May 27, 2001 at 20:15
David Hind
Historic Forum Post
Dan;

I agree with you. An we have more evidence that we are not at home, then just papers accumulating, etc. For the sake of completeness of this thread, could you post the snippits, someone else might be interested.

Thanks;

Dave.
OP | Post 4 made on Monday May 28, 2001 at 06:29
Uncle Sergi
Historic Forum Post
Integer Random generator for integer from 0 to K
If Timer#0 >0
Then Variable #0 + 1
If Variable #0 > K
Then Variable #0=0

Every loop var0 changes.

To switch on some module with random delay - look how long one loop lasts. For example, about 1 second - then we must took K=3600. To switch module a1 on between 19:00 and 20:00


If time of day >1900
And Var#0 becomes >1800
Then turn a1 ON

The loop lasts not exactly one second, so in some time the generator will be almost ideal. I examine the distribution of this generator by EXEL and no correlation was found. In any case it is good enough for live simulation.

OP | Post 5 made on Monday May 28, 2001 at 06:47
Uncle Sergi
Historic Forum Post
Correct is
If time of day >1900
And time of day <2000
And Var#0 becomes >1800
Then turn a1 ON
OP | Post 6 made on Monday May 28, 2001 at 18:50
David Hind
Historic Forum Post
Thanks, that was exactly what I was looking for.


Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse