Beeminder Forum

Beeminding using QR code check-ins


#1

Hi :slight_smile: I’ve looked through old threads and not found this tip anywhere else, so I thought I’d post it for other people.

I wanted to Beemind turning up to the gym in my apartment building, but couldn’t use geolocation as… well, I live here. Eventually, I worked out how to generate a QR code using the Webhooks channel on IFTTT, which I can print and stick up discreetly in the gym. Scanning it acts as a check-in, and automatically records data to beeminder:

  1. If you go to your settings on the above link, you’ll see a URL associated with your account (something like “https://maker.ifttt.com/use/cmobMNJwbReUKehcG9wYTa”).

  2. Use this to generate the QR code, but replace /use/ with /gymcheckin/ or whatever you want to call it.

  3. You then set up the applet so that the Webhooks trigger is “receive a web request”, and the event name is “gymcheckin”. Set up the beeminder action as usual.

  4. When you scan the QR code, the applet should run without you needing to do anything else, subject to IFTTT’s usual refresh delays.

This probably has more applications than just the gym, and I’m looking forward to playing with it once I’ve got this habit dialled in. When I emailed support, Bethany did say she thought that this might be a solution for people who wanted to beemind getting up earlier - I’m assuming this would be possible by setting the derailing deadline to whenever you wanted to be awake.

Looking forward to seeing what everyone else would use it for!


#2

I was thinking along the same lines and didn’t like that scanning the qr code by anyone would trigger an action on my behalf.

This is not a problem for private spaces, not so much for public ones.

I think authenticating my browser on recieving site in advance and only accepting authenticated datapoints would solve the issue.

Actually, I can add this to my service I use to track duration spent in some locations and share that with public. Do people really need that?

(I use geolocation instead of qrs and recommend trying that unless your use case specifically prevents that, as is the case with the OP)

As for getting up earlier, I’d recommend putting the qr on your bedcover (the whole thing), if that doesn’t sabotage the looks of your bedroom. This way, simplest way of getting that datapoint requires getting up and spreading the bedcover anyway so you may just as well do your bed


#3

Nice. I was thinking about this the other day since I found an alarm app that does a similar thing with normal barcodes. You just cut the barcode off your cereal box say and stick it somewhere, then to shut off the alarm you have to go scan it. You can do multiple barcodes in a certain order. Put them around your house and then you’re really awake.

I think I’ll stick a Beeminder/IFTTT one on my desk at work :slight_smile:

For using it in public, could you do a 2 barcode thing? One you carry with you, one at the gym, need to do both within X time for it to register?


#4

I googled for beeminding with QR code and this came up. Thank you so much for sharing, because it made it a lot easier to set things up.

I used AWS API Gateway to create an endpoint that fires an AWS Lambda function that checks what time it is. If it’s in the morning then it uses IFTTT to give me credit for waking up early and exercising. Otherwise I just get credit for exercising.

The AWS API Gateway endpoint’s URL is what I made the QR code out of, which I then posted in my apartment gym just like OP.

I’m not too worried about other people scanning it, but if it’s a problem I think rosemary7391’s solution isn’t bad. You probably don’t even need to carry it with you, because the odds that a stranger is going to scan two barcodes in succession is pretty low especially if they’re not directly next to one another. If I were going to augment my function I’d probably make one of the QR codes write an entry to a DB with a timestamp. Then whenever my original function runs it can read the last entry from the DB to see if it the other QR code was scanned recently.

Come to think of it, this would also be a good way to prevent weaseling on duration (walking into the gym just to scan the code and then walking straight back out). Basically use the QR codes as a check in and check out. But, for now I’m of the mind that if I actually walk into the gym that’s probably overcoming enough fo the friction to just get on with it.


#5

The barcode described by OP is just a URL, so for the case where you don’t want other people scanning your barcode (visiting your URL), you just memorize the last letter and then remove it from the QR code you generate. E.g., for OP’s URL of,

https://maker.ifttt.com/gymcheckin/cmobMNJwbReUKehcG9wYTa

You make a QR code for,

https://maker.ifttt.com/gymcheckin/cmobMNJwbReUKehcG9wYT

So that when you scan it, it takes you to a broken web page and you manually append a to the URL to make it work. (Of course, someone who knows you’re doing this can brute-force the possible combinations to activate your trigger, but that’s probably not a serious risk.)

An alternative solution to this particular problem is just to make the QR code the URL of your Beeminder goal, so when you scan it, it opens your goal page, and if you’re logged into your Beeminder account, you can immediately record a +1 data point. Anyone else who is not logged in to your account just sees your road (if the goal is public) or nothing (if you made the goal private).


#6

How about an NFC beacon instead of a QR code? Or whenever your phone sees a certain bluetooth device, that counts as a checkin?


#7

tjb, I know some folks have set up things like that using the Tasker
integration of the Beeminder Android app.

I do something similar using IFTTT to add a datapoint to my gym_visits
goal when I am inside the two different gyms I frequent, but it uses
GPS–or maybe wifi SSIDs? I forget.