In this project, the client needed a way to control the state (on/off) of some devices and get measurements and notifications from sensors when the indications were in unwanted values.
For our task we are using the module ESP8266. Out of the 17 GPIO pins we are using 9 of them (3 as outputs and 6 as inputs) due to some booting limitations, but they are still enough for our purpose. We wanted to limit the use of the ESP as much as possible so that the server or the Android app is doing all the work since they are much faster and reliable at processing information.
We use Firebase as our “live” database and notification manager and an AWS server for running some scripts that handle the calendar and timers of the app.
The user is able to control the state of devices or machinery (with the use of relays) and get notified when the inputs get in undesirable states. In the input we can have temperature or humidity information, through external sensors or custom sensors from the analog or digital inputs.
The user is also able to set a calendar or timer on each output so that he can control when his devices are enabled/disabled without the need of manually switching them. From the settings he can control the desired input values so that when they exceed that, he/she gets notified about it and then he can act accordingly.
Below you can see a simple diagram of the project.