The Mugsy State

internet_of_things___iot_mugsy.png
Mugsy, the robotic IoT pour-over machine. Courtesy of Matt Oswald, inventor of Mugsy.

This state is straightforward, there is no display component, so no screen, and no interaction. All it does is send a command to a Mugsy IoT coffee maker and return to the time state. That's done in tick.

The purpose of this state is envisioned to send a "Brew a mug of coffee" command to a Mugsy. However, it can be used for anything similar. For example, it could send a command to IoT lighting or blinds (or both).

Download: file
class Mugsy_State(Time_State):
    """This state tells Mugsey 'Make me a coffee' """

    def __init__(self):
        super().__init__()
        # mugsy support
        self.background = 'mugsy_background.bmp'



    @property
    def name(self):
        return 'mugsy'


    def tick(self, now):
        # Once the job is done, go back to the main screen
        change_to_state('time')

    def enter(self):
        global low_light
        low_light = False
        pyportal.set_backlight(1.00)
        pyportal.set_background(self.background)
        board.DISPLAY.refresh_soon()
        board.DISPLAY.wait_for_frame()

What's this mugsy thing? From the site:

"Mugsy is the world's first hackable, customizable, dead simple, robotic coffee maker. Every aspect of your brew can be controlled, from grind size and water temperature to pour over pattern and bloom time. If you prefer simplicity, Mugsy will get out of the way. Just send it a text, a tweet or hit that Coffee Now button and your cup will be ready in the time it takes to get to the kitchen. "

It seems like the ideal thing to have a button on your alarm clock to tell Mugsy to make coffee before you even get out of bed. All that's missing is a robot butler to bring it to you in bed.

This guide was first published on Mar 27, 2019. It was last updated on Mar 27, 2019. This page (The Mugsy State) was last updated on Sep 04, 2019.