An API to the Moccamaster at the Abakus office.
git clone git@github.com:webkom/coffee.git
cd coffee
pip install -r requirements/rpi.txt
Configure environment variables mentioned in coffee/config.py
.
Make sure the coffee
module is part of your PYTHONPATH
.
Run python3 -m coffee.deamon
using your favorite daemonizer.
git clone git@github.com:webkom/coffee.git
cd coffee
virtualenv venv -p python3
source venv/bin/activate
pip install -r requirements/base.txt
npm install
npm run build
python -m coffee.server
pip install tox
tox
Return data of last time coffee was turned on.
HTTP/1.1 200 OK
Content-Type: application/json
{
"coffee": {
"status": true,
"last_start": "2012-12-12 12:12",
"time_since": {
"hours": 0,
"minutes": 0
}
}
}
Return stats of usage of the coffee machine.
HTTP/1.1 200 OK
Content-Type: application/json
{
"stats": {
"2012-12-12": 3,
"2012-12-13": 1,
"2012-12-14": 7
}
}
MIT © webkom, Abakus Linjeforening