The quest for a Home Monitoring System : Part 2
Changes to the Home Monitoring System Architecture
Almost a year later, and a working prototype, the development of the monitoring system had reached a standstill, mostly due to the lack of time :
- On the sensor side , the Arduino + ENC28J60 + DS18B20 combo works, although it is dependent on the availability of a network cable. But the hardware is functional.
- On the server side , the development of a backend and frontend with the flexibility required (multiple sensor support, dashboard with user selected time intervals, etc) was starting to take too much time.
So I was faced with a decision regarding the server side of the system:
- Fully development of a frontend and backend , using a LAMP stack and bootstrap templates. This would take time that I simply don’t have, and the project would probably still be stalled.
- Or find a solution that would require less effort. And this was only an option when I was introduced to Elasticsearch + kibana stack.
On the hardware side, I had some ESP8622 (ESP-12) modules to try out.
Server Side changes
The server side of the Monitoring system was the one that was the most time consuming.
One of the major changes was the replacement of the LAMP stack for elasticsearch and kibana for data storage and visualization respectively. This removed the need to write a backend and a frontend from scratch. The time that would be spent on writing the back and front ends was spent on the sensor module development (both hardware and software).
Elasticsearch, according to the authors:
” Elasticsearch is an open source distributed, RESTful search and analytics engine capable of solving a growing number of use cases.”
With elasticsearch, the sensor modules sends data in json , instead of sending the data via http get to a php script with the previous Monit System architecture.
And a dashboard with visualizations of the data can be done in minutes.
Although the arduino + enc28J60 sensor module was not entirely abandoned, hardware development focus was oriented on the ESP8622 based modules.
The ESP8622 have some interesting advantages over the arduino + ENC28J60 combination :
- The ESP8622 can be sourced from around 1,7 € a piece (ESP-12) (and it replaces the arduino board and the ENC28J60 in one package)
- It can be used with the Arduino IDE , and use most of its libraries (no need to learn a new SDK and new tools).
- No additional network hardware required, since the ESP module is a wifi module first and foremost (DHCP, WPA2 supported out of the box), and thus I could place the sensor module anywhere as long as there is wifi coverage, including the exterior of the house.
- Less parts per module, since the ESP8622 has an ARM CPU besides the WiFi capabilities : besides the module itself, only the sensor, a RTC (if needed) and some passive components are needed.
However the usage of the bare modules are not as “plug and play” as with arduino boards – additional hardware and wiring required . This is not an issue since the final goal is to have a custom made PCB for the sensor module.