Inspired by @gedankenstuecke’s report at the recent Weekly Self-Research Chat, I’ve started setting up a single Flic button as an expensive, off-the-shelf One Button Tracker. This will be my project log, for my own documentation and for anybody who wants to follow along. (For a general repository of useful information about this approach, see the Personal Science Wiki page about the One Button Tracker.)
I bought a single Flic button for $30.
The button is small, and reasonable solid for its size. The button has a good response, a strong spring and definite click that should make it pretty obvious when I press the button, even through my pocket.
There is a free iPhone app, and after pressing the button for 10 seconds it appears on the app and is ready to set up.
Then I downloaded the IFTTT App to my iPhone, and from within this app I searched for the applet “Quickly keep a tally on anything.”
From within the applet I pointed to a new Google Sheet I’d created called: Flic-OBT.
Back to the Flic app on the iPhone, and setup the actions associated with the click. I chose the double click to trigger adding a new record, because the Flic, unlike the Totti Labs OBT, is not optimized for this particular use, and therefore there is a higher risk of accidental presses. But these “false positives” should be completely eliminated with the double press, I think.
After selecting the double click to configure, I see a list of popular actions, including IFTTT.
I decide to include location with my OBT timestamp.
Now I believe that I’ve connected my Flic button to the Flic app, the Flic app to IFTTT, turned on the specific applet I need, and finally pointed the IFTTT applet to a specific Google sheet with the correct name. By my count there are four connections that have to work properly in order to record an observation:
- Flic button to Flic app.
- Flic app to IFTTT app.
- IFTTT app to IFTTT applet
- IFFTTT applet to Google Sheet.
I figure that, since I’ve never done this before, I’ve almost certainly misunderstood something, so my hopes aren’t very high that when I double click on the button, a timestamp will appear on the Google Sheet.
I double click the button. The spreadsheet remains blank.
Let’s check the first connection: The Flic app shows a raw count of clicks, and the count goes up every time I click. So the Flic app is connected to the Flic button.
How do we check the second connection? Fortunately, the IFTTT applet has a log; so if the Flic app were talking to the IFTTT app(2) and the IFTTT app was correctly triggering the applet(3), then this should show in the log.
OK, the log records no activity other than that I turned it on 20 minutes ago. No button presses are logged. So there is something going wrong at step 2 and/or 3.
Ah, I missed something: If you look at the applet screen above, you’ll see an icon of a hand pressing a button. That is a separate applet that must also be configured and turned on.
Turning on the button widget launches a configuration workflow that requires selecting the “then that” action: button press => ? Didn’t I do that already? Apparently not. I select Google Sheets from the menu, and now have some Google Sheets configuration options.
I choose: “Add row to spreadsheet.”
I don’t really want all these elements in my OBT records, but before I start messing around I’m going to try to get it to work with the defaults.
Now my IFTTT applet screen looks really nice.
This is an illusion. Nothing happens when I click the Flic button.
I suspect that the problem is between the Flic app and the IFTTT service. There must be some setting on IFTTT to tell it to listen to a specific kind of message coming from the Flic app. There must be some user configuration workflow that I’m missing; I haven’t seen a request for my Flic password from IFTTT, and this seems like it should happen somewhere.
I leave the phone and go to the IFTTT website, where, under my user profile, I see “My Services.”
Among the services listed is one called “Button widget.” Selecting this service leads to a configuration workflow that looks familiar, it’s the regular “If this/then that” and I almost navigate away. BUT my fingers get the best of me, and when I follow “if this” I get a surprise: A list of devices to choose from.
I find the Flic square, and get to this screen:
I click connect and there it is:
I want to celebrate but know better. Let’s see what happens.
Authorization works, and there are a few details to check, such as the name of the file the clicks will write to, and the single press/double press question.
Strangely, I’m now returned to the IFTTT screen to define a “then that,” with all my previous configuration missing. I seem to be in the process of creating a new IFTTT applet, which is fine if it works.
And… it does!
It created a new Google Sheet with the same name, so there was no need for me to create one earlier.
I’m going to have to tolerate some things that are different from the Totti Labs OBT. For instance, I want the time stamp to match so I my new records are easily merged with my Totti Labs OBT records, but the Flic records are given in local time, rather than UTC with an offset; this will create problems as we know. Also, the button will only work when connected to my phone. And there seems to be some delay between pressing the button and creating the record. That could be bad. BUT, I now have a relatively cheap OBT that I can use for my next experiment, and since I’m changing my arrhythmia treatment I think it could be useful.