Activity App

Locus Pocus - Location Activity App / Service - IFTTT
In order to know when a person has entered or left a location (or has some other type of status update), they need to have a way of providing that data. A common way of doing this is to use a smartphone device (which provides sensors such as GPS location) along with an app that can gather and send the data. In general:
- The person has a device that can sense activities, such as their GPS location. Typically this would be a smart device, such as a mobile phone. In general, this could measure other things such as straightforward movement (person is up and about), or vitals such as heart rate.
- The device has an App installed specifically for (1) gathering different kinds of activity data from the device; (2) communicating data to the central online App service; (3) conducting analytics on the data; in order to (4) generate actionable events. For example, GPS location data from the device can be analyzed to find when someone has entered the vicinity of a particular location. For example, they are arriving home.
Presuming smartphone use, the primary application funcationality is to:
- Set up an app that can provide data from the device
- Set up the app's data provision service to receive the data and make some analysis or take some action upon it
Research
I considered several different activity app services. There are a variety that have been used in previous projects.
What Others Have Done Beforehand
In considering potential activity app services, I reviewed the apps used in some of the previous related projects. These were all services that employed a smartphone app for location sensing.
| Project | Activity App |
|---|---|
| Modern Weasley Clock | IFTTT |
| Weasley Clock | Life360 -and- Traccar |
| Where'sLy Clock Project | OwnTracks |
| Magic-Clock | OwnTracks |
Selection
I selected IFTTT (if this, then that) as the activity app. It has an integration with the selected data broker - Adafruit IO. Also, my global evaluator (Iván Sánchez Milara) had created a tutorial on using the service, and I thought it was an interesting connection: Sending events to ESP8266 using Adafruit IO and IFTT .
Even so, the other options seemed quite reasonable - I would be interested to explore OwnTracks and Traccar as supplmental options at some point.
Locus Pocus Location Activity Setup with IFTTT
Setup with IFTTT was fairly straightforward. I needed to set up an account with the IFTTT service. IFTTT works by creating small applications, called "Applets". An IFTTT applet has the form of:
- If This - some kind of trigger activity - such as entering a GPS location, pushing a button, or adding a note to the notes application
- Then That - some kind of response activity - such as sending data to Adafruit IO, or sending a text message
The main dashboard in IFTTT, shows the existing Applets you have created.

IFTTT Dashboard
To create a new Applet, use the "Create" button on the dashboard, which brings up the Applet creation structure. To specify the trigger (for the IFTTT App on the phone / device), select "Add" for the "If This" part.

IFTTT Create New Applet
IFTTT has many types of service / activity options available to set as the If This trigger. For GPS location, I used the "Location" service.

IFTTT Select If This Trigger Service
For the location service trigger, you can specify the trigger as being: upon entry, upon exit, or upon either entry/exit. I selected entry/exit for the location conditions.

IFTTT Location Trigger - Set Enter/Exit
For the location service trigger, you also need to specify the location. IFTTT allows you to enter an address that sets a general target area. You can then adjust the map to refine the target area (zoom in/out, move target area).

IFTTT Location Trigger - Set Location
For the location-triggered Applet, you then need to specify the "Then That" action that will happen in response to the trigger. To specify the response, select "Add" for the "Then That" part.

IFTTT Location Trigger - Set Location
IFTTT again has many types of service / activity options available to set as the Then That response. For sending to the Adafruit IO data broker, I used the Adafruit service option.

IFTTT Location Trigger - Set Location
For the Adafruit IO service, the primary option is to send data to Adafruit IO.

IFTTT Location Trigger - Set Location
For sending data to Adafruit IO, there are several "action field" parameters. This includes:
- Adafruit account - different accounts could be connected as destinations
- Feed name - specify the name of the feed set up in Adafruit IO to receive the data
- Data to save - this is the data to send. You can specify fixed data, as well as "ingredients" that can depend on the type of trigger. These appear in curly braces as part of the data field. For location data, ingredients you can add:
- Occurred At
- Location Map Image URL
- Entered or Exited
- Device Name
For clock commands, I added the fixed information for:
- target - e.g., h1 - for hand 1
- delimiter - :
- action - e.g., lost
- ingredient for entered or exited the location

IFTTT Location Trigger - Set Location
For Locus Pocus Testing, I set up 7 location triggers for entry / exit, each of which would send the data needed for entering or exiting the target location.