Multiple Time of day and temp

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 hope that makes sense. Can you guys help

1 Like

Hi @dsk96m!

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.

Let me know if this helps :slight_smile:

2 Likes

Thank you Anna.
So what items do i need to create in ifttt, just the weather one and then events for pump on and pump off based on apilio?

How do i trigger the evaluation from ifttt? How do i do the pump off delay?

So i should have 1 variable, 1 condition, 1 logicblock and 2 actions?

You will have these bits in Apilio:

  • 1 boolean variable: low_temperature
  • 1 boolean condition: is_the_temperature_low
  • 1 logicblock: run_the_pump
  • 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:

  1. One applet that sets the low_temperature variable to true, when the temperature is lower than 35F
  2. 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)
  3. One applet that evaluates your logicblock run_the_pump every hour of the day
  4. One applet that receives the event turn_on_pump, and turns on the pump
  5. One applet that receives the event turn_off_pump, and turns off the pump
1 Like

These are some other articles that might help as well:

  • Updating booleans:

https://community.apilio.com/t/updating-boolean-variables-via-ifttt/

  • Evaluating logicblocks and triggering actions:

https://community.apilio.com/t/evaluating-logicblocks-and-triggering-actions-with-ifttt/

  • How to add a delay:

https://community.apilio.com/t/timing-with-apilio-how-to-add-a-delay-to-ifttt-actions/

2 Likes

Thank you again. I will read those articles. I think i got everything you were saying. Here is what i got:
Ifttt:


Apilio:

How does that look?

All of this looks alright :smiley: Fantastic work! You also did the whole setup also quite fast :slight_smile:

Let us know when it runs and if all is working as you expected it.

Thanks for sharing your example.

Thank you for the help. Im starting to understand how it is all linked. I greatly appreciate the help. I will let you know how it goes.

2 Likes