Remind me to stretch my legs if I haven't left the house by 10AM (no hardware required)

use-case
Remind me to stretch my legs if I haven't left the house by 10AM (no hardware required)
0

#1

Maybe you are one of the lucky ones (like most of the Apilio team!) who works remotely and needs a gentle nudge to leave your computer and stretch your legs every morning. Or maybe you want a reminder that, since its the weekend, you should be out there in the open air, expanding your brain cells, getting some sunshine.

This is also a great example to get you started with Apilio as it doesn’t require any IoT devices: just your Android smartphone.

Whatever your need, this example will send you a notification if you are still connected to a specific WiFi network by a specific time of the day.

The detailed example below will evaluate our logicblock every weekday at 10AM. If we are still home, because we are still connected to our home WiFi, then we will receive a notification on our phone.

Setting up the variable

We will have a variable that stores whether we are connected to our home WiFi or not. Let’s call it ‘connected_to_home_wifi’. It will be set to true if you are currently at home, which is where I am when writing this example:

Creating the condition

The condition ‘am_i_connected_at_home’ is to check whether you are connected to your home WiFi. If you are connected, then the condition will be true when the variable is true. If you are not connected to your home WiFi (meaning, the variable is set to false), then the condition will be false.

How to set the variable to true or false via IFTTT

Our variable will be set to either true or false when your phone connects to your home WiFi. For this, you will need to install the IFTTT app on your Android smartphone, so this can be easily checked for this automation.

To set ‘connected_to_home_wifi’ to false:

  1. We will create an applet that if your Android smartphone disconnects from your home WiFi, it will set the variable ‘connected_to_home_wifi’ to false.
  2. Go to IFTTT and create your own applet (https://ifttt.com/create)

  1. As the “if this” part, choose Android device and then Disconnects from a specific WiFi network as your trigger. Enter the name of your home WiFi in the details:

  1. As the “then that” choose Apilio, and then the action to set a variable to false
  2. Complete your applet, it should look something like this:

To set ‘connected_to_home_wifi’ to true:

  1. We will create an applet that if your Android smartphone connects to your home WiFi, it will set the variable ‘connected_to_home_wifi’ to true.
  2. Follow the same steps as before, but choosing the Android device trigger when it connects to a specific WiFi, and the Apilio action to set a variable to true.

How to create the logicblock

It’s time to put it all together in a logicblock! Let’s call it for example ‘should_go_for_a_walk’.

Check the condition ‘am_i_connected_at_home’, and in your positive actions (because if you are still connected, that’s when you want to be told off - gently - ), set the event to ‘lets_walk’.

Save your logicblock now.

This logicblock will be triggered each working day at 10AM, and this will be setup in IFTTT as follows:

  1. Go to the create section to start your applet
  2. As the “if this”, choose the Date & Time service, and the trigger to specify a specific day and time:

  1. Then as the “then that” part, choose Apilio, and the action to evaluate a logicblock

Setting up my actions in IFTTT

When your logicblock evaluates and determines that it is time for you to go out and get some fresh air, you will receive a notification on your phone via the IFTTT app. This is setup as follows:

  1. Go to the create section to start your applet
  2. As the “if this”, choose the Apilio service, and the trigger to receive an event:

  1. As the “then that” part, choose the service Notifications from IFTTT, and then the action to send a notification from the app. You can then compose a message that will set you into action:

  1. Finish the applet. It should look something like this:

And that’s it! Every day at 10AM, when I’m still connected to my home WiFI, Apilio sends me a gentle nudge to go out for a bit.

Try it yourself! Let me know your comments below. You can find other examples to get you inspired in this forum.