This enables very specific control of the boiler, grinder, and mechanical pour-over dispenser, but is too much control for most use cases in a public API. To improve this, the functions of Mugsy should be reified as various REST endpoints that provide clear abstractions for developers to use in their applications. For example:
GET /services/boiler -> Get status of the boiler
POST /services/boiler -> Control function of boiler with POST body providing parameters
GET /services/grinder -> Get status of the grinder
POST /services/grinder -> Control function of grinder with POST body providing parameters
GET /services/pour_over -> Get status of pour over
POST /services/pour_over -> Control pour over with POST body providing parameters
You could even introduce an MQTT layer on top of the core models package, providing realtime IoT communication to Mugsy.
The relay control REST API provides raw access to the underlying GPIO functions of Mugsy:
This enables very specific control of the boiler, grinder, and mechanical pour-over dispenser, but is too much control for most use cases in a public API. To improve this, the functions of Mugsy should be reified as various REST endpoints that provide clear abstractions for developers to use in their applications. For example:
GET /services/boiler
-> Get status of the boilerPOST /services/boiler
-> Control function of boiler with POST body providing parametersGET /services/grinder
-> Get status of the grinderPOST /services/grinder
-> Control function of grinder with POST body providing parametersGET /services/pour_over
-> Get status of pour overPOST /services/pour_over
-> Control pour over with POST body providing parametersYou could even introduce an MQTT layer on top of the core
models
package, providing realtime IoT communication to Mugsy.