{"id":3301,"date":"2018-04-23T06:00:54","date_gmt":"2018-04-23T13:00:54","guid":{"rendered":"http:\/\/192.168.3.4\/?p=3301"},"modified":"2018-04-30T04:52:25","modified_gmt":"2018-04-30T11:52:25","slug":"co-detector-hack-part-6","status":"publish","type":"post","link":"https:\/\/www.cloudacm.com\/?p=3301","title":{"rendered":"CO Detector Hack &#8211; Part 6"},"content":{"rendered":"<p>In this post I&#8217;ll be covering the theory of operation in regard to interfacing the ESP8266 with the CO Detector.<\/p>\n<p>The first item that should be covered before actually creating the code to program the ESP8266 for use in the CO Detector is to define the operation. This is a blueprint that lays out what we expect the CO Detector to do when interfaced with the ESP8266. It also helps us develop the code we&#8217;ll eventually write.<\/p>\n<p>Basically, we&#8217;re trying to duplicate the ins and outs of the CO Detector. When the test button is pressed, we expect the buzzer to alarm. If CO gas is detected, then the buzzer should alarm. There are fault and end of life alarms as well. This is the operational flow that we&#8217;ll use to integrate the ESP8266. Below is a flow chart of how the CO Detector operates.<\/p>\n<p><a href=\"http:\/\/192.168.3.4\/wp-content\/uploads\/2018\/04\/CO_Detector_FlowChart1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3302\" src=\"http:\/\/192.168.3.4\/wp-content\/uploads\/2018\/04\/CO_Detector_FlowChart1.png\" alt=\"\" width=\"413\" height=\"928\" srcset=\"https:\/\/www.cloudacm.com\/wp-content\/uploads\/2018\/04\/CO_Detector_FlowChart1.png 413w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2018\/04\/CO_Detector_FlowChart1-134x300.png 134w, https:\/\/www.cloudacm.com\/wp-content\/uploads\/2018\/04\/CO_Detector_FlowChart1-120x270.png 120w\" sizes=\"auto, (max-width: 413px) 100vw, 413px\" \/><\/a><\/p>\n<p>Now lets place the ESP8266 in the mix. It will act as a go between for the test button, buzzer, and CO Detector. We&#8217;ll replace the push button and buzzer with an API calls. There are functions we are having the ESP8266 perform that must be within it capacity to do so. Since we are using the Arduino IDE, the library for the ESP8266 will define its abilities. Lets look at each function the ESP8266 will need for our project.<\/p>\n<p>Establish connection to the wireless network<br \/>\nOperate a web front end for the operator to interface with<br \/>\nOperate the test button on the CO Detector<br \/>\nDetect the buzzer on the CO Detector<br \/>\nInitiate a URL call to IFTTT<\/p>\n<p>Next, we&#8217;ll look at the library that we&#8217;ll use for the ESP8266 and see if it is within its capacity.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this post I&#8217;ll be covering the theory of operation in regard to interfacing the ESP8266 with the CO Detector. The first item that should be covered before actually creating the code to program the ESP8266 for use in the CO Detector is to define the operation. This is a blueprint that lays out what we expect the CO Detector to do when interfaced with the ESP8266. It also helps us develop the code we&#8217;ll eventually write. Basically, we&#8217;re trying&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/www.cloudacm.com\/?p=3301\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,3],"tags":[],"class_list":["post-3301","post","type-post","status-publish","format-standard","hentry","category-arduino","category-rd"],"_links":{"self":[{"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/posts\/3301","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3301"}],"version-history":[{"count":1,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/posts\/3301\/revisions"}],"predecessor-version":[{"id":3303,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=\/wp\/v2\/posts\/3301\/revisions\/3303"}],"wp:attachment":[{"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3301"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3301"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cloudacm.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3301"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}