Git Product home page Git Product logo

teasmade's Introduction

Teasmade

YouTube Channel Views

Raspberry Pi Teasmade AI (making Coffee)

OK, so the AI is a bit of a stretch. The script the uses a Google Calendar (via gcalcli) to control a relay placed in a 1974 Goblin 854 Teasmade to boil water for tea/coffee. Shown in this video

The motivation for building this, is a simple proof-of-concept for using a ring-fenced online resource to trigger device (not teasmade) - automation.

Moral: It's possible to use home-automation controls without signing-up to have a listening device constantly plugged into the cloud. If Edward Snowden had an automated tea/coffee machine, it would be this one, probably. (TO DO: Snowden Endorsement Ad)

Prerequisites

A Raspberry Pi with a relay switch and an internet connection.

Follow the installation instructions for the above on your Pi.

Installation

git clone https://github.com/llvllch/teasmade.git
cd teasmade
pip3 install -r requirements.txt

Instructions

To run:

python3 teasmade.py

Put a 5 minute appointement in your google calendar with the title "brew time" (or whatever you chosen trigger word is).

The script monitors the calendar and when it sees a reminder that it's brew time, it switches the relay to turn the Goblin Teasmade on. It the code scans your chosen gmail calendar once a minute and checks "Is there a matching slot between X and X+1 minutes from now (X is a parameter in the config file). If it sees a calendar slot with the trigger word(s) (in config.yaml) in the title, the relay switch closes (which just mimics the teasmade alarm being activated) and the water begins to boil. Once the the alloted time ( closedfor minutes in config.yaml) has passed, the alarm plays (we use the British National anthem).

Add Autostart

cat <<EOF | sudo tee /etc/systemd/system/teasmade.service
[Unit]
Description=teasmade
After=network.target

[Service]
ExecStart=/usr/bin/python3 -u /home/pi/teasmade/teasmade.py
WorkingDirectory=/home/pi/teasmade/
StandardOutput=inherit
StandardError=inherit
Restart=always
User=pi

[Install]
WantedBy=multi-user.target
EOF

Now, simply enable the service you just made and reboot

sudo systemctl enable teasmade.service
sudo systemctl start teasmade.service

sudo reboot

Bonus - Voice control

If you'd like to take this entire transaction off-grid and have a less formal relationship with your Teasmade, then it's relatively simple to control it with an offline voice recognition tool. The file teasmadevoice.py contains the code to control the teasmade using Picovoice - an Edge Voice AI Platform. There are fully open-source alternatives to picovoice (eg Mycroft).

Installation instructions for the installation of the required tools can be found on the Grove Website.

teasmade's People

Contributors

veebch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.