Tracking Focusmate Completed Sessions on Beeminder

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?

9 Likes

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.

4 Likes

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…

3 Likes

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.

2 Likes

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.

6 Likes

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?

2 Likes

There is no public leaderboard. Users’ completed sessions are public, given that you are logged in with a user account.

2 Likes

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.

2 Likes

Also would be very interested in this feature! Currently manually logging my sessions.

2 Likes

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.

1 Like

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.

2 Likes

Hey all,

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!

9 Likes

Great workaround!

1 Like

@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!

8 Likes

For me, the first step would be to make the total completed sessions available via a single endpoint:

https://www.focusmate.com/user/username/completed_sessions

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:

https://www.focusmate.com/user/username/my_goal/completed_sessions

That would allow multiple Beeminder goals to track various projects or tasks.

2 Likes

I lost track of which is the official Focusmate integration thread. We have so many Focusmate threads.

Anyway, what’s going on here:

It seems like the total (154) is okay, as I did four sessions today, but there are two sessions missing?

Nevermind, looks like Beeminder only updated the graph but not the Data. After a refresh, all four datapoints where there. I don’t know if that could be considered a bug.

3 Likes

The integration still behaves somewhat strangely for me. There is a significant mismatch in the total session count between Beeminder and Focusmate. It probably has something to do with cancelled sessions or the like.

I don’t care that much as long as the value in Beeminder is higher than the one in Focusmate. However, it is a little bit misleading as I have a yearly go and Beeminder says I am like 30 days ahead, and in reality it’s only 20 or so.

Edit: I should probably write an email to Support with the URLs to my Beeminder and Focusmate pages instead of complaining here, but I suffer from Akrasia when it comes to proper bug reports.

1 Like

I strongly agree with this and would like something even more-something that tracks your sessions by the time for each. i.e.

400 50 minutes sessions

20 75 minute sessions

300 25 minute sessions

all for complete sessions only of course. an easily accessible version would be REAAAAAAAALLLLY nice.

2 Likes

I knew not counting the minutes was going to make this frustrating for everyone who needs long focus blocks from the beginning :sweat_smile:

2 Likes

You can track minutes by emailing support.

Beeminder counts sessions where you’re ghosted by the other person. Focusmate probably does not. (I mean, they do track them–that’s where we get the data from.)

2 Likes