Code Monkey home page Code Monkey logo

silvia-pi's Introduction

silvia-pi

A Raspberry Pi modification to the Rancilio Silvia Espresso Machine implementing PID temperature control.

Currently Implemented Features:

  • Brew temperature control
  • RESTful API
  • Web interface for displaying temperature and other statistics
  • Programmable machine warm-up/wake-up

Planned Features:

  • Steam temperature control
  • Timed shots with pre-infusion
  • Digital pressure gauge

Dashboard

Hardware

Hardware Installation

Installation Instructions / Pictures

Circuit Diagram

High-level circuit diagram:

Circuit Diagram

Software

Install Raspbian and configure Wi-Fi and timezone.

silvia-pi Software Installation Instructions

Execute on the pi bash shell:

sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y install rpi-update git build-essential python-dev python-smbus python-pip
sudo rpi-update
sudo bash -c 'echo "dtparam=spi=on" >> /boot/config.txt'
sudo reboot

After the reboot:

sudo git clone https://github.com/brycesub/silvia-pi.git /root/silvia-pi
sudo /root/silvia-pi/setup.sh

This last step will download the necessariy python libraries and install the silvia-pi software in /root/silvia-pi

It also creates an entry in /etc/rc.local to start the software on every boot.

API Documentation

GET /allstats

Returns JSON of all the following statistics:

  • i : Current loop iterator value (increases 10x per second)
  • tempf : Temperature in °F
  • avgtemp : Average temperature over the last 10 cycles (1 second) in °F
  • settemp : Current set (goal) temperature in °F
  • iscold : True if the temp was <120°F in the last 15 minutes
  • hestat : 0 if heating element is currently off, 1 if heating element is currently on
  • pidval : PID output from the last cycle
  • avgpid : Average PID output over the last 10 cycles (1 second)
  • pterm : PID P Term value (Proportional error)
  • iterm : PID I Term value (Integral error)
  • dterm : PID D Term value (Derivative error)
  • snooze : Current or last snooze time, a string in the format HH:MM (24 hour)
  • snoozeon : true if machine is currently snoozing, false if machine is not snoozing
GET /curtemp

Returns string of the current temperature in °F

GET /settemp

Returns string of the current set (goal) temperature in °F

POST /settemp

Expects one input 'settemp' with a value between 200-260.
Sets the set (goal) temperature in °F Returns the set temp back or a 400 error if unsuccessful.

GET /snooze

Returns string of the current or last snooze time formatted "HH:MM" (24 hour).
e.g. 13:00 if snoozing until 1:00 PM local time.

POST /snooze

Expects one input 'snooze', a string in the format "HH:MM" (24 hour).
This enables the snooze function, the machine will sleep until the time specified.
Returns the snooze time set or 400 if passed an invalid input.

POST /resetsnooze

Disables/cancels the current snooze functionality.
Returns true always.

GET /restart

Issues a reboot command to the Raspberry Pi.

GET /healthcheck

A simple healthcheck to see if the webserver thread is repsonding.
Returns string 'OK'.

silvia-pi's People

Contributors

brycesub avatar jfbibeau 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.