Improving the prototype
During this chapter we've made different design decisions making the chronotherm easier to implement. While this application is good proof of concept for home automation, we have to bear in mind that many things should be done to improve the quality and reliability of the prototype. This application is a classical scenario with a Human-Machine Interface (HMI) and a Control System implemented respectively, with an Android application and an Arduino microcontroller. In such scenarios, a driving principle of automation design is that the control unit should be capable of making reasonable and safe decisions even in the absence of the HMI part.
In our case, we've decoupled responsibilities delegating the decision to turn the boiler on or off to the Android application. While this isn't a mission-critical system, with this design, we may risk that if the Android application crashes, the boiler remains turned on forever. A better decoupling would be using the HMI only for...