I am new to ifttt and apilio. Starting to figure it out a bit. Trying to figure out how to do something. So i have a water pump connected to a smart outlet. I also have a temperature sensor, though i could use a weather app as well. I want to turn the water pump on when the temp drops below 35 degrees F, but i only want to turn it on at the top of the hour for 5 mins. So basically,
If top of hour then
If tmp <= 35 then
Turn on pump for 5 mins
Else
Turn off pump
End if
Else
Turn off pump
End if
Or another way
If top of hour and temp <r= 35 then
Turn on pump for 5 minutes
Else
Turn off pump
End if
I would setup a logicblock that gets evaluated every hour. Then the condition to run your action (to turn on the pump) would only be activated if the temperature is less than 35F.
So you need:
Variable: this would be a boolean that stores whether the temperature is less than 35F (there is a Weather Underground trigger that is activated when the temperature is less than a specified value, but you can also check if your temperature sensor has a similar trigger you could use)
Condition: check if the temperature variable is true (so it is lower than 35 F).
Logicblock: use the previous condition. Trigger the logicblock evaluation every hour from IFTTT.
Actions: 1) turn on the pump. 2) Turn off the pump with a 5 minute delay.
2 actions in the positive chain: turn_on_pump and turn_off_pump. The delay is specified in the logicblock in the advanced options when completing your action.
This article might help to get you started with IFTTT and Apilio:
In IFTTT you will have:
One applet that sets the low_temperature variable to true, when the temperature is lower than 35F
One applet that sets the low_temperature variable to false, when the temperature is over 35 F (or you can choose to reset the variable to false at a specific time of the day also)
One applet that evaluates your logicblock run_the_pump every hour of the day
One applet that receives the event turn_on_pump, and turns on the pump
One applet that receives the event turn_off_pump, and turns off the pump