Turning productivity into a game with RescueTime and Home Assistant

Turning productivity into a game with RescueTime and Home Assistant

It's the start of a new year and everyone is making new resolutions, many wishing they would be more "productive" in the next 12 months or decrease the time they're procrastinating. I did this too in the past years, always trying to increase my productivity by reading and applying different techniques, because... I was a procrastinator, or at least that's what I thought. I really hate this word, it just sounds bad, and thinking of myself like this certainly didn't help. But how was I so sure that I was a procrastinator?

Was it because I was always finishing tasks right before the deadline? Or because I procrastinated a lot when I had to do a task that I hated? Maybe because I spent most of my free time watching movies or playing video games instead of working on some personal project?

Any of these things could make someone feel like they are not a productive person, but I was not seeing the entire picture. Why was I so hard on myself for finishing tasks right before the deadline when I was actually finishing them? Why couldn't I see that while I procrastinated a lot on tasks that I hated to do, I was very productive on the ones that I liked to do? Why was it wrong to spend my free time procrastinating? It took me a few years to realize that I was just different, like we all are. Some people can take a task and focus on it until it's completed, no matter if they like it or not. I envy them, but I'm not like that, and this doesn't make me a "procrastinator", because at the end of the deadline we both finished the task one way or the other.

Even so, I decided to stop focusing on making big goals that would make me feel like I wasn't achieving anything, and instead I would focus on productive habits. One of them is to reduce my "distractive time", so I figured that I had to do these 3 things:

  • measure my productivity
  • set a goal and make it a habit
  • get notified when I get distracted so I can return to work as soon as possible

Measuring productivity

I've used IDE extensions like Codealike and Wakatime to see how much time I spend on different projects or technologies, but they only show the time inside the IDE. If you go on StackOverflow for a few minutes, they won't track it, even though that still counts as work (actually... that's most of the work sometimes). That's when I realized I had to use something more general that doesn't track only IDE time, so I installed RescueTime.

I've been using RescueTime on and off for the past 5 years. I say on and off because I wasn't really using it to its full potential. There are other tools like this out there, but I either haven't found something better to match my needs or I haven't looked good enough. The things that I like about RescueTime are the following:

  1. You can define what time is productive or not for you. For example, Facebook is procrastination for most people ("very distractive" in RescueTime lingo), but for those working in Advertising it's actual work so they can set it as "Very productive".
  2. You can use "Focus mode" as a Pomodoro timer, only it's not just a timer. It will actually block distractive websites when you're in Focus mode.
  3. You can see detailed analytics and reports of your time by day/week/month/year.
  4. You can set alerts that can let you know when you spent too much time on social media or other distractive activities
  5. It has an Android app that monitors the phone activity so you can track what you do on your phone as well.

There are more things I'm sure, but these are just the ones I use the most. Probably I should let a picture do the talking, so here's my Rescue Time dashboard for 2020:

Rescue Time dashboard

I love analytics, especially when they are about myself. This dashboard provides enough information to realize where I spend most of my time, during and outside work hours. I could write a blog post about these analytics alone, but I'm only going to talk about the most useful thing in that picture, the productivity score. I don't know what's the algorithm, but I know they take into account the time spent on certain activities and also their "productivity level".

Set a goal

We usually compare ourselves with other people and we think we're not good enough because we don't reach the same results. I was doing the same thing, but then I realized that it's wrong to compare myself with another person because maybe they don't have any kids so they have all the free time in the world outside work. Now I compete with myself, and I can do that using the productivity score. This way I can compare myself with the day before, try to reach a new record every day, or at least keep the score above a certain level. I made a card in Home Assistant that shows the productivity for the past 7 days so it's easier to track, can you guess which of those days represent the weekend? 😂

image.png

For this year, my goal is to have an average productivity of 65. I found that this was an appropriate score after looking at the data, because there are also weekends and vacations, right?

Stopping interruptions

Do you know what's one of the biggest downsides for app developers? Compilation time. It's not like on the web, where you can refresh your page and immediately see your changes. Depending on the size of the project and the speed of your computer, it can take even minutes to compile and run your app. In that time, I find myself opening Twitter or Facebook and forget what I was doing. Yesterday, while my app was starting, I opened Teams to see what my colleagues are talking about, only to find myself 30 minutes later on YouTube searching for how to pronounce "vin Diesel" correctly just because there was a debate in my team about this.

How do I fix this?

In order to forget that I'm spending time on distractive websites, the best thing I can do is to monitor my productivity score in real time, and check when it's going down. So, if I switch from Visual Studio to some distractive website, my score will drop in a matter of minutes and I will get notified as soon as that happens. That way I would spend 5 minutes procrastinating instead of 30 minutes.

Using RescueTime and Home Assistant, here's what I managed to do:

Unfortunately, RescueTime doesn't provide an API for retrieving the productive score so I have to do web scraping every minute, but it worked pretty well in the past 2 months so I'll settle with this solution. The good part is that it actually works for me, and now as soon as I see that red light on I evaluate what I'm doing. If I'm in a break I can ignore it, otherwise I instantly switch back to what I was doing so my score will go back up. As I said, it's a competition with myself and I have to beat my previous score, right?

Another thing that helps is having all of this information on a separate monitor so it's always at a glance. I recently replaced my monitor and I placed the old one on my wall. Then I glued a Raspberry Pi on the back which shows my productivity dashboard.

Productivity dashboard

If you are interested in knowing more about my productivity dashboard, let me know in the comments and I'll probably do a follow up article or a video if there are many questions to answer!

Did you find this article valuable?

Support Bogdan Bujdea by becoming a sponsor. Any amount is appreciated!