Decaf API Available for Install


For those of you that may not be following along with the KS/blog updates, I have released a new repo for the Mugsy API, now named Decaf. Decaf stands for Does Every Coffee Action, Friend. Because I’m an idiot like that…

It is only partially complete, but you can install it right now and learn the basics of how the system works. You can even start coding your own endpoints or apps to control Mugsy.

You can find it here:

I just pushed an update for the relay controller endpoint. So currently you can access/control:

  • brewSettings
  • coffeeInfo
  • barCodeScanner
  • relayController

The barcode scanner endpoint requires some additional software(logKeys) to be running in the background. The software captures the scanner output without needing to have input focus. It needs to be compiled from source so I need a little more time to add those instructions. It only listens for the barcode scanner /dev/ event address so will not listen for any other input. It was pretty annoying to get a usb based input running without providing interface focus!

Install instructions are in the

I haven’t had a chance to add the relay control formatting to the instructions so here it is:

It currently requires 5 arguments:

  • pinNumber
  • relayChannel
  • timeOn
  • repeatValue
  • connectedHardware


This turns on pin 23 which is connected to relay channel 1 for 2 seconds, it repeats 0 times and is connected to the grinder.

Im currently working on the pin info table endpoint. Once that’s done, you will be able to pull pin data by requesting the hardware type, etc and then use that data in your relayController requests. Also, the relayController class currently ignores the repeatValue but you still need it in the request. I have opened an issue for that and should have it closed in a couple of hours.

The other issue with relayController si that it doesn’t return the names of the values, only the actual values. So the response looks like:

I have also opened an issue for that.

Ok, thats it for now. Lets start yapping and hacking!


@jjok I was looking at your fork while I thought I was editing the main repos readme, please ignore that update request!


The start decaf command should actually be: sudo python3

Updated on the readme.


Updated relay control to fix repeatValue and add a repeatDelay variable:

It now requires 6 arguments:

  • pinNumber
  • relayChannel
  • timeOn
  • repeatValue
  • repeatDelay
  • connectedHardware