DEV Community

Cover image for How I'm Automating My Productivity With This Smart Home Combo
Rohov Dmytro
Rohov Dmytro

Posted on • Originally published at blog.swingpulse.com

How I'm Automating My Productivity With This Smart Home Combo

Have you ever used timers to enhance your workflow? I have. Setting time boundaries works for me quite well but managing timers is not that pleasant.

It was the case until I found a much better way to support my productivity with a home automation setup!

This post is a part of series where I'm sharing my experience about Pomodoro and building great habits around coding, productivity, focus, journaling, health and more. You can check them out to steal my experience.

Worth noting

Most of the time I work from home. Use my experience as a source of inspiration to adapt it for your personal workflow. It's not a step by step instruction. It's a publicly shared usecase with some open sourced code.

TL;DR

To manage my Pomodoro timers in a most friction-less way I use Google Home Assistant routines and a desktop app to view those timers in a status bar.

The Overhead with Timers

I really like an idea to tune the environment in my favor. The idea is very simple.

Instead of spending willpower to fight through things I can organise the environment in a way that will encourage my positive behaviour.

What can I tell about my previous experience with timers?

Managing timers is a little bit cumbersome

Loading apps, grabbing a phone, swipes, clicks, gestures, hotkeys — it's all quite easy. But it is still some additional actions between me and productivity.

Avoiding escape hatch

I used to break Pomodoro routine using friction as an excuse.

Managing myself is a challenge. When I have a challenging Pomodoro session it is easy for me to use frustration as an escape hatch. It is especially easy to ignore timers that pop up from my laptop.

And last year I found a better way that works for me nicely and does not have these problems.

Automating Formula

This is the formula I came up with: Google Home + Pomodoro Technique + Electron App.

I've set up my Google Home Assistant to create my pomodoros and wrote an app to display those timers in Mac OS status bar.

It's a set up that's works pretty well for me for about a year.

Voice is very natural for this use case

I found that for me setting up timers using voice is the most convenient and frictionless way. It's just a matter of syncing my butt movement with my voice command. And nothing else.

Voice is a commitment

Once a routine started — I am doing a commitment. For some reason, voice command is a nice trigger to start at work I will commit to.

Setting up Google Home Automation

Google Assistant has a feature called «Routines». Basically, you are binding one keyword phrase too many actions. So I've set up a Google Home Assistant routine to create many timers from a single command.

In my case, I'm using three different key phrases. Each of them creates different number of pomodoro sessions — 1 session, 2 sessions and 4 sessions.

The commands are:

Hey, Google! Time to work.

Hey, Google! Time to work hard.

Hey, Google! Time to work really hard.

'Timer routine'

Someday it will mean that Google itself with start doing what I need, but for now the job is on my part.

Displaying Timers in Status Bar

To know how much time left I can simply ask my Google Assistant. But to get info faster I've done this:

'Timers demo'

I will share some code. The aim is not to be a detailed guide, but more of a overview how you can replicate something similar for your workflow.

Getting data

There is a URL to get JSON data about timers created from google assistant.

const URL = `http://${DEVICE_IP_ADDRESS}:8008/setup/assistant/alarms`
Enter fullscreen mode Exit fullscreen mode

JSON response is:

'Timers JSON'

We can get the ip address from device settings screen in mobile app or by scanning your local network.

Displaying data

It was up to me what to do with this data. I've decided to go with an Electron app that displays timers in menu bar. I've open sourced this project.

I called it FOCUTRON. 😄

Please remember that the code is extremely ugly. And it's not user friendly and there might be bugs. Pull requests are welcomed!

It Just Works

I really like my set up and it is proven to work for me for about a year! You can steal and adapt it for yourself. Tuning environment is a very powerful concept. Now I set up timers by voice with zero friction and can quickly check them out via app. Nice!

What use case comes on your mind?

P.S. Do subscribe to my blog not to miss good stuff. Also come say hello at twitter!

Top comments (12)

Collapse
 
lostintangent profile image
Jonathan Carter

This is so cool! Ironically, I just published a Pomodoro timer that's fully collaborative, and integrated into Live Share: aka.ms/vsls-pomodoro. I'm equally as curious/passionate to explore ways to encourage better time management, especially within pair programming sessions. I'll be following your series to learn new tips 😄

Collapse
 
rohovdmytro profile image
Rohov Dmytro

Hey, would you mind me sharing this your «preview» on twitter?

Collapse
 
lostintangent profile image
Jonathan Carter

Nope! Please do.

Thread Thread
 
rohovdmytro profile image
Rohov Dmytro

Done!

Collapse
 
rohovdmytro profile image
Rohov Dmytro

Wow!

I am expressing to you my respect to combine ideas of pair programming and time boundaries! That is so cool! Love it.

Collapse
 
johannesjo profile image
Johannes Millan

My personal approach is to merge time tracking and task planning into one app: github.com/johannesjo/super-produc...

Collapse
 
rohovdmytro profile image
Rohov Dmytro

I've checked an app and it's very nice. 3400+ commits and 145 releases looks very serious.

Do you market your work? It looks promising.

Collapse
 
johannesjo profile image
Johannes Millan • Edited

I probably spend waaaay too much time developing this app. Basically it's the result of a lot of productive procrastination and very strong negative feelings towards repetitive work ;)

I'm not really marketing it apart from the occasional comment on articles related to programmer productivity. I probably should do more, but I have much less fun doing that than I have with adding new features. Also code signing for mac and windows would definitely be cool so it could be published to the respective stores and installed without a warning message on those systems...

Do you maybe have a suggestion or two how to make it more popular?

Thread Thread
 
rifaimartin profile image
Rifai Martin

You must often write articles about time management using the tools you make, I'm sure it can make your device more famous and can be used by many people

Thread Thread
 
rohovdmytro profile image
Rohov Dmytro

There is a youtube channel that might make an overview.

youtube.com/user/cesidalessio

Collapse
 
vincajayi profile image
Vincent O Ajayi, PhD in Economics

Great!

Collapse
 
jaga profile image
Jaga santagostino

wow didn't knew about routines nor that google home exposed a the web server
love it ❤️

Thanks