Page 1 of 1

Turning lights randomly on and off

Posted: Fri Feb 22, 2013 7:50 pm
by MarkMills
Hello,
I'm new to Domotiga and have spent just a couple of weeks trying to get my setup working as I want.
One of my aims is to set up a wall switch that I press on leaving the house which turns on some of the lights randomly when it gets dark. And stopping this action at midnight or so. Simulating someone in the house.
I'm OK with the switch and the activation when dark and turning off at midnight. But I'm not sure how to get a random loop on the lights operation. I thought, originally, that I would just add several light on, random delay, light off random delay events but this is not scalable and cumbersome.
Has anyone got any better ways of doing this? I would appreciate any tips or clues.
Best regards
Mark

Re: Turning lights randomly on and off

Posted: Fri Feb 22, 2013 11:18 pm
by RDNZL
There is a hidden feature (well one of the many) that does exactly what you want!
If you set GlobalVar Simulation = "On" (you can do this from event action on the button) then all switch- and dimmable devices who are member of group 'Simulation' and have log option enabled are controlled with the logged data from 7 days back.
The code is in EventLoop.module if you want to see it.

Re: Turning lights randomly on and off

Posted: Sat Feb 23, 2013 12:10 am
by MarkMills
Ah, I see now. I had seen the Simulation idea but had dismissed it as I hadn't appreciated I could activate it remotely.
Now I just need to stop messing about with my lights for 7 days and get a sensible log file to replay.
Thank you Ron.
Regards
Mark

Re: Turning lights randomly on and off

Posted: Fri Dec 27, 2013 10:53 pm
by Harry
not sure how to get this feature working, are there more detaled how too's how i can get this working

Re: Turning lights randomly on and off

Posted: Wed Jan 01, 2014 3:35 pm
by RDNZL
Create device group called "Simulation", add devices to this group you would like to participate in this random behaviour, and enabled logging to database for these devices. (a week in advance of use)
Create globalvar called "Simulation" and set it to True to enable this, to False to disable again.

When enabled it will replay the states of those devices exactly like it was a week ago.