The irrigiation system is designed to work on the ESP32 (build on the DevBoard) and uses the Android framework.
This is very much a work-in-progress. The idea is to leverage MQTT to push commands to the irrigation system.
The system is designed with the command-event pattern with the three key areas:
- lib/application: The application control layer. It uses the services from the
infrastructre
andmodel
layer to control the system. - lib/infrastructure: The infastructure layer. Services provided here can but used by the
application
layer andsetup()
function of the ESP32 board. - lib/model: Pure domain logic. Classes and services are system agnostic and are designed to run anywhere. Commands come in and events come out with events being applied to change internal state.
The system workflow is described:
- Command as raw data comes in from a MQTT topic
- Data is passed into the application layer and is parsed into a command.
- The command is executed by the IrrigationSystem (model layer).
- On
loop()
the application layer requests for the model to monitor its internal state. Possibly returning events. - Events returned are applied to the model and passed onto the infrastructure layer to be processed.
- The infrastrcture layer updates the board pins.