{"id":1967,"date":"2020-08-16T23:47:00","date_gmt":"2020-08-16T23:47:00","guid":{"rendered":"https:\/\/www.it-react.com\/?p=1967"},"modified":"2021-03-17T12:21:41","modified_gmt":"2021-03-17T12:21:41","slug":"create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2","status":"publish","type":"post","link":"https:\/\/www.it-react.com\/index.php\/2020\/08\/16\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\/","title":{"rendered":"Create a Smart Home System with a Raspberry Pi, a few sensors and Node-RED \u2013 Part 2"},"content":{"rendered":"\n<p>In the <a class=\"effect1\" href=\"https:\/\/www.it-react.com\/index.php\/2020\/06\/19\/create-a-smart-home-system-with-raspberry-pi-sensors-and-node-red-part-1\/\">first part<\/a> we learned the logic and components of the system and we configured the central component &#8211; Raspberry PI. In today&#8217;s post we&#8217;ll add some sensors and relays and we&#8217;ll integrate them with the central server via wi-fi, using the ESP8266 wireless modules. Let&#8217;s begin!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step one \u2013 Install and configure ESP8266 wireless module<\/strong><\/h3>\n\n\n\n<p>I&#8217;ve used so far in my projects two types of wireless modules and namely the ESP8266 ESP-01 and ESP8266 ESP-12. <br>To configure the first type of module, you will need a special USB adapter that is looking like the one bellow.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2020\/08\/esp8266_adapter.jpg\" alt=\"\" class=\"wp-image-1972\" width=\"267\" height=\"156\"\/><\/figure><\/div>\n\n\n\n<p>In order to set the ESP8266 ESP-01 in write mode, you have to make a strap between GPI0 and GND (check the picture bellow). Then insert the wireless module in the adapter and connect it via usb in your laptop\/desktop computer.<\/p>\n\n\n\n<div class=\"wp-block-image is-style-default\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2020\/08\/image.png\" alt=\"\" class=\"wp-image-1978\" width=\"309\" height=\"167\"\/><\/figure><\/div>\n\n\n\n<p>I&#8217;m using in my projects ESPEasy as firmware, it&#8217;s a great software with a nice interface and very easy to configure and use. You can get it from this link <a href=\"https:\/\/github.com\/letscontrolit\/ESPEasy\/releases\">https:\/\/github.com\/letscontrolit\/ESPEasy\/releases<\/a>.<br><br>After you download it, unpack it and run this executable.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"621\" height=\"180\" src=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2020\/08\/exec.jpg\" alt=\"\" class=\"wp-image-2006\" srcset=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2020\/08\/exec.jpg 621w, https:\/\/www.it-react.com\/wp-content\/uploads\/2020\/08\/exec-300x87.jpg 300w\" sizes=\"auto, (max-width: 621px) 100vw, 621px\" \/><\/figure><\/div>\n\n\n\n<p>Check your COM port of the USB and select firmware version. We&#8217;ve used in this case ESP_Easy_mega-20200812_normal_ESP8266_1M.bin.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"397\" height=\"207\" src=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2020\/08\/com_3.jpg\" alt=\"\" class=\"wp-image-2007\" srcset=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2020\/08\/com_3.jpg 397w, https:\/\/www.it-react.com\/wp-content\/uploads\/2020\/08\/com_3-300x156.jpg 300w\" sizes=\"auto, (max-width: 397px) 100vw, 397px\" \/><\/figure><\/div>\n\n\n\n<p>After you press the Flash button, a new window will open and you can see here the status of writing the firmware.<\/p>\n\n\n\n<p>Remove the ESP8266 module from the adapter once the Flash is written. Then connect the desired sensor to it and power it on.<\/p>\n\n\n\n<p>In Windows System, search for ESP_Easy_0 wi-fi network and connect to it using the defult password &#8220;configesp&#8221;. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2020\/10\/esp8266.jpg\" alt=\"\" class=\"wp-image-2074\" width=\"371\" height=\"402\" srcset=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2020\/10\/esp8266.jpg 556w, https:\/\/www.it-react.com\/wp-content\/uploads\/2020\/10\/esp8266-277x300.jpg 277w\" sizes=\"auto, (max-width: 371px) 100vw, 371px\" \/><\/figure><\/div>\n\n\n\n<p>Once the wi-fi connection is estabilished, open a browser and add the address http:\/\/192.168.4.1 to access the interface of the ESP8266. On this page, select your SSID, add the password and press connect.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-22.jpg\" alt=\"\" class=\"wp-image-2317\" width=\"382\" height=\"273\" srcset=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-22.jpg 589w, https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-22-300x215.jpg 300w\" sizes=\"auto, (max-width: 382px) 100vw, 382px\" \/><\/figure><\/div>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step two &#8211; Configure ESP_Easy with temperature sensor<\/strong><\/h2>\n\n\n\n<p>In this setup we&#8217;ll use a module ESP8266 E-01 together with a temperature sensor model DHT22. So connect them each other and then access the IP address of the ESP module via a browser to start the configuration.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-23.jpg\" alt=\"\" class=\"wp-image-2332\" width=\"249\" height=\"203\" srcset=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-23.jpg 589w, https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-23-300x244.jpg 300w\" sizes=\"auto, (max-width: 249px) 100vw, 249px\" \/><\/figure><\/div>\n\n\n\n<p>On the <strong>Main <\/strong>tab are the System Info (firmware version, uptime, IP address,etc.).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"782\" src=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-26-1024x782.jpg\" alt=\"\" class=\"wp-image-2335\" srcset=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-26-1024x782.jpg 1024w, https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-26-300x229.jpg 300w, https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-26-768x587.jpg 768w, https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-26.jpg 1144w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>On the <strong>Config <\/strong>tab you can change the Name of the ESP module, the Wifi settings and the IP settings of the ESP. In case you want to use the Deep Sleep feature, you should do it also here and configure these 2 parameters:<br>Sleep Awake Time = The time the ESP module will be alive after recovering from Deep Sleep<br>Sleep Time = The time the ESP module will sleep<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-27.jpg\" alt=\"\" class=\"wp-image-2337\" width=\"735\" height=\"1158\" srcset=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-27.jpg 555w, https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-27-190x300.jpg 190w\" sizes=\"auto, (max-width: 735px) 100vw, 735px\" \/><\/figure><\/div>\n\n\n\n<p>On the <strong>Controllers <\/strong>tab,  set OpenHAB MQTT as protocol, insert the IP address of the controller (Raspberry PI in our case) and at the end check Enabled.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"737\" height=\"899\" src=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-28.jpg\" alt=\"\" class=\"wp-image-2339\" srcset=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-28.jpg 737w, https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-28-246x300.jpg 246w\" sizes=\"auto, (max-width: 737px) 100vw, 737px\" \/><\/figure><\/div>\n\n\n\n<p>Set the Device as Environment &#8211; DHT11\/12\/22 on the <strong>Devices<\/strong> tab. Then set a name and check Enabled. For the sensor&#8217;s GPIO set GPIO-2 (D4) and DHT22 for the model. Then check Send to Controller. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"590\" src=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-32-1024x590.jpg\" alt=\"\" class=\"wp-image-2344\" srcset=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-32-1024x590.jpg 1024w, https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-32-300x173.jpg 300w, https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-32-768x443.jpg 768w, https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-32.jpg 1322w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>After pressing Submit, if everything is working fine, the values measured by the sensor can be noticed already.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"158\" src=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/grafik-1024x158.png\" alt=\"\" class=\"wp-image-2347\" srcset=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/grafik-1024x158.png 1024w, https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/grafik-300x46.png 300w, https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/grafik-768x118.png 768w, https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/grafik.png 1297w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step three &#8211; Configure ESP_Easy with Relays<\/strong><\/h2>\n\n\n\n<p>At this step we&#8217;ll configure an integrated module with ESP8266 and a relay. This is how it looks.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-33.jpg\" alt=\"\" class=\"wp-image-2362\" width=\"298\" height=\"255\" srcset=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-33.jpg 492w, https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-33-300x257.jpg 300w\" sizes=\"auto, (max-width: 298px) 100vw, 298px\" \/><\/figure><\/div>\n\n\n\n<p>Connect to the IP Addres of the ESP_Easy and on the <strong>Devices<\/strong> tab select Switch input &#8211; switch as Device, then add a name and check Enabled. For the Sensor make these settings GPIO = GPIO-2(D4), Switch Type = Switch and Switch Button Type = Normal Switch.  Then check Send to Controller and set the Values number 1 as state.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"526\" height=\"835\" src=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-34.jpg\" alt=\"\" class=\"wp-image-2367\" srcset=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-34.jpg 526w, https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-34-189x300.jpg 189w\" sizes=\"auto, (max-width: 526px) 100vw, 526px\" \/><\/figure><\/div>\n\n\n\n<p>If you don&#8217;t have an integrated module like the one above, use this wiring to connect the relay to the ESP module.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-36.jpg\" alt=\"\" class=\"wp-image-2364\" width=\"539\" height=\"274\" srcset=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-36.jpg 645w, https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-36-300x153.jpg 300w\" sizes=\"auto, (max-width: 539px) 100vw, 539px\" \/><\/figure><\/div>\n\n\n\n<p>Instead of a relay, you can connect also a LED using the same configuration. In this case here is the wiring:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-35.jpg\" alt=\"\" class=\"wp-image-2365\" width=\"516\" height=\"511\" srcset=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-35.jpg 641w, https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-35-300x297.jpg 300w, https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-35-150x150.jpg 150w\" sizes=\"auto, (max-width: 516px) 100vw, 516px\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step four &#8211; Configure ESP_Easy with a PIR Sensor<\/strong><\/h2>\n\n\n\n<p>In this step we&#8217;ll configure a module ESP8266 with a PIR(passive infrared ) sensor.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-39.jpg\" alt=\"\" class=\"wp-image-2373\" width=\"266\" height=\"234\" srcset=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-39.jpg 446w, https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-39-300x264.jpg 300w\" sizes=\"auto, (max-width: 266px) 100vw, 266px\" \/><\/figure><\/div>\n\n\n\n<p>Connect to the IP Addres of the ESP_Easy and on the <strong>Devices<\/strong> tab select Switch input &#8211; switch as Device, then add a name and check Enabled. For the sensor make these settings GPIO = GPIO-2(D4), Switch Type = Switch and Switch Button Type = Normal Switch. Then check Send to Controller and set the Values number 1 as PIR.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"543\" height=\"847\" src=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-38.jpg\" alt=\"\" class=\"wp-image-2370\" srcset=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-38.jpg 543w, https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-38-192x300.jpg 192w\" sizes=\"auto, (max-width: 543px) 100vw, 543px\" \/><\/figure><\/div>\n\n\n\n<p>Here is the wiring for this configuration:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-37.jpg\" alt=\"\" class=\"wp-image-2375\" width=\"549\" height=\"316\" srcset=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-37.jpg 795w, https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-37-300x172.jpg 300w, https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/Image-37-768x441.jpg 768w\" sizes=\"auto, (max-width: 549px) 100vw, 549px\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion <\/h2>\n\n\n\n<p>We learned in this post how to connect different types of sensors and how to configure them on ESP-Easy. In the next post we&#8217;ll see how to configure these sensors and relays in node-red. So stay around if you want to learn more.<\/p>\n\n\n\n<br><hr>\n","protected":false},"excerpt":{"rendered":"<p>In the first part we learned the logic and components of the system and we configured the central component &#8211; Raspberry PI. In today&#8217;s post we&#8217;ll add some sensors and relays and we&#8217;ll integrate them with the central server via wi-fi, using the ESP8266 wireless modules. Let&#8217;s begin! Step one \u2013 Install and configure ESP8266 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2392,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_FSMCFIC_featured_image_caption":"","_FSMCFIC_featured_image_nocaption":"","_FSMCFIC_featured_image_hide":"","footnotes":""},"categories":[16],"tags":[63,55,64,65,53,54],"class_list":["post-1967","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-iot","tag-esp8266","tag-node-red","tag-pir","tag-relays","tag-sensors","tag-smarthome"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Create a Smart Home System with a Raspberry Pi, a few sensors and Node-RED \u2013 Part 2 - IT-REACT<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.it-react.com\/index.php\/2020\/08\/16\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create a Smart Home System with a Raspberry Pi, a few sensors and Node-RED \u2013 Part 2 - IT-REACT\" \/>\n<meta property=\"og:description\" content=\"In the first part we learned the logic and components of the system and we configured the central component &#8211; Raspberry PI. In today&#8217;s post we&#8217;ll add some sensors and relays and we&#8217;ll integrate them with the central server via wi-fi, using the ESP8266 wireless modules. Let&#8217;s begin! Step one \u2013 Install and configure ESP8266 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.it-react.com\/index.php\/2020\/08\/16\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\/\" \/>\n<meta property=\"og:site_name\" content=\"IT-REACT\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-16T23:47:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-03-17T12:21:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/r-architecture-KqMaA8gDfl0-unsplash-scaled-e1615983350556.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1081\" \/>\n\t<meta property=\"og:image:height\" content=\"295\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ioan Penu\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ioan Penu\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.it-react.com\\\/index.php\\\/2020\\\/08\\\/16\\\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.it-react.com\\\/index.php\\\/2020\\\/08\\\/16\\\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\\\/\"},\"author\":{\"name\":\"Ioan Penu\",\"@id\":\"https:\\\/\\\/www.it-react.com\\\/#\\\/schema\\\/person\\\/bf08cffeb4b02ee6baff5d56ab17c8f0\"},\"headline\":\"Create a Smart Home System with a Raspberry Pi, a few sensors and Node-RED \u2013 Part 2\",\"datePublished\":\"2020-08-16T23:47:00+00:00\",\"dateModified\":\"2021-03-17T12:21:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.it-react.com\\\/index.php\\\/2020\\\/08\\\/16\\\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\\\/\"},\"wordCount\":787,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.it-react.com\\\/#\\\/schema\\\/person\\\/bf08cffeb4b02ee6baff5d56ab17c8f0\"},\"image\":{\"@id\":\"https:\\\/\\\/www.it-react.com\\\/index.php\\\/2020\\\/08\\\/16\\\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.it-react.com\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/r-architecture-KqMaA8gDfl0-unsplash-scaled-e1615983350556.jpg\",\"keywords\":[\"esp8266\",\"node-red\",\"PIR\",\"relays\",\"sensors\",\"smarthome\"],\"articleSection\":[\"IoT\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.it-react.com\\\/index.php\\\/2020\\\/08\\\/16\\\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.it-react.com\\\/index.php\\\/2020\\\/08\\\/16\\\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\\\/\",\"url\":\"https:\\\/\\\/www.it-react.com\\\/index.php\\\/2020\\\/08\\\/16\\\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\\\/\",\"name\":\"Create a Smart Home System with a Raspberry Pi, a few sensors and Node-RED \u2013 Part 2 - IT-REACT\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.it-react.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.it-react.com\\\/index.php\\\/2020\\\/08\\\/16\\\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.it-react.com\\\/index.php\\\/2020\\\/08\\\/16\\\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.it-react.com\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/r-architecture-KqMaA8gDfl0-unsplash-scaled-e1615983350556.jpg\",\"datePublished\":\"2020-08-16T23:47:00+00:00\",\"dateModified\":\"2021-03-17T12:21:41+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.it-react.com\\\/index.php\\\/2020\\\/08\\\/16\\\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.it-react.com\\\/index.php\\\/2020\\\/08\\\/16\\\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.it-react.com\\\/index.php\\\/2020\\\/08\\\/16\\\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.it-react.com\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/r-architecture-KqMaA8gDfl0-unsplash-scaled-e1615983350556.jpg\",\"contentUrl\":\"https:\\\/\\\/www.it-react.com\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/r-architecture-KqMaA8gDfl0-unsplash-scaled-e1615983350556.jpg\",\"width\":1081,\"height\":295,\"caption\":\"Photo by @rarchitecture_melbourne on Unsplash\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.it-react.com\\\/index.php\\\/2020\\\/08\\\/16\\\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.it-react.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a Smart Home System with a Raspberry Pi, a few sensors and Node-RED \u2013 Part 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.it-react.com\\\/#website\",\"url\":\"https:\\\/\\\/www.it-react.com\\\/\",\"name\":\"it-react\",\"description\":\"Ctrl\u2022Alt\u2022Automate\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.it-react.com\\\/#\\\/schema\\\/person\\\/bf08cffeb4b02ee6baff5d56ab17c8f0\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.it-react.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.it-react.com\\\/#\\\/schema\\\/person\\\/bf08cffeb4b02ee6baff5d56ab17c8f0\",\"name\":\"Ioan Penu\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2a2a1b6be0f322a113eea11669895227e284c6091424d65be6c3c706c2822975?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2a2a1b6be0f322a113eea11669895227e284c6091424d65be6c3c706c2822975?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2a2a1b6be0f322a113eea11669895227e284c6091424d65be6c3c706c2822975?s=96&d=mm&r=g\",\"caption\":\"Ioan Penu\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2a2a1b6be0f322a113eea11669895227e284c6091424d65be6c3c706c2822975?s=96&d=mm&r=g\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create a Smart Home System with a Raspberry Pi, a few sensors and Node-RED \u2013 Part 2 - IT-REACT","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.it-react.com\/index.php\/2020\/08\/16\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\/","og_locale":"en_US","og_type":"article","og_title":"Create a Smart Home System with a Raspberry Pi, a few sensors and Node-RED \u2013 Part 2 - IT-REACT","og_description":"In the first part we learned the logic and components of the system and we configured the central component &#8211; Raspberry PI. In today&#8217;s post we&#8217;ll add some sensors and relays and we&#8217;ll integrate them with the central server via wi-fi, using the ESP8266 wireless modules. Let&#8217;s begin! Step one \u2013 Install and configure ESP8266 [&hellip;]","og_url":"https:\/\/www.it-react.com\/index.php\/2020\/08\/16\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\/","og_site_name":"IT-REACT","article_published_time":"2020-08-16T23:47:00+00:00","article_modified_time":"2021-03-17T12:21:41+00:00","og_image":[{"width":1081,"height":295,"url":"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/r-architecture-KqMaA8gDfl0-unsplash-scaled-e1615983350556.jpg","type":"image\/jpeg"}],"author":"Ioan Penu","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Ioan Penu","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.it-react.com\/index.php\/2020\/08\/16\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\/#article","isPartOf":{"@id":"https:\/\/www.it-react.com\/index.php\/2020\/08\/16\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\/"},"author":{"name":"Ioan Penu","@id":"https:\/\/www.it-react.com\/#\/schema\/person\/bf08cffeb4b02ee6baff5d56ab17c8f0"},"headline":"Create a Smart Home System with a Raspberry Pi, a few sensors and Node-RED \u2013 Part 2","datePublished":"2020-08-16T23:47:00+00:00","dateModified":"2021-03-17T12:21:41+00:00","mainEntityOfPage":{"@id":"https:\/\/www.it-react.com\/index.php\/2020\/08\/16\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\/"},"wordCount":787,"commentCount":0,"publisher":{"@id":"https:\/\/www.it-react.com\/#\/schema\/person\/bf08cffeb4b02ee6baff5d56ab17c8f0"},"image":{"@id":"https:\/\/www.it-react.com\/index.php\/2020\/08\/16\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/r-architecture-KqMaA8gDfl0-unsplash-scaled-e1615983350556.jpg","keywords":["esp8266","node-red","PIR","relays","sensors","smarthome"],"articleSection":["IoT"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.it-react.com\/index.php\/2020\/08\/16\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.it-react.com\/index.php\/2020\/08\/16\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\/","url":"https:\/\/www.it-react.com\/index.php\/2020\/08\/16\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\/","name":"Create a Smart Home System with a Raspberry Pi, a few sensors and Node-RED \u2013 Part 2 - IT-REACT","isPartOf":{"@id":"https:\/\/www.it-react.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.it-react.com\/index.php\/2020\/08\/16\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\/#primaryimage"},"image":{"@id":"https:\/\/www.it-react.com\/index.php\/2020\/08\/16\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/r-architecture-KqMaA8gDfl0-unsplash-scaled-e1615983350556.jpg","datePublished":"2020-08-16T23:47:00+00:00","dateModified":"2021-03-17T12:21:41+00:00","breadcrumb":{"@id":"https:\/\/www.it-react.com\/index.php\/2020\/08\/16\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.it-react.com\/index.php\/2020\/08\/16\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.it-react.com\/index.php\/2020\/08\/16\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\/#primaryimage","url":"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/r-architecture-KqMaA8gDfl0-unsplash-scaled-e1615983350556.jpg","contentUrl":"https:\/\/www.it-react.com\/wp-content\/uploads\/2021\/03\/r-architecture-KqMaA8gDfl0-unsplash-scaled-e1615983350556.jpg","width":1081,"height":295,"caption":"Photo by @rarchitecture_melbourne on Unsplash"},{"@type":"BreadcrumbList","@id":"https:\/\/www.it-react.com\/index.php\/2020\/08\/16\/create-a-smart-home-system-with-a-raspberry-pi-a-few-sensors-and-node-red-part-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.it-react.com\/"},{"@type":"ListItem","position":2,"name":"Create a Smart Home System with a Raspberry Pi, a few sensors and Node-RED \u2013 Part 2"}]},{"@type":"WebSite","@id":"https:\/\/www.it-react.com\/#website","url":"https:\/\/www.it-react.com\/","name":"it-react","description":"Ctrl\u2022Alt\u2022Automate","publisher":{"@id":"https:\/\/www.it-react.com\/#\/schema\/person\/bf08cffeb4b02ee6baff5d56ab17c8f0"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.it-react.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.it-react.com\/#\/schema\/person\/bf08cffeb4b02ee6baff5d56ab17c8f0","name":"Ioan Penu","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/2a2a1b6be0f322a113eea11669895227e284c6091424d65be6c3c706c2822975?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/2a2a1b6be0f322a113eea11669895227e284c6091424d65be6c3c706c2822975?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2a2a1b6be0f322a113eea11669895227e284c6091424d65be6c3c706c2822975?s=96&d=mm&r=g","caption":"Ioan Penu"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/2a2a1b6be0f322a113eea11669895227e284c6091424d65be6c3c706c2822975?s=96&d=mm&r=g"}}]}},"_links":{"self":[{"href":"https:\/\/www.it-react.com\/index.php\/wp-json\/wp\/v2\/posts\/1967","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.it-react.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.it-react.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.it-react.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.it-react.com\/index.php\/wp-json\/wp\/v2\/comments?post=1967"}],"version-history":[{"count":99,"href":"https:\/\/www.it-react.com\/index.php\/wp-json\/wp\/v2\/posts\/1967\/revisions"}],"predecessor-version":[{"id":2394,"href":"https:\/\/www.it-react.com\/index.php\/wp-json\/wp\/v2\/posts\/1967\/revisions\/2394"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.it-react.com\/index.php\/wp-json\/wp\/v2\/media\/2392"}],"wp:attachment":[{"href":"https:\/\/www.it-react.com\/index.php\/wp-json\/wp\/v2\/media?parent=1967"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.it-react.com\/index.php\/wp-json\/wp\/v2\/categories?post=1967"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.it-react.com\/index.php\/wp-json\/wp\/v2\/tags?post=1967"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}