Coffeefy let you control a coffee maker via the Internet using a RESTful API provided by an express.js-server. However, this system isn't reliable yet and should run under supervision.
- Raspberry Pi 3
- Senseo 7810 Coffee Machine
- HC-SR04 Ultrasonic Sensor
- 3 Relays
- 2 Resistors(680Ohm/1kOhm)
- minor small parts (optional breadboard, wires etc.)
- clone repository
- navigate to ./node
- run
npm install
to install the dependencies - To start the webserver, run:
nodemon app
ornode ./bin/www
- open
http://localhost:3000
in your browser
You can run Coffeefy as a daemon service using "forever". (see below)
After Installation you can start the node.js server by running forever start ./bin/www
.
To see what's going on, determine the logfile path by running forever list
and run
tail -f <logfilepath>
(Instructions for running ultrasonic.py
in background)
- RPi.GPIO via
sudo apt-get install rpi.gpio
- paho-mqtt via
pip install paho-mqtt
- mqtt.js
- python-shell
- Correct usage of GPIO.cleanup()
- Running a node js server.. forever(Github-Repo)
- nodemon monitors for any changes in source, restarts the server automatically if necessary.
- Installing paho-mqtt causes an error. Missing "Python.h"? → Install the python developer package via
apt-get install python2.7-dev
. node app.js
results in a crash. →I dunno Y, just install→nodemon
via npm.node ./bin/www
Vanakh Chea, Alexander Thürling, René Honnen, Christian Krenn