One of the things my parents gave me when I left for college was a single cup coffee maker. This was given, no doubt, with the intent of saving me money. Ironically, it ended up costing me way more than I might have spent on coffee anyway. You see, I’m not very good at waking up on time. Generally, I wake up with just enough time to toss on some clothes, brush my teeth, run a hand through my hair and leave. But every morning, I would look at that coffee maker and be reminded how much I wanted a cup of coffee. This resulted in me going to Starbucks between classes. I spent far too much money at Starbucks last year.
A coffee maker that is connected to either a websocket or a local server depending on the use case. It was built with Js, NodeJs, ExpressJs, and Websocket.io
The coffee machine is hooked up to a raspberry pi, via relay board. There are two modes that the coffee maker runs in: Internet mode and Motion detector mode. While in internet mode, the raspberry pi connects as a client to a server hosting a websocket. Once it is connected, anyone that goes to the server’s website can request a coffee brew and see the updates as it goes along. This mode exists because some friends and I thought it would be fun to do a podcast with it, where people could interact with the machine. Additionally, it acts as a failsafe for the motion detector, should that fail. While in motion detector mode, the raspberry pi hosts its own web server which is looking for post requests from a local source. A second pi is located in my bedroom and has the actual motion detector hooked up to it. If the motion detector gets set off, then it sends a brew request. The web server on the first pi keeps a log of all requests, and looks to see if it is the first request of the day. If it is, it brews the coffee and goes to sleep until 6 am the next day.
The goal of a home automation project is to make a task more convenient for users. This is usually accomplished in a three layer system User > Smart assistant/web app/etc > Appliance. A great step forward, but the goal isn’t to talk to some smart assistant, or interact with a webapp. The goal is to automate. Passive interaction proposes a two layer system: User > Appliance. To accomplish this, the machine must be observant and react on those observations. In my project, this is accomplished via motion detector. The machine observes me leave my room and checks if the conditions are right to brew the coffee. If they are, it completes its task. This does not require me to interact directly with anything, making the interaction completely passive.