I have been using Focusmate and it has really helped increase my productivity. On Focusmate you have to create “sessions” and then you will be accountable to show up to those sessions and thereby work. However I am putting off actually creating the sessions, which is where I think Beeminder could come in handy. Is there a way to set up Beeminder (via the API or otherwise) such that it tracks the number of sessions completed on Focusmate? Ideally I would use the “Completed Sessions” counter on the profile page to track how many sessions I did. The issue is there is no API for Focusmate, but is there some way to capture then number of completed sessions?
I’ll be following the answers to this one!
I have been using Focusmate for the past year of working from home. Since I don’t have a set work schedule, Focusmate helps me get started in the morning. Without it, I may not get to my desk and start work until 9:00 or 9:30. By scheduling a Focusmate to start earlier, and having a work partner waiting for me, there’s then some urgency to get to my desk.
I had a Beeminder goal to schedule a certain number of Focusmate sessions a week, but it was manual. I would like to make this automated as well.
Ha, are you me? I’d also love to implement this. Right now I’m setting up a workaround (of sorts?) with Boss as a Service to verify by the end of the day (by screenshot) that I’ve hit my target number of Focusmate sessions. Only downside is that BaaS has a bit of a waitlist. And it does seem like something that could be automated, somehow…
I am also a huge fan of Focusmate, which has really increased my productivity, not only for work, bu I also use it for practicing piano and doing housework.
I left a comment saying I would love to be able to Beemind my competed Focusmate sessions on the Focusmate blog and Taylor replied saying it was a great idea. So maybe something will happen about it? That would be awesome.
I use a Habitica Daily for doing my required (by myself) Focusmate sessions and I Beemind my Dailies, that’s how I get around the lack of direct integration.
That’s great to hear others here also use Focusmate! I would imagine it wouldn’t be hard to implement, but likely requires cooperation in some form between Beeminder and Focusmate.
If you’re comfortable using shell or Python/… scripts, you could do this yourself by scraping the number of completed sessions from https://www.focusmate.com/profile and then posting it to the Beeminder API. You could then automatically run that script regularly or just at the end of the day.
Some pointers in case someone wants to try this: the script probably first needs to get the cookie that Focusmate uses for authentication; either by sending the same POST request that the login form generates or by using some library to actually fill out and send the login form (that’s assuming you log in on Focusmate via email).
After that, finding the number of sessions looks doable. In Python, you could use this beautifulsoup argument to look for the HTML tag with the “Completed Sessions” text. The only sibling of that tag then contains the number of sessions. Of course, that’s very brittle if the Focusmate UI changes even slightly, so an official integration would certainly be much better.
I don’t have time to implement this myself right now, but if there’s interest and no one else does it until then, I might give it a shot in a few weeks. No promises though.
Is there any chance there is a public leaderboard or stats? Is there any way an anonymous person can get the number of sessions for a person?
There is no public leaderboard. Users’ completed sessions are public, given that you are logged in with a user account.
Also replying so I can keep track of any good ideas; I have exactly the same problem, with putting off making Focusmate sessions! Unfortunately I have to schedule them around my meetings, so it’s hard for me to have them scheduled more than a couple days in advance.
Also would be very interested in this feature! Currently manually logging my sessions.
So I’ve tried doing this but the main issue I’m running into is being able to login to focusmate via python. From there one should be able to scrape the completed sessions as you said. I am a bit of a newbie when it comes to this stuff though so there’s probably a doable way.
Yeah, the login on Focusmate isn’t as simple as on some other websites. I made a working version a few days ago by recording the requests sent out by my browser and then imitating the relevant ones from Python. But that uses the Focusmate Google API key (I think), so before posting it here, I asked the Focusmate team for permission; they said they’d get back to me. If they are fine with people using this method, I’ll post the script here.
I ended up finding a workaround that’s a little more automatic. Basically, I ticked the option to have Focusmate send a calendar invite for each session. Then I set up a Zapier zap with Google Calendar’s “new event matching criteria” (or whatever it’s called) as the trigger and narrowed it to events with “Focusmate” in the title. So that could feed datapoints directly to Beeminder if you’re tallying sessions.
Personally, I took it a step further (because I’d been tracking minutes of work, for some reason) and brought in RescueTime. So the zap triggers a 45-minute Focustime session in Rescuetime for each Focusmate event on my calendar. Then I use IFTTT to send the session data from Rescuetime to Beeminder. A bit convoluted, I guess, but it works (and the IFTTT applet is a developer applet from Rescuetime, so it doesn’t use up one of my three freebies.)
Hope that’s useful to anyone else!
@devinat1 Thanks for asking this question and nice work @lovelygenerator on finding a workaround for this via Zapier and IFTTT. Has anyone else tried this and been able to create a solution for their needs with this too?
I just wanted to drop in here to say that we’re listening over at Focusmate and love that you are wanting to use Focusmate with Beeminder!
Thanks to @ejennerm, Felix and others for reaching out to us as well to put this on our radar. A public API for Focusmate that allows these types of integrations is definitely something we’d like to offer soon but don’t quite have an ETA for it yet.
If we were to implement a Zapier integration for Focusmate would that work for most of you to accomplish your Beeminder + Focusmate goals?
I’d love to hear more about how you would like to use our two platforms together so we can be sure to create a solution that works for you!
For me, the first step would be to make the total completed sessions available via a single endpoint:
It could return a text file with the integer or an XML file. That would make it easy for Beeminder to provide integration with minimal effort, similar to the Project Euler one.
The dream would be if users could label their sessions. There could then be an endpoint for each user and each label, such as:
That would allow multiple Beeminder goals to track various projects or tasks.