Getting physical aka physical buttons

Apparently Amazon has a $5* dash button that you can re-purpose to trigger arbitrary events like logging a datapoint to Beeminder.

* You may need to be an Amazon Prime member and be in the USA

Edit: forgot a word

7 Likes

Very nice hack indeed!

Or if you have a virtual address in the US like this and try the 1 month Amazon Prime membership for free, you can get 18 different Amazon buttons, each with a different function (i.e., beeminder task).

Such low cost solutions seem feasible for me. Or maybe, I will think about the NFC tags which is much cheaper, but with the hassle of carrying the phone and touching it to a tag, and with no psychological feeling of pressing something as @dreev mentioned above.

I am excited of the coming IoT and how will change our life.

2 Likes

Never saw this thread before!

I have NFC tags, some that used to work with Beeminder. I had one where I would use the NFC tag as a sort of bookmark for my books. I turn to the page (where the NFC tag would be located), tap my phone with it, and it would:

  1. Start the Beeminder timer,
  2. Put phone on silent
  3. Disable internet connectivity for 30 minutes (and continuously poll to ensure it stays closed)

And after a second touch:

  1. Stop timer
  2. Launch Goodreads to update reading progress.

I stopped using it though, since I read from ebooks more often now, and NFC doesnā€™t work on metal. And chasing an NFC tag to start the timer is a bit too much. I might get a case for my ereader though, and might stick an NFC tag that does the same thing on that. Itā€™s on my list of nice-things-to-have.

I have an NFC tag hidden on my nightstand that automatically starts Sleep As Android sleep tracking (and puts phone on silent and Airplane mode). I guess the OP could use that with the Beeminder-Sleep As Android integration for good effect. I also use the NFC to disable my morning alarm, and the same tag launches AnkiDroid as well (Beeminder-Anki sync!). I havenā€™t been able to use it much though, since Iā€™m on summer break and wake up whenever I want :joy: It used to launch Duolingo instead of AnkiDroid though, but Iā€™ve long since finished my French tree (couldnā€™t have done it without Beeminder)!

This is all with Trigger and its Tasker integration btw.

4 Likes

This is a great idea, Iā€™ll have to find some old NFC cards and try it out (or buy them cheaply online).

2 Likes

Iā€™ve got prototypes of two physical Beeminder devicesā€“one is a button I use to mark when I got o bed, and another is a red police light that goes off if Iā€™m in an emergency day.

Iā€™m using Particle Photons, and just used a little box as an enclosure for the button, and 3D printed something for the emergency light.

Iā€™m going to write up a tutorial for the button, at least. People should be able to pick up a Photon for $19, get a little button+adapter for a few bucks from Adafruit or me or whoever, and have a wifi button that connects to IFTTT to do whatever Beemindery thing you want to do. You wonā€™t need to be a programmer, but youā€™ll have to plug some things into each other and join the device to your Wifi and follow some instructions.

7 Likes

Thanks! Do you have any updates on the tutorial?

Hi, are any of you actually using any of these buttons? Iā€™m curious as to which one works best with BM at the moment in terms of the physical buttonsā€¦

2 Likes

Sadly my Flic kickstarter order is still not here ~6 months later. Iā€™ll let folks know how they work if I ever get them. :slight_smile:

3 Likes

Hi folks!

I have a little physical button I use with Beeminder. Iā€™m not 100% satisfied with it, but I told @dreev Iā€™d post this quite a while ago. Iā€™ll post what I have, and Iā€™ll write a little bit about where I want to take it at the end.

Itā€™s a ā€œParticle Internet Buttonā€. It costs about $50 and connects to the internet via Wifi. It has buttons, lights, an accelerometer, a few other things, and itā€™s meant for people to write little programs with to connect it to IFTTT. Silly disclaimer: you can do this with other technologies, you can do this for a bit cheaper if you do it differently, but this is how I did it.

Steps

  1. Acquire a Particle Internet Button.
  2. Make a Particle account and sign into the Web IDE where you can upload programs.
  3. Add the Particle Internet Button you acquired to your account. This will also connect it to your Wifi. I find it easiest through the Android/iOS app, but you can do it through a USB connection.
  4. In the Web IDE, select your device (on the left popout menu). Go to my Beebutton sample code, click the button labeled ā€œrawā€, and copy that. Highlight the code in the Web IDE, and paste over it. Delete the top line, #include "InternetButton/InternetButton.h.
  5. In the Web IDE, click the save button on the left popout. It will need to have a name. Remember it.
  6. In the Web IDE, click the libraries button on the left popout. Enter InternetButton into the search box. Scroll down. Click ā€œInclude in Appā€. Select the name you named this in the last step, and click ā€œAdd to this Appā€. It will do some magic behind the scenes, and then add
    // This #include statement was automatically added by the Particle IDE.
    #include "InternetButton/InternetButton.h"
  7. In the Web IDE, click the ā€œverifyā€ button on the left popout. After a few seconds, at the bottom of the Web IDE, it should say ā€œCode verified! Great work.ā€ If not, stop and post what it says, because none of the remaining steps will work.
  8. In the Web IDE, click the ā€œflashā€ button on the left popout. Within a few seconds, the small light on the board of your device should stop the ā€œcyan breathingā€ and instead turn magenta. If this is the first time programming the device, it may take a few minutes as it will probably perform firmware updates first.
  9. Go over to the logs section of the Particle Dashboard, and make sure itā€™s uploading right, before we connect it to IFTTT. Unplug and replug your device. Watch it connect to your wifi (slow green blinks on the board, to fast green blinks, to cyan breathingā€¦) Once the cyan breathing starts, the outer ring lights will flash a few colors to show you the program has started, and now itā€™s waiting for input. You should be able to press down on the device and feel the buttons on the bottom click. When you press down, the ring lights should show green. When you release them all, the ring lights should quickly flash white, before turning off and waiting for more input. At that point, the button release should have already been uploaded to the Particle servers. Within a few seconds, you should see it on the dashboard view. If so, letā€™s continue!
  10. Sign up or log into IFTTT. Connect the Beeminder channel and the Particle channel to your account.
  11. Create a new IFTTT recipe. Select Particle as the trigger, and then ā€œNew Event Published.ā€ The event name will be ā€œallbuttonsreleasedā€. You can leave the event contents blank. Select Beeminder ā€œAdd Datapoint to Goalā€ as the Action. I usually use ā€œ1ā€ as the datapoint, but you can do a bunch of fun stuff here. I set it to notify me when the recipe activates at the beginning, until I trust that everything is working together.
  12. Click your button! It should light up green while itā€™s pressed down, and then white after it is released, and then go back to all lights off. You should get a notification that the IFTTT recipe triggered in the webapp within a few minutes, and then it should show up in Beeminder!

Notes

Iā€™m not a huge fan of the Internet Button itself. I like the idea, but I would have chosen different tradeoffsā€“I would have probably eliminated the buzzer and accelerometer, and put a nicer case on the electronics.

Setting it up in the Web IDE is pretty gross, I have to admit. I think I could bypass steps 4-6 if I made this a library with an example. Let me know if anyone wants me to do that.

There is so, so much you can do with this, however. You can send over the time, instead of a ā€œ1ā€, to log when you wake up or go to bed, or when you finish cleaning the house, or whatever time-based goal you have.

I think itā€™s almost possible to have the whole thing flash red while youā€™re in an emergency day.

Iā€™m not a huge fan of it requiring power via a cable rather than a battery. Thereā€™s a socket on the inside that indicates that they were thinking about battery powerā€“but this device is pretty new. I havenā€™t heard if theyā€™re going to be adding a battery pack, or if it was abandoned during development.

Anyway, this sort of thing is one of the things I do for a living. After really getting hooked on Beeminder, I took a look and didnā€™t see any embedded Beeminder devices. I started working on some tutorials, and then realizedā€“none of the existing options are really great, so I was in a bit of paralysis as I started working on a ā€œBeeminder Kitā€ to extend one of the cheap off-the-shelf units to be awesome for Beeminder, and then Spark released their Internet Buttonā€¦ which isnā€™t perfect, but is probably ā€œgood enough.ā€

Please let me know if you have any questions, comments, ideasā€¦ I still may make a ā€œBeebutton kitā€ depending on how things go.

7 Likes

Wow. Iā€™m not a hardware type of guy, but Iā€™d play with some of these ideas if I could. Anybody knows where I can buy NFC tags cheaply in Europe? (Shipping costs from the US are ridiculous.)

1 Like

@mbork, try http://www.robotshop.com/eu/en/catalogsearch/result/?___store=eu_en&q=nfc or rapidnfc.com

Looks like they ship locally in the EU. Iā€™ve never used them, but a buddy on Twitter pointed me there.

1 Like

Go to your local library and check their used book sales.
Many of them use NFC tags for book tracking.

And you get a ā€˜freeā€™ book.

Also, check your credit cards & transport cards / tickets.
NFC tags are in everything these days.

2 Likes

I too have an internet button for beeminding, but Iā€™ve gone a few (ok, a lot) steps further with the functionality:

  1. Itā€™s not perfect and (at the moment) requires something running on a server of mine to be accurate (the beeminder IFTTT triggers need some more support), but Iā€™ve mapped each of the 11 leds to one of my beeminder goals. If the goal is green, the led is green, etc. The goal is to make the whole button green.
  2. Each of the four buttons map to a different beeminder goal (the button closest to the LED that represents the goal, of course.
  3. Pressing all buttons goes into a ā€œpomodoroā€ mode, where the internet button displays green lights in a cricle, slowly turning them off as the 25 minutes count down. It sends a message to IFTTT at the start and at the end of the pomodoro, and beeminds a pomodoro when done.

Iā€™m working on publishing the code and maybe some instructions on using it, if folks are interested. It is fantastically helpful, Iā€™ve never had as many of my goals green before.

7 Likes

Iā€™m generally interested in these things, but find that I donā€™t feel like stashing buttons everywhere, and neither am I terribly happy pulling up my smartphone to scan things. I thought there was a ring sized NFC reader available (which could make NFC reading less reliant on a smart phone), but googling tells me Iā€™m probably wrong about that. I suppose it could be possible to build something with https://dangerousthings.com/shop/simple-pn532/ though (and hopefully these things will shrink further).

When that is said, I found this to be very interesting - if the act of just touching something/anything could be the trigger: http://arstechnica.com/gadgets/2015/11/disneys-smartwatch-prototype-can-identify-and-track-everything-you-touch/

Iā€™m also thinking that this ā€œmicro-radarā€ chip could do similar stuff, even without touching: https://www.xethru.com/

2 Likes

This sounds amazing! Any chance we could see a picture in the meantime?

Sad to report bad news, but it seems like Flic is bogus.

I ordered mine back in February and they arrived last week. Sadly, they wonā€™t pair with my phone. Their FAQ says it should work with ā€œSelected Android devices using Android 4.4 or later with Bluetooth 4.0.ā€ but it doesnā€™t say what ā€œselected devicesā€ means. I guess mine isnā€™t one despite meeting the other requirements? I emailed their support a week ago and havenā€™t heard back.

Has anyone had a similar or different experience with Flic?

I have a friend who has one, his works fine, "It requires a fairly recent bluetooth low-power phone"
Does your phone meet the specs?

1 Like

Also, does any one have any experience with btt.tn?

14 days later Iā€™ve heard back from Flic and their response was just to ask if my problem magically solved itself. Wait 'em out ā€“ Now thatā€™s a customer support strategy!

They did at least confirm that my phone (Nexus 5) should work with Flic. Iā€™m trying to get them to tell me their mailing address for returns but theyā€™re not replying to that request. Iā€™m worried they are going to say I didnā€™t return the Flics within the deadline and then Iā€™m going to have to argue that their delay in replying to the return request email shouldnā€™t count against my time limit and theyā€™re going to say thatā€™s my problem, etc., etc.

I ordered a flic myself just recently - should get here this week, I think. Hereā€™s hoping it works a little better than yours hasā€¦ I will share how it goes. My phone is a Moto X which definitely works with the low energy bluetooth stuff.