{"id":260,"date":"2017-03-07T02:21:18","date_gmt":"2017-03-07T02:21:18","guid":{"rendered":"http:\/\/bryceautomation.com\/?p=260"},"modified":"2017-05-17T14:52:44","modified_gmt":"2017-05-17T14:52:44","slug":"esp8266-12-relay","status":"publish","type":"post","link":"https:\/\/bryceautomation.com\/index.php\/2017\/03\/07\/esp8266-12-relay\/","title":{"rendered":"Controlling a relay from your web browser &#8212; ESP8266-12"},"content":{"rendered":"<h2>E<img decoding=\"async\" class=\"alignright size-medium wp-image-261 lazyload\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/03\/ESPThermostat2-300x123.jpg\" alt=\"ESP8266-12F\" width=\"300\" height=\"123\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/03\/ESPThermostat2-300x123.jpg 300w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/03\/ESPThermostat2-768x316.jpg 768w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/03\/ESPThermostat2-1024x421.jpg 1024w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/03\/ESPThermostat2.jpg 1000w\" data-sizes=\"(max-width: 300px) 100vw, 300px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 300px; --smush-placeholder-aspect-ratio: 300\/123;\" \/>SP8266-12 &#8212; Controlling a relay<\/h2>\n<p>In this post, we will set up an ESP8266-12 to control a relay, which will control the fan on a thermostat. \u00a0Please do not attempt this unless you are familiar with all safety issues. \u00a0Use this document at your own risk!<\/p><div id=\"bryce-1284405794\" class=\"bryce-afterfirst bryce-entity-placement\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-8316758073402323\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:block;\" data-ad-client=\"ca-pub-8316758073402323\" \ndata-ad-slot=\"7728240895\" \ndata-ad-format=\"auto\"><\/ins>\n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div>\n<p>First , we will set up the ESP8266-12F on a breadboard to flash the firmware to the latest version of ESPeasy. \u00a0 ESPEasy. \u00a0 We will use the Arduino IDE to upload a project to the module. \u00a0This project will only require a few small changes before we upload. \u00a0 \u00a0We will then use Domoticz server to control an output. \u00a0This output will turn on a transistor powered relay. \u00a0The relay will then connect power coming into your thermostat to the fan control of your furnace, however, this setup has limitless other applications, including an input to a ControlLogix system (or other PLC) for non-critical industrial applications.<\/p>\n<h2>Breadboard Setup<\/h2>\n<p>First, let&#8217;s make some connections. \u00a0 I&#8217;m using the ESP8266-12F, which is soldered to a supernode board. \u00a0Your pinout may be slightly different if you have a different setup. \u00a0 Just make the appropriate modifications for the hardware that you are using.<\/p>\n<p>On the breadboard, your connections are very critical. \u00a0 In my experience, the most common problem preventing normal operation is bad connections on the breadboard, or a power supply that is under rated.<\/p>\n<p>I&#8217;m actually using a 5v, 2A power supply that is going through an LM1117 regulator. \u00a0 (shown by 78xx in the Fritzing image) \u00a0The regulated voltage of 3.3v will be applied to the power rails.<\/p>\n<p>On the ESP8266-12, connect GPIO 0 and GPIO 15 to GND, and GPIO 2 to 3.3v. \u00a0 These connections will set the boot mode to accept a flash.<\/p>\n<p>Also connect RESET,\u00a0CH_PD (enable), and vcc to 3.3v, then be sure to connect the GND of the ESP8266 to GND on the power rail.<\/p>\n<p>From GPIO 13, I connected a 780 ohm resistor to the base of a 2n222 NPN transistor. \u00a0 The collector of the transistor will be connected to one side of the relay coil, and the emitter will be connected to GND. \u00a0 To get a higher voltage to the relay coil, I connected the other side of the coil to the unregulated 5v coming into the breadboard.<\/p>\n<p>On your FTDI Programmer, connect GND to the GND rail, TX to RX on the ESP8266, and RX to TX.<\/p>\n<p><img decoding=\"async\" class=\"size-medium wp-image-263 alignleft lazyload\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/03\/ESP8266-12_bb-300x116.jpg\" alt=\"ESP8266-bb\" width=\"300\" height=\"116\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/03\/ESP8266-12_bb-300x116.jpg 300w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/03\/ESP8266-12_bb-768x296.jpg 768w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/03\/ESP8266-12_bb-1024x394.jpg 1024w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/03\/ESP8266-12_bb.jpg 1000w\" data-sizes=\"(max-width: 300px) 100vw, 300px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 300px; --smush-placeholder-aspect-ratio: 300\/116;\" \/><\/p>\n<p>As I stated earlier&#8230; \u00a0Most of the problems I&#8217;ve had with flash failures and reboot issues have originated from a bad connection on the breadboard, or an improper power supply. \u00a0 This has been a battle for me on almost every breadboard setup with the ESP8266 modules, \u00a0 Another issue I had is that when the ESP8266-12 is plugged into the breadboard, there might not be room for your jumper wires. \u00a0 \u00a0You can overcome this issue by attaching male to female jumpers on the pins of your ESP board, or in my case, I had mini 400pt breadboards&#8230; \u00a0 I just removed a power rail on one of them, and connected two of them together, so the ESP8266 would span across two of the breadboards.<\/p>\n<h2>Flash your module<\/h2>\n<p>At the time of this writing, ESPEasy can be downloaded here, but if the link has moved, ask Google to find it for you!<\/p>\n<p><a href=\"https:\/\/sourceforge.net\/projects\/espeasy\/\">https:\/\/sourceforge.net\/projects\/espeasy\/<\/a><\/p>\n<p>This package comes with a flash utility, so you can power up your ESP8266\u00a0and flash your module.<\/p>\n<p>Next, open the .ino file in the arduino IDE. \u00a0 You will need to change the device name, SSID, and Password. \u00a0 \u00a0Verify your project, and you will find the errors in the results window due to missing libraries. \u00a0 \u00a0Click Sketch | Include Libraries | Manage libraries, and install the missing library. \u00a0Repeat this process until you have no errors, then upload the project to the ESP8266.<\/p>\n<h2>Energize the Relay<\/h2>\n<p>Once your upload is complete, you should be able to power down your ESP, and move GPIO 0 to 3.3v, and power back up watching the serial monitor. \u00a0 You should see that it has connected to your network.<\/p>\n<p>In my case, I used a dynamic address and had to run a network scanner such as angry ip scanner to find the IP Address of your ESP8266. \u00a0You can also find this on the admin page of your router.<\/p>\n<p>Now, we can issue the command from any web browser to energize the relay:<\/p>\n<p>http:\/\/192.168.1.118\/control?cmd=GPIO,13,1 \u00a0 (substitute your ESP&#8217;s IP address)<\/p>\n<p>To de-energize the relay:<\/p>\n<p>http:\/\/192.168.1.118\/control?cmd=GPIO,13,0<\/p>\n<p><em>(If you just enter the IP address into your web browser, you will see the status and configuration screen for the ESP module)<\/em><\/p>\n<h2>Domoticz<\/h2>\n<p>If you wish to have all of your devices in one place, you can install the Domoticz server:<\/p>\n<p><a href=\"https:\/\/domoticz.com\/downloads\/\">https:\/\/domoticz.com\/downloads\/<\/a><\/p>\n<p><img decoding=\"async\" class=\"alignright size-medium wp-image-265 lazyload\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/03\/dummyswitch-278x300.png\" alt=\"dummy switch\" width=\"278\" height=\"300\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/03\/dummyswitch-278x300.png 278w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/03\/dummyswitch.png 436w\" data-sizes=\"(max-width: 278px) 100vw, 278px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 278px; --smush-placeholder-aspect-ratio: 278\/300;\" \/><\/p>\n<p>Once the server is up and running, you can create a dummy hardware device, then add your switch as shown&#8230; \u00a0 The ID doesn&#8217;t matter so much in this case as long as all of your devices have a different ID.<\/p>\n<p>We selected ON\/OFF as the Switch type, and LightwaveRF as our device type (just to make the server happy) \u00a0We won&#8217;t test this just yet because we will need to enter our on and off commands in the next step.<\/p>\n<p>Click &#8220;Add Device&#8221; for now.<\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" class=\"size-medium wp-image-266 alignleft lazyload\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/03\/switchconfiguration-300x173.png\" alt=\"Switch Configuration\" width=\"300\" height=\"173\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/03\/switchconfiguration-300x173.png 300w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/03\/switchconfiguration.png 754w\" data-sizes=\"(max-width: 300px) 100vw, 300px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 300px; --smush-placeholder-aspect-ratio: 300\/173;\" \/>Next, we will edit the switch, and enter our commands as shown:<\/p>\n<p>Be sure to use your own IP address, then press the &#8220;SAVE&#8221; button.<\/p>\n<p>Now you can click the icon you chose, and your relay should energize. \u00a0 \u00a0Click the icon again, and your relay will shut off.<\/p>\n<p>&nbsp;<\/p>\n<h2>Troubleshooting<\/h2>\n<p>Things almost never go as planned the first time. \u00a0If this happens, just relax, get a cold glass of water, and we&#8217;ll have to figure out what went wrong.<\/p>\n<p>If the flash failed, check the power coming in to the ESP8266. \u00a0We should have 3.3v. \u00a0Also verify that you have a good connection on GPIO pins 0, 2, and 15 (and enable). \u00a0You might reseat them, or move them to another hole\u00a0on the power rails.<\/p>\n<p>If the flash was sucessful, but not responding on your network, check the serial monitor when the module boots to make sure the module booted properly. \u00a0 it&#8217;s possible that the flash could be corrupted, and you might need to flash again, but most likely if the flash was successful, you probably have a bad connection on one of your breadboard jumpers.<\/p>\n<p>If you sucessfully sent the command to the ESP, but the relay does not energize, be sure 3.3v is coming from GPIO pin 13 after you issued the &#8220;energize&#8221; command. \u00a0 Also check your voltage across the relay coil. \u00a0If there is not enough voltage, the relay might not pull in. \u00a0 You may have to adjust the value of the resistor to the base of your transistor, but be careful not to cause too much current flow.<\/p>\n<p>If you have any questions or corrections to this document, please feel free to comment!<\/p>\n<p>&nbsp;<\/p>\n<p>&#8212; Ricky Bryce<\/p>\n<div id=\"bryce-2463078459\" class=\"bryce-after-content bryce-entity-placement\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-8316758073402323\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:block;\" data-ad-client=\"ca-pub-8316758073402323\" \ndata-ad-slot=\"4667596182\" \ndata-ad-format=\"auto\"><\/ins>\n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>ESP8266-12 &#8212; Controlling a relay In this post, we will set up an ESP8266-12 to control a relay, which will control the fan on a thermostat. \u00a0Please do not attempt this unless you are familiar with all safety issues. \u00a0Use this document at your own risk! First , we will set up the ESP8266-12F on <a class=\"moretag btn btn-primary\" href=\"https:\/\/bryceautomation.com\/index.php\/2017\/03\/07\/esp8266-12-relay\/\">Read More \u00bb<\/a><\/p>\n","protected":false},"author":1,"featured_media":263,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,9],"tags":[],"class_list":{"0":"post-260","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-arduino-other-microprocessors","8":"category-intermediate","9":"czr-hentry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Controlling a relay with a web browser from an ESP8266-12<\/title>\n<meta name=\"description\" content=\"We will set up the breadboard, configure, and flash the ESP8266-12F. We will issue commands from a web browser to energize a transistor controlled relay.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/bryceautomation.com\/index.php\/2017\/03\/07\/esp8266-12-relay\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Controlling a relay with a web browser from an ESP8266-12\" \/>\n<meta property=\"og:description\" content=\"We will set up the breadboard, configure, and flash the ESP8266-12F. We will issue commands from a web browser to energize a transistor controlled relay.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/bryceautomation.com\/index.php\/2017\/03\/07\/esp8266-12-relay\/\" \/>\n<meta property=\"og:site_name\" content=\"Bryce Automation\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/ricky.bryce.7\" \/>\n<meta property=\"article:published_time\" content=\"2017-03-07T02:21:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-05-17T14:52:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/03\/ESP8266-12_bb.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"385\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ricky\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2017\\\/03\\\/07\\\/esp8266-12-relay\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2017\\\/03\\\/07\\\/esp8266-12-relay\\\/\"},\"author\":{\"name\":\"Ricky\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#\\\/schema\\\/person\\\/5d5b0f6f6ad768f1ee52968338e63af7\"},\"headline\":\"Controlling a relay from your web browser &#8212; ESP8266-12\",\"datePublished\":\"2017-03-07T02:21:18+00:00\",\"dateModified\":\"2017-05-17T14:52:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2017\\\/03\\\/07\\\/esp8266-12-relay\\\/\"},\"wordCount\":1174,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2017\\\/03\\\/07\\\/esp8266-12-relay\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2017\\\/03\\\/ESP8266-12_bb.jpg\",\"articleSection\":[\"Arduino and other microprocessors\",\"Intermediate\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2017\\\/03\\\/07\\\/esp8266-12-relay\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2017\\\/03\\\/07\\\/esp8266-12-relay\\\/\",\"url\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2017\\\/03\\\/07\\\/esp8266-12-relay\\\/\",\"name\":\"Controlling a relay with a web browser from an ESP8266-12\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2017\\\/03\\\/07\\\/esp8266-12-relay\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2017\\\/03\\\/07\\\/esp8266-12-relay\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2017\\\/03\\\/ESP8266-12_bb.jpg\",\"datePublished\":\"2017-03-07T02:21:18+00:00\",\"dateModified\":\"2017-05-17T14:52:44+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#\\\/schema\\\/person\\\/5d5b0f6f6ad768f1ee52968338e63af7\"},\"description\":\"We will set up the breadboard, configure, and flash the ESP8266-12F. We will issue commands from a web browser to energize a transistor controlled relay.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2017\\\/03\\\/07\\\/esp8266-12-relay\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2017\\\/03\\\/07\\\/esp8266-12-relay\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2017\\\/03\\\/07\\\/esp8266-12-relay\\\/#primaryimage\",\"url\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2017\\\/03\\\/ESP8266-12_bb.jpg\",\"contentUrl\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2017\\\/03\\\/ESP8266-12_bb.jpg\",\"width\":1000,\"height\":385,\"caption\":\"ESP8266-bb\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2017\\\/03\\\/07\\\/esp8266-12-relay\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/bryceautomation.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Controlling a relay from your web browser &#8212; ESP8266-12\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#website\",\"url\":\"https:\\\/\\\/bryceautomation.com\\\/\",\"name\":\"Bryce Automation\",\"description\":\"Automating Home and Industry...\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/bryceautomation.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#\\\/schema\\\/person\\\/5d5b0f6f6ad768f1ee52968338e63af7\",\"name\":\"Ricky\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/wphb-cache\\\/gravatar\\\/a8f\\\/a8fe6bf79d292b388ffee281ccb12488x96.jpg\",\"url\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/wphb-cache\\\/gravatar\\\/a8f\\\/a8fe6bf79d292b388ffee281ccb12488x96.jpg\",\"contentUrl\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/wphb-cache\\\/gravatar\\\/a8f\\\/a8fe6bf79d292b388ffee281ccb12488x96.jpg\",\"caption\":\"Ricky\"},\"sameAs\":[\"http:\\\/\\\/bryceautomation.com\",\"https:\\\/\\\/www.facebook.com\\\/ricky.bryce.7\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/ricky-bryce-4367a416\\\/\"],\"url\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/author\\\/ricky\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Controlling a relay with a web browser from an ESP8266-12","description":"We will set up the breadboard, configure, and flash the ESP8266-12F. We will issue commands from a web browser to energize a transistor controlled relay.","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:\/\/bryceautomation.com\/index.php\/2017\/03\/07\/esp8266-12-relay\/","og_locale":"en_US","og_type":"article","og_title":"Controlling a relay with a web browser from an ESP8266-12","og_description":"We will set up the breadboard, configure, and flash the ESP8266-12F. We will issue commands from a web browser to energize a transistor controlled relay.","og_url":"https:\/\/bryceautomation.com\/index.php\/2017\/03\/07\/esp8266-12-relay\/","og_site_name":"Bryce Automation","article_author":"https:\/\/www.facebook.com\/ricky.bryce.7","article_published_time":"2017-03-07T02:21:18+00:00","article_modified_time":"2017-05-17T14:52:44+00:00","og_image":[{"width":1000,"height":385,"url":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/03\/ESP8266-12_bb.jpg","type":"image\/jpeg"}],"author":"Ricky","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/bryceautomation.com\/index.php\/2017\/03\/07\/esp8266-12-relay\/#article","isPartOf":{"@id":"https:\/\/bryceautomation.com\/index.php\/2017\/03\/07\/esp8266-12-relay\/"},"author":{"name":"Ricky","@id":"https:\/\/bryceautomation.com\/#\/schema\/person\/5d5b0f6f6ad768f1ee52968338e63af7"},"headline":"Controlling a relay from your web browser &#8212; ESP8266-12","datePublished":"2017-03-07T02:21:18+00:00","dateModified":"2017-05-17T14:52:44+00:00","mainEntityOfPage":{"@id":"https:\/\/bryceautomation.com\/index.php\/2017\/03\/07\/esp8266-12-relay\/"},"wordCount":1174,"commentCount":0,"image":{"@id":"https:\/\/bryceautomation.com\/index.php\/2017\/03\/07\/esp8266-12-relay\/#primaryimage"},"thumbnailUrl":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/03\/ESP8266-12_bb.jpg","articleSection":["Arduino and other microprocessors","Intermediate"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/bryceautomation.com\/index.php\/2017\/03\/07\/esp8266-12-relay\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/bryceautomation.com\/index.php\/2017\/03\/07\/esp8266-12-relay\/","url":"https:\/\/bryceautomation.com\/index.php\/2017\/03\/07\/esp8266-12-relay\/","name":"Controlling a relay with a web browser from an ESP8266-12","isPartOf":{"@id":"https:\/\/bryceautomation.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/bryceautomation.com\/index.php\/2017\/03\/07\/esp8266-12-relay\/#primaryimage"},"image":{"@id":"https:\/\/bryceautomation.com\/index.php\/2017\/03\/07\/esp8266-12-relay\/#primaryimage"},"thumbnailUrl":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/03\/ESP8266-12_bb.jpg","datePublished":"2017-03-07T02:21:18+00:00","dateModified":"2017-05-17T14:52:44+00:00","author":{"@id":"https:\/\/bryceautomation.com\/#\/schema\/person\/5d5b0f6f6ad768f1ee52968338e63af7"},"description":"We will set up the breadboard, configure, and flash the ESP8266-12F. We will issue commands from a web browser to energize a transistor controlled relay.","breadcrumb":{"@id":"https:\/\/bryceautomation.com\/index.php\/2017\/03\/07\/esp8266-12-relay\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/bryceautomation.com\/index.php\/2017\/03\/07\/esp8266-12-relay\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bryceautomation.com\/index.php\/2017\/03\/07\/esp8266-12-relay\/#primaryimage","url":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/03\/ESP8266-12_bb.jpg","contentUrl":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/03\/ESP8266-12_bb.jpg","width":1000,"height":385,"caption":"ESP8266-bb"},{"@type":"BreadcrumbList","@id":"https:\/\/bryceautomation.com\/index.php\/2017\/03\/07\/esp8266-12-relay\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/bryceautomation.com\/"},{"@type":"ListItem","position":2,"name":"Controlling a relay from your web browser &#8212; ESP8266-12"}]},{"@type":"WebSite","@id":"https:\/\/bryceautomation.com\/#website","url":"https:\/\/bryceautomation.com\/","name":"Bryce Automation","description":"Automating Home and Industry...","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/bryceautomation.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/bryceautomation.com\/#\/schema\/person\/5d5b0f6f6ad768f1ee52968338e63af7","name":"Ricky","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bryceautomation.com\/wp-content\/wphb-cache\/gravatar\/a8f\/a8fe6bf79d292b388ffee281ccb12488x96.jpg","url":"https:\/\/bryceautomation.com\/wp-content\/wphb-cache\/gravatar\/a8f\/a8fe6bf79d292b388ffee281ccb12488x96.jpg","contentUrl":"https:\/\/bryceautomation.com\/wp-content\/wphb-cache\/gravatar\/a8f\/a8fe6bf79d292b388ffee281ccb12488x96.jpg","caption":"Ricky"},"sameAs":["http:\/\/bryceautomation.com","https:\/\/www.facebook.com\/ricky.bryce.7","https:\/\/www.linkedin.com\/in\/ricky-bryce-4367a416\/"],"url":"https:\/\/bryceautomation.com\/index.php\/author\/ricky\/"}]}},"_links":{"self":[{"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/posts\/260","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/comments?post=260"}],"version-history":[{"count":0,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/posts\/260\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/media\/263"}],"wp:attachment":[{"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/media?parent=260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/categories?post=260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/tags?post=260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}