X10 Community Forum
🖥️ActiveHome Pro => ActiveHome Pro General => Topic started by: b4unothing on May 18, 2006, 09:44:35 PM
-
I simply want to turn an appliance on for 1 minute and off for 20 minutes forevah! How do I do it? Loop, macro, timer, trigger, huh? ::)
-
I simply want to turn an appliance on for 1 minute and off for 20 minutes forevah!...
...and you want to trust X10 to do this. ;)
You can do this with AHP by building creating a dummy module say M1 and a matching macro M1
M1 macro
B1 ON; Where B1 is your appliance module
delay 1 min
B1 OFF
delay 20 min
M1 On; By triggering dummy module M1 you call macro M1 again, starting an endless loop.
BEFORE YOU DO THIS, I STRONGLY RECOMMEND YOU CONSIDER....
- What would happen if your appliance were to run more than a minute? Say continuously for hours.
- What would happen if your appliance were to never come on for hours?
Both of these situations above can happen. I would even bet that one will happen in the life of product.
eg. Even if the X10 module were to never fail, remember that after even a brief power failure the module will return to the ON/OFF state it was before the power failure. Also what happens if a glitch triggers the local control turning the appliance module ON?
If you're creating a light display that's one thing but if you're trying to keep a small pond from freezing I wouldn't rely on X10.
X10 is a great product but there are too many variables too make it reliable for some applications.
How are you thinking of using it?
-
It's just a humidifier for adding water vapor to the air. Your reply is very helpful. If I can figure out what to do with it I will try it. Thank you. :)
-
It's just a humidifier for adding water vapor to the air....
The plug in kind? Cool mist or heated? The heated ones may require some warm up. If so try to allow some extra time for it.
Hmm... I wonder how much a humidity switch would cost? I bet you could connect one of those to an X10Powerflash unit and be able to set and exact humidity setting.
-
:)Thank you so much. It works like magic!! Yoo Da Man!! 8)
-
A word of caution. If you accidentally trigger the macro twice you will have two copies of the macro running simultaniously, which would produce unexpected results.
-
...If you accidentally trigger the macro twice you will have two copies of the macro running simultaniously...
Or what about a 3rd or 4th time...
It might be a good idea to purge running macros every now and then or anytime things seem off and restart the macro. Also use a HC that you don't use for anything else and trigger it from AHP. Don't have any controllers on the same code.
-
By adding a condition and setting a flag that problem could be solved ;)
eg:
trigger M1 on if flag 1 clear
set flag 1
B1 ON;
delay 1 min
B1 OFF
delay 20 min
clear flag 1
delay 2 sec
M1 On;
A short delay between the clearing of the flag and the restarting of the macro may be needed or is this just theory?
-
By adding a condition and setting a flag that problem could be solved ;)
eg:
trigger M1 on if flag 1 clear
set flag 1
B1 ON;
delay 1 min
B1 OFF
delay 20 min
clear flag 1
delay 2 sec
M1 On;
A short delay between the clearing of the flag and the restarting of the macro may be needed or is this just theory?
That could possibly work unless the macro was triggered again in the 2 sec window of opportunity. Unlikely but Murphy has ways of finding niches to work through. Another reason to only have it be able to start from AHP.
I was thinking of some sort of daily reset but your idea seems like it could work.
-
A short delay between the clearing of the flag and the restarting of the macro may be needed or is this just theory?
I don't believe the delay is needed, but I may be wrong. I have had the opposite problem where if you set a flag which is a condition for the macro at the beginning of the macro without a delay, the else macro will also run with one trigger. From this I would take it that flags get set very quickly.
-
That could possibly work unless the macro was triggered again in the 2 sec window of opportunity.
If that was the case the macro would only restart a split second faster when the 2 sec delay was over and the macro tried to restart the flag condition wouldn't let it. Most instances of the macro running would be TWO and only for 2 seconds or less. If in fact the 2 second delay is actually needed as roger1818 pointed out it may not be needed! ;)
True MURPHY does find his way! :) :D