{"id":85,"date":"2018-02-15T21:10:45","date_gmt":"2018-02-15T21:10:45","guid":{"rendered":"http:\/\/jaerder.videmogroup.org\/blog\/?p=85"},"modified":"2018-02-15T21:10:45","modified_gmt":"2018-02-15T21:10:45","slug":"the-quest-for-a-home-monitoring-system-part-2","status":"publish","type":"post","link":"https:\/\/jaerder.videmogroup.org\/blog\/index.php\/2018\/02\/15\/the-quest-for-a-home-monitoring-system-part-2\/","title":{"rendered":"The quest for a Home Monitoring System : Part 2"},"content":{"rendered":"<h1>The quest for a Home Monitoring System : Part 2<\/h1>\n<h1>Changes to the Home Monitoring System Architecture<\/h1>\n<p>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 :<\/p>\n<ul>\n<li>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.<\/li>\n<li>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)\u00a0 was starting to take too much time.<\/li>\n<\/ul>\n<figure id=\"attachment_87\" aria-describedby=\"caption-attachment-87\" style=\"width: 654px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-87 size-large\" src=\"https:\/\/jaerder.videmogroup.org\/blog\/wp-content\/uploads\/2018\/02\/casaMonit_proto-665x1024.jpg\" alt=\"\" width=\"654\" height=\"1007\" srcset=\"https:\/\/jaerder.videmogroup.org\/blog\/wp-content\/uploads\/2018\/02\/casaMonit_proto.jpg 665w, https:\/\/jaerder.videmogroup.org\/blog\/wp-content\/uploads\/2018\/02\/casaMonit_proto-195x300.jpg 195w, https:\/\/jaerder.videmogroup.org\/blog\/wp-content\/uploads\/2018\/02\/casaMonit_proto-1x1.jpg 1w\" sizes=\"auto, (max-width: 654px) 100vw, 654px\" \/><figcaption id=\"caption-attachment-87\" class=\"wp-caption-text\">Sensor : Arduino + ENC28J60 + DS18B20, Server Side : LAMP stack, chart done with chart.js<\/figcaption><\/figure>\n<p>So I was faced with a decision regarding the server side of the system:<\/p>\n<ul>\n<li>Fully development of a frontend and backend , using a LAMP stack and bootstrap templates. This would take time that I simply don&#8217;t have, and the project would probably still be stalled.<\/li>\n<li>Or find a solution that would require less effort. And this was only an option when I was introduced to <a href=\"https:\/\/www.elastic.co\">Elasticsearch + kibana stack.<\/a><\/li>\n<\/ul>\n<p>On the hardware side, I had some ESP8622 (ESP-12) modules to try out.<\/p>\n<figure id=\"attachment_92\" aria-describedby=\"caption-attachment-92\" style=\"width: 654px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-92 size-large\" src=\"https:\/\/jaerder.videmogroup.org\/blog\/wp-content\/uploads\/2018\/02\/casaMonit_esp12_proto-1024x681.jpg\" alt=\"\" width=\"654\" height=\"435\" srcset=\"https:\/\/jaerder.videmogroup.org\/blog\/wp-content\/uploads\/2018\/02\/casaMonit_esp12_proto.jpg 1024w, https:\/\/jaerder.videmogroup.org\/blog\/wp-content\/uploads\/2018\/02\/casaMonit_esp12_proto-300x200.jpg 300w, https:\/\/jaerder.videmogroup.org\/blog\/wp-content\/uploads\/2018\/02\/casaMonit_esp12_proto-768x511.jpg 768w, https:\/\/jaerder.videmogroup.org\/blog\/wp-content\/uploads\/2018\/02\/casaMonit_esp12_proto-2x1.jpg 2w\" sizes=\"auto, (max-width: 654px) 100vw, 654px\" \/><figcaption id=\"caption-attachment-92\" class=\"wp-caption-text\">ESP8622 Sensor Module prototype with a DS18B20 temperature sensor<\/figcaption><\/figure>\n<h1>Current Status<\/h1>\n<h2>Server Side changes<\/h2>\n<p>The server side of the Monitoring system was the one that was the most time consuming.<\/p>\n<p>One of the major changes was the replacement of the LAMP stack for elasticsearch and kibana for data storage and\u00a0 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).<\/p>\n<p>Elasticsearch, according to the authors:<\/p>\n<blockquote><p>&#8221;\u00a0Elasticsearch\u00a0is an open source distributed, RESTful search and analytics engine capable of solving a growing number of use cases.&#8221;<\/p><\/blockquote>\n<p>With elasticsearch, the sensor modules sends\u00a0data in json , instead of sending the data via http get to a php script with the previous Monit System architecture.<br \/>\nAnd a dashboard with visualizations of the data can be done in minutes.<\/p>\n<figure id=\"attachment_96\" aria-describedby=\"caption-attachment-96\" style=\"width: 654px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-96\" src=\"https:\/\/jaerder.videmogroup.org\/blog\/wp-content\/uploads\/2018\/02\/kibana_dashboard-1024x576.png\" alt=\"\" width=\"654\" height=\"368\" srcset=\"https:\/\/jaerder.videmogroup.org\/blog\/wp-content\/uploads\/2018\/02\/kibana_dashboard-1024x576.png 1024w, https:\/\/jaerder.videmogroup.org\/blog\/wp-content\/uploads\/2018\/02\/kibana_dashboard-300x169.png 300w, https:\/\/jaerder.videmogroup.org\/blog\/wp-content\/uploads\/2018\/02\/kibana_dashboard-768x432.png 768w, https:\/\/jaerder.videmogroup.org\/blog\/wp-content\/uploads\/2018\/02\/kibana_dashboard-2x1.png 2w, https:\/\/jaerder.videmogroup.org\/blog\/wp-content\/uploads\/2018\/02\/kibana_dashboard.png 1920w\" sizes=\"auto, (max-width: 654px) 100vw, 654px\" \/><figcaption id=\"caption-attachment-96\" class=\"wp-caption-text\">KIbana Dashboard<\/figcaption><\/figure>\n<h2>Hardware changes<\/h2>\n<p>Although the arduino + enc28J60 sensor module was not entirely abandoned, hardware development focus was oriented on the ESP8622 based modules.<\/p>\n<p>The ESP8622 have some interesting advantages over the arduino + ENC28J60 combination :<\/p>\n<ul>\n<li>The ESP8622 can be sourced from around\u00a0 1,7 \u20ac a piece (ESP-12) (and it replaces the arduino board and the ENC28J60 in one package)<\/li>\n<li>It can be used with the <a href=\"https:\/\/github.com\/esp8266\/Arduino\">Arduino IDE<\/a>\u00a0, and use most of its libraries (no need to learn a new SDK and new tools).<\/li>\n<li>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.<\/li>\n<li>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.<\/li>\n<\/ul>\n<p>However the usage of the bare modules are not as &#8220;plug and play&#8221; as with arduino boards &#8211; 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.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/jaerder.videmogroup.org\/blog\/index.php\/2018\/02\/15\/the-quest-for-a-home-monitoring-system-part-2\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;The quest for a Home Monitoring System : Part 2&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[13,15,14],"tags":[],"class_list":["post-85","post","type-post","status-publish","format-standard","hentry","category-development","category-hardware","category-software"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/jaerder.videmogroup.org\/blog\/index.php\/wp-json\/wp\/v2\/posts\/85","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jaerder.videmogroup.org\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jaerder.videmogroup.org\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jaerder.videmogroup.org\/blog\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jaerder.videmogroup.org\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=85"}],"version-history":[{"count":18,"href":"https:\/\/jaerder.videmogroup.org\/blog\/index.php\/wp-json\/wp\/v2\/posts\/85\/revisions"}],"predecessor-version":[{"id":106,"href":"https:\/\/jaerder.videmogroup.org\/blog\/index.php\/wp-json\/wp\/v2\/posts\/85\/revisions\/106"}],"wp:attachment":[{"href":"https:\/\/jaerder.videmogroup.org\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=85"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jaerder.videmogroup.org\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=85"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jaerder.videmogroup.org\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=85"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}