Automate your Pomodoro Process Today

Automate your Pomodoro Routine with Amazon Alexa, Google Assistant, or Home Assistant.

Read Time:8 Minute, 38 Second

Automate your Pomodoro Routine with Amazon Alexa, Google Assistant, or Home Assistant.

Photo by Alex Ghizila on Unsplash

This post may contain affiliate links that the author will receive compensation if a purchase is made through the links.


Working from home was supposed to be a short term event. Since that ship has sailed, we need to find a way to focus at home. Focusing at home can be hard, where there are housemates, TVs, and Video Games. To keep me on task, I follow a four-step process, to make sure that I remain on task:

  1. List my goals and activities at the beginning of the week (I use a Trello Board or some other Kanban Board)
  2. Break down those goals and activities into small manageable tasks. I then transcribe those tasks and track them in Todoist.
  3. Schedule those tasks over the week, focusing on never over-burdening a day.
  4. Work on the tasks in front of me in short bursts.

The Pomodoro technique is a great way to maintain your focus and combat distractions. To prevent yourself from being overwhelmed, you try to focus for only twenty-five minutes at a time. These small work sessions are coupled with short breaks.

By achieving small bursts of concertation, the idea is that you aren’t overwhelmed with everything that you have to do, you are just focusing on “putting one foot in front of the other” for twenty-five minutes, i.e. Getting Stuff Done.

The benefits and theory are explained really well in the article below:

Pomodoro Technique, version 4.u (Medium)

This technique does require tools to manage our flow. Namely a timer and a way to manage it. When I first started out, I started using the below timer. It’s easy to use and relatively cheap.

I wanted to reduce the friction between managing the work sessions and break times so that I could actually focus on my work. So I looked at automation opportunities.

Regardless of what Home Automation Hub you have, there is a solution to this problem, feel free to skip to the platform that you want to use:

Amazon Alexa Routines

The Amazon Alexa is a very low cost “digitial assistant”. Out of the box you can create timers, but that’s just a voice solution to the timer block.

Amazon provides the ability to automate workflows via Routines. You can access this by hitting the “More Button” on your Alexa app and choosing “Routines”

Access Your Routines from the Alexa App

Steps to Create The Routine

Full Alexa Routine
  1. Give Alexa a Phrase to Listen for: “Alexa, I need to work”
  2. Provide a Confirmation Response that Alexa Heard You — you can use a Light Change or an Audible Notification
  3. Wait (or Play Music) for 25 minutes (your focus time)
  4. At the end of the 25 minutes say a notification to let you know its time to rest
  5. Wait for 5 minutes (your break time)
  6. Say a notification that your break is over

You can use either Alexa to announce your notifications or use your integrated smart lights.

You’ll notice that I use my Office Lights to change colors in various phases of my Pomodoro sessions. This allows me to see at a glance when I should be focusing vs resting.

Alexa Routine Steps
Alexa Routine Steps

NOTE: You will have to tell Alexa to repeat the loop when you are ready for your next Pomodoro session.

Google Assistant Routines

Google Assistant’s automated workflows are also called routines. To get started, open the Google Home App, Navigate to Routines, and Hit the (+) button to create a new routine.

Creating a new Google Assistant Routine

Steps to Create The Routine

  1. Give a Phrase (or group of phrases!) that will start your Automated Pomodoro Work Phrase
  2. Change the Color of your Office Light
  3. Start a timer called “Rest” for 30 minutes. This way you will know when its time to end your rest phrase.
  4. Start a timer called “Work” for 25 minutes. This way you will know when it’s time to stop your rest phase.
  5. (Optional) Use music to help set the mood for optimal productivity.

Notice that we defined all our action definitions in “Plain English”. Anything that you can do with your Google Assistant can be a step in your routine. When you know what you want to happen, type the command exactly as you would say it. I would test the commands to make sure that it works as expected before committing it to the routine.

The main difference between Alexa and Google Routines is the manner in how you have to think about setting up the routines. Alexa Routines are like steps in a cookbook, do this and then that. Google Routines happen at once, so you have to think a little harder about what will happen and when and plan accordingly.

Most “smart” lights work for both the Amazon and Google Ecosystem. Make sure that when you make your purchase, that you check for compatability. Here are two of the most popular lights (Phillips Hue and Lifx):

Home Assistant Technique

If you want more control and to integrate other functionality into your Pomodoro flow, Home Assistant has what you want.

In my case, I’m going to use Home Assistant (on a Raspberry Pi), an Amazon Alexa, and the Phillips Hue ecosystem to create my timer and track my progress.


Now that we have the hardware, it is time to look at the actual automation.

We are going to use three different components in Home Assistant to make our Pomodoro flow (these can all be accessed from the Home Assistant “Configuration”):

  1. Helpers — These are counters and toggles that we are going to use to keep track of our automations
  2. Scripts — These are the equivalent to the routines in Google Assistant and Amazon Alexa
  3. Automations — Our Stimuli (in this case pushing buttons on our Phillips Hue Remote) that kick off our Scripts.

We are going to use a Phillips Hue Smart Dimmer to make our automation tactile.

Create the Helpers

Home Assistant recently added “Helpers” to their automation stable. Think of these Helpers as Variables in a typical programming environment.

We are going to create two Helpers:

  • An Input Boolean — This allows us to indicate when we are in our “Work Flow”
  • An Input Number — This allows us to count our completed Pomodoro Work Flows

Create our Scripts

Home Assistant can create scripts either in the GUI or as shown below in the YAML syntax. I’ve added it here for you to easily copy into your own /scripts.yaml file or you can create it in the GUI (as shown below).

pomoscript:
alias: PomoScript
sequence:
- service: light.turn_on
data:
rgb_color:
- 86
- 177
- 179
entity_id: light.main_office
- service: input_boolean.turn_on
data: {}
entity_id: input_boolean.pomoflow
- wait_template: ''
timeout: 00:25:00
continue_on_timeout: true
- service: light.turn_on
data:
rgb_color:
- 103
- 179
- 86
entity_id: light.main_office
- service: input_number.increment
data: {}
entity_id: input_number.pomocomplete
- service: input_boolean.turn_off
data: {}
entity_id: input_boolean.pomoflow
- wait_template: ''
timeout: 00:05:00
continue_on_timeout: true
- service: notify.alexa_media
data_template:
target: media_player.office
message: You have completed {{ states('input_number.pomocomplete') }} cycles
data:
type: announce
method: all
- service: input_number.decrement
data: {}
entity_id: input_number.pomothissession
mode: single
  1. Once the cycle is kicked off via the automation, we change our office light to a light blue via a Call Service and set our toggle (input_boolean.pomoflow) to on
  2. We then have the system WAIT for 25 minutes (Remember to set the continue_on_timeout: true option)
  3. The light then changes to green for 5 minutes via a Call Service
  4. We increment our counter (input_number.pomocomplete) and set our toggle (input_boolean.pomoflow) to off
  5. At the end of the five minutes, we use Amazon Alexa to announce the number of cycles we have completed

Note: I’m using the add-on component Alexa Media Player to do the final step and added another helper (input_number.pomothissession) in case I want to track how many Pomo Cycles I have left.

Here are all the Configurations in the GUI Editor:

Changing Lights
Wait (make sure to toggle Continue on timeout)
Incrementing my Pomo Complete
To Pass Variables/Helpers you have to edit your step in YAML to get the “data_template” option.

We also need to create a script to reset our counter to zero. So create another Script called Weekly Pomodoro Reset and use it to set the input_number helper to 0.

By creating a script, you can call it via multiple automations! Modularity is important.

Create the Automation

Now for the magic. We are going to call these scripts via pushing a button.

Create a new Automation and choose a trigger from you Phillips Hue Dimmer Switch.

Then you can use the simple repeat loop available in Home Assistant to repeat it however many times you want. You can also use an additional input_boolean and pass the field as a parameter to the count option so that you can dynamically set your sessions. See the Home Assistant documentation for more information.

Using the same format you can also do things like:

  1. Use one of the buttons to increment the tasks completed, so you can track your productivity during the week.
  2. Create a Lovelace dashboard to visually show how productive you’ve been!
Extra Opportunities for Your Automation

Focus is within your grasp! Taking the time to automate your Pomodoro timer will help reduce the friction between work and distractions. Use these recipes as a template to get started, but make sure that they work for you!.

How will you be able to integrate this automation into your other automation needs?

For example:

  • You can continue to iterate over these automations to let your housemates that you are working
  • Call third-party web services like IFTTT to perform additional tasks based on stimuli from other programs

Why IFTTT’s new pricing model is actually good for you!
Taking the lemons of App Commercialization and turning it into Product Design Lemonademedium.com

  • Integrating your Trello or Todoist into the workflow by keeping track of what tasks to perform in your Pomodoro Sessions.

Previous post Why IFTTT’s new pricing model is actually good for you!
Automation Components Next post A story of Ambient Lights, Automation, and a Happy Partner