Meet Decaf

Hey folks, tonight I have opened up a new GitHub repo so those of you with your own Raspberry Pi's can start playing around with Mugsy's API.

Does Every Coffee Action, Friend

I always wanted to make an API with a stupid name, so here we are. Decaf stands for Does Every Coffee Action, Friend. 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.

 Babies first selfie.

Babies first selfie.

The currently available endpoints are:

  • brewInfo 

  • coffeeInfo

  • barcodeScanner

The barcode scanner endpoint requires some additional software 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. 

The Decaf install instructions are fairly basic and it should take just a few minutes to get up and running. 

Current requirements are:

  • Python 3

  • MySQL

  • Pip

I'll be adding the hardware control endpoints tomorrow. I have been primarily focusing on data retrieval endpoints, so data submission endpoints are a good place to start if you want to get hacking right away.

Two other things to note:

  • This configuration of Decaf runs on the Flask Development server so it should not be used for production systems at all. For production you should be running Decaf on a more robust server like Apache, Nginx,etc. I will start adding those configs to the github after I finish the hardware control endpoints. The dev server has a lot of great debugging features though, so it's a blast to use while coding.

  • This is my first application using Flask so if you see some mistakes, let me know or make a fix and submit a pull request! I decided to go with Flask as it standardized functionality while allowing for a very simple conversion process from Mugsy's one off python scripts to a single and robust runtime.

You can find the code and install instructions here: https://github.com/margyle/decaf

I'll be keeping an eye on the community forum so jump on there if you want to start discussing the code!

Ok, thats it for now. I have been splitting time between the API and Mugsy assembly and things are moving along nicely. We are on track to ship first units on the 12th as discussed in update #106. The next update will be going out on Friday or Saturday and will be focused on assembly with some juicy info and a couple of pics that are sure to be real crowd pleasers. 

Thanks and have a great night!

Cheers,

-m

MComment