Halloween automation


#1

1) Give a description of the problem
I want to automate the use of fog machines etc. Im more than comfortable with motion pistons for light, etc. BUt not how to automate the switching of a fog machine.

2) What is the expected behavior?
fog turns on for 10 secons after motion. waits, retrigger time set to 20-30 seconds.

3) What is happening/not happening?
nothing yet

4) Post a Green Snapshot of the pistonimage
none yet

5) Attach any logs (From ST IDE and by turning logging level to Full)
none yet


#2

nevermind… found a similar post… was hoping it would be easier than adding a relay :frowning:


#3

No relay is required if you try something like this:

define
    boolean currentlyRunning;
end define

IF 
    Motion is Active
    and
    currentlyRunning is not true
then
    with
        Fog Machine
    do
        Set variable currentlyRunning = true
        Turn On
        Wait 10 seconds
        Turn Off
        Wait 20 seconds
        Set variable currentlyRunning = false
    End with
End IF

With this method, even with constant motion, it will only come on for 10 seconds out of every 30 seconds. (and will remain off if you have a lull in the trick-or-treaters)