{"id":114,"date":"2017-05-03T22:23:56","date_gmt":"2017-05-03T22:23:56","guid":{"rendered":"http:\/\/www.cribbstechnologies.com\/?page_id=114"},"modified":"2017-05-31T04:24:59","modified_gmt":"2017-05-31T04:24:59","slug":"sonoff-with-alternate-firmware","status":"publish","type":"page","link":"https:\/\/www.cribbstechnologies.com\/index.php\/home-automation\/sonoff-with-alternate-firmware\/","title":{"rendered":"Sonoff With Alternate Firmware"},"content":{"rendered":"<p>[et_pb_section bb_built=&#8221;1&#8243; admin_label=&#8221;Section&#8221; fullwidth=&#8221;on&#8221; specialty=&#8221;off&#8221;][et_pb_fullwidth_image admin_label=&#8221;Fullwidth Image&#8221; src=&#8221;http:\/\/www.cribbstechnologies.com\/wp-content\/uploads\/2017\/05\/IMG_20170503_182647.jpg&#8221; show_in_lightbox=&#8221;off&#8221; url_new_window=&#8221;off&#8221; use_overlay=&#8221;off&#8221; animation=&#8221;off&#8221; use_border_color=&#8221;off&#8221; border_color=&#8221;#ffffff&#8221; border_style=&#8221;solid&#8221; \/][\/et_pb_section][et_pb_section bb_built=&#8221;1&#8243; admin_label=&#8221;section&#8221;][et_pb_row admin_label=&#8221;row&#8221;][et_pb_column type=&#8221;4_4&#8243;][et_pb_text admin_label=&#8221;Text&#8221; background_layout=&#8221;light&#8221; text_orientation=&#8221;left&#8221; use_border_color=&#8221;off&#8221; border_color=&#8221;#ffffff&#8221; border_style=&#8221;solid&#8221;]<\/p>\n<h1>Sonoff Modification<\/h1>\n<p>There&#8217;s a company called ITEAD that manufactures a few devices in a line they call Sonoff. There&#8217;s a <a href=\"https:\/\/www.itead.cc\/sonoff-wifi-wireless-switch.html\">really inexpensive switch<\/a> that&#8217;s ready to be modified to do whatever you want it to. It&#8217;s powered by an ESP8266 so it&#8217;s got WIFI and some left-over GPIO and thanks to a heavy duty relay it can switch mains power as well.<\/p>\n<p>An awesome person on the internet developed some <a href=\"https:\/\/community.home-assistant.io\/t\/sonoff-homeassistant-alternative-firmware-for-sonoff-switches-for-use-with-mqtt-ha\/2332\">alternate firmware<\/a>\u00a0that can be flashed using the Arduino IDE and a FTDI adapter. The catch? You have to open up the device and do some light soldering.<\/p>\n<p>Before doing anything if the Sonoff is connected to mains power, disconnect it. Then open up the Sonoff. It will look similar to this minus the 4-pin header.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-200 \" src=\"http:\/\/www.cribbstechnologies.com\/wp-content\/uploads\/2017\/05\/IMG_20170503_181234-1024x768.jpg\" alt=\"\" width=\"667\" height=\"500\" srcset=\"https:\/\/www.cribbstechnologies.com\/wp-content\/uploads\/2017\/05\/IMG_20170503_181234-1024x768.jpg 1024w, https:\/\/www.cribbstechnologies.com\/wp-content\/uploads\/2017\/05\/IMG_20170503_181234-300x225.jpg 300w, https:\/\/www.cribbstechnologies.com\/wp-content\/uploads\/2017\/05\/IMG_20170503_181234-768x576.jpg 768w, https:\/\/www.cribbstechnologies.com\/wp-content\/uploads\/2017\/05\/IMG_20170503_181234-510x382.jpg 510w, https:\/\/www.cribbstechnologies.com\/wp-content\/uploads\/2017\/05\/IMG_20170503_181234-1080x810.jpg 1080w\" sizes=\"auto, (max-width: 667px) 100vw, 667px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-204\" src=\"http:\/\/www.cribbstechnologies.com\/wp-content\/uploads\/2017\/05\/IMG_20170503_181306-3-1024x768.jpg\" alt=\"\" width=\"667\" height=\"500\" srcset=\"https:\/\/www.cribbstechnologies.com\/wp-content\/uploads\/2017\/05\/IMG_20170503_181306-3-1024x768.jpg 1024w, https:\/\/www.cribbstechnologies.com\/wp-content\/uploads\/2017\/05\/IMG_20170503_181306-3-300x225.jpg 300w, https:\/\/www.cribbstechnologies.com\/wp-content\/uploads\/2017\/05\/IMG_20170503_181306-3-768x576.jpg 768w, https:\/\/www.cribbstechnologies.com\/wp-content\/uploads\/2017\/05\/IMG_20170503_181306-3-510x382.jpg 510w, https:\/\/www.cribbstechnologies.com\/wp-content\/uploads\/2017\/05\/IMG_20170503_181306-3-1080x810.jpg 1080w\" sizes=\"auto, (max-width: 667px) 100vw, 667px\" \/><\/p>\n<p>There are 5 pins available on a break-out header but there&#8217;s nothing attached to them. In order from closest to the pushbutton to furthest you have<\/p>\n<ol>\n<li>3.3V<\/li>\n<li>RX &#8211; Recieve<\/li>\n<li>TX &#8211; Transmit<\/li>\n<li>Ground<\/li>\n<li>GPIO14 &#8211; I don&#8217;t use this pin to do anything currently but may at some point in the future<\/li>\n<\/ol>\n<p>Connect these pins to your FTDI adapter and make sure it&#8217;s configured to send 3.3V if it&#8217;s switchable. You&#8217;re ready to flash new firmware! Hold the button down on the Sonoff while plugging in your FTDI adapter.<\/p>\n<p>You&#8217;ll need to <a href=\"http:\/\/randomnerdtutorials.com\/how-to-install-esp8266-board-arduino-ide\/\">configure Arduino IDE<\/a>\u00a0to allow flashing firmware to the ESP8266. All you&#8217;ll need to do download\u00a0<a href=\"https:\/\/community.home-assistant.io\/t\/sonoff-homeassistant-alternative-firmware-for-sonoff-switches-for-use-with-mqtt-ha\/2332\">the firmware<\/a>, update the sketch so that the device knows about your MQTT server and your Wi-Fi network, and flash it to the device.<\/p>\n<p>[\/et_pb_text][et_pb_video admin_label=&#8221;Video&#8221; src=&#8221;https:\/\/www.youtube.com\/watch?v=6qF6Z8qwf3k&#8221; \/][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[et_pb_section bb_built=&#8221;1&#8243; admin_label=&#8221;Section&#8221; fullwidth=&#8221;on&#8221; specialty=&#8221;off&#8221;][et_pb_fullwidth_image admin_label=&#8221;Fullwidth Image&#8221; src=&#8221;http:\/\/www.cribbstechnologies.com\/wp-content\/uploads\/2017\/05\/IMG_20170503_182647.jpg&#8221; show_in_lightbox=&#8221;off&#8221; url_new_window=&#8221;off&#8221; use_overlay=&#8221;off&#8221; animation=&#8221;off&#8221; use_border_color=&#8221;off&#8221; border_color=&#8221;#ffffff&#8221; border_style=&#8221;solid&#8221; \/][\/et_pb_section][et_pb_section bb_built=&#8221;1&#8243; admin_label=&#8221;section&#8221;][et_pb_row admin_label=&#8221;row&#8221;][et_pb_column type=&#8221;4_4&#8243;][et_pb_text admin_label=&#8221;Text&#8221; background_layout=&#8221;light&#8221; text_orientation=&#8221;left&#8221; use_border_color=&#8221;off&#8221; border_color=&#8221;#ffffff&#8221; border_style=&#8221;solid&#8221;] Sonoff Modification There&#8217;s a company called ITEAD that manufactures a few devices in a line they call Sonoff. There&#8217;s a really inexpensive switch that&#8217;s ready to be modified to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":39,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-114","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.cribbstechnologies.com\/index.php\/wp-json\/wp\/v2\/pages\/114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cribbstechnologies.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.cribbstechnologies.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.cribbstechnologies.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cribbstechnologies.com\/index.php\/wp-json\/wp\/v2\/comments?post=114"}],"version-history":[{"count":7,"href":"https:\/\/www.cribbstechnologies.com\/index.php\/wp-json\/wp\/v2\/pages\/114\/revisions"}],"predecessor-version":[{"id":205,"href":"https:\/\/www.cribbstechnologies.com\/index.php\/wp-json\/wp\/v2\/pages\/114\/revisions\/205"}],"up":[{"embeddable":true,"href":"https:\/\/www.cribbstechnologies.com\/index.php\/wp-json\/wp\/v2\/pages\/39"}],"wp:attachment":[{"href":"https:\/\/www.cribbstechnologies.com\/index.php\/wp-json\/wp\/v2\/media?parent=114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}