{"id":337,"date":"2016-11-30T23:37:54","date_gmt":"2016-11-30T22:37:54","guid":{"rendered":"https:\/\/ms07.de\/blog\/?p=337"},"modified":"2016-11-30T23:49:59","modified_gmt":"2016-11-30T22:49:59","slug":"use-sonoff-s20-pins-for-sensors-with-espeasy","status":"publish","type":"post","link":"https:\/\/ms07.de\/blog\/?p=337","title":{"rendered":"Use Sonoff S20 pins for Sensors with espeasy"},"content":{"rendered":"<p>The Sonoff S20 has only a 4 pin header (GND, TX, RX, VCC).<\/p>\n<p>To use this pins (TX=GPIO1, RX=GPIO3) for sensors, the serial interface has to be disabled:<br \/>\n<strong>Tools &#8211; Advanced &#8211; Enable Serial port: uncheck<\/strong><\/p>\n<p>Now it is possible to use gpio1 and gpio3 for <strong>Devices<\/strong>:<br \/>\n<a href=\"https:\/\/ms07.de\/blog\/wp-content\/uploads\/2016\/11\/espeasy-dht11.png\" rel=\"lightbox[337]\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-338 size-medium\" src=\"https:\/\/ms07.de\/blog\/wp-content\/uploads\/2016\/11\/espeasy-dht11-300x236.png\" alt=\"espeasy-dht11\" width=\"300\" height=\"236\" srcset=\"https:\/\/ms07.de\/blog\/wp-content\/uploads\/2016\/11\/espeasy-dht11-300x236.png 300w, https:\/\/ms07.de\/blog\/wp-content\/uploads\/2016\/11\/espeasy-dht11-768x604.png 768w, https:\/\/ms07.de\/blog\/wp-content\/uploads\/2016\/11\/espeasy-dht11-624x491.png 624w, https:\/\/ms07.de\/blog\/wp-content\/uploads\/2016\/11\/espeasy-dht11.png 834w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>This is the first test on a breadboard with DHT11<br \/>\n<a href=\"https:\/\/ms07.de\/blog\/wp-content\/uploads\/2016\/11\/sonoff-s20-dht11.jpg\" rel=\"lightbox[337]\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-342\" src=\"https:\/\/ms07.de\/blog\/wp-content\/uploads\/2016\/11\/sonoff-s20-dht11-300x222.jpg\" alt=\"sonoff-s20-dht11\" width=\"300\" height=\"222\" srcset=\"https:\/\/ms07.de\/blog\/wp-content\/uploads\/2016\/11\/sonoff-s20-dht11-300x222.jpg 300w, https:\/\/ms07.de\/blog\/wp-content\/uploads\/2016\/11\/sonoff-s20-dht11-768x569.jpg 768w, https:\/\/ms07.de\/blog\/wp-content\/uploads\/2016\/11\/sonoff-s20-dht11.jpg 1024w, https:\/\/ms07.de\/blog\/wp-content\/uploads\/2016\/11\/sonoff-s20-dht11-624x462.jpg 624w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><br \/>\n<\/a>I don&#8217;t think that a humidity sensor makes any sense inside the socket. Therefore, I think I will use DS12B20 soldered on a female pin header in the final version.<\/p>\n<p>And this is the result:<br \/>\n<a href=\"https:\/\/ms07.de\/blog\/wp-content\/uploads\/2016\/11\/espeasy-devices.png\" rel=\"lightbox[337]\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-340\" src=\"https:\/\/ms07.de\/blog\/wp-content\/uploads\/2016\/11\/espeasy-devices-300x71.png\" alt=\"espeasy-devices\" width=\"300\" height=\"71\" srcset=\"https:\/\/ms07.de\/blog\/wp-content\/uploads\/2016\/11\/espeasy-devices-300x71.png 300w, https:\/\/ms07.de\/blog\/wp-content\/uploads\/2016\/11\/espeasy-devices-768x182.png 768w, https:\/\/ms07.de\/blog\/wp-content\/uploads\/2016\/11\/espeasy-devices-624x148.png 624w, https:\/\/ms07.de\/blog\/wp-content\/uploads\/2016\/11\/espeasy-devices.png 982w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The values are also published via mqtt:<\/p>\n<pre># mosquitto_sub -h 192.168.234.100 -t \"#\" -v\r\n\/sonoff-s20\/DHT11\/Temperature 24.00\r\n\/sonoff-s20\/DHT11\/Humidity 33.00<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The Sonoff S20 has only a 4 pin header (GND, TX, RX, VCC). To use this pins (TX=GPIO1, RX=GPIO3) for sensors, the serial interface has to be disabled: Tools &#8211; Advanced &#8211; Enable Serial port: uncheck Now it is possible to use gpio1 and gpio3 for Devices: This is the first test on a breadboard [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[],"class_list":["post-337","post","type-post","status-publish","format-standard","hentry","category-it","category-linux"],"_links":{"self":[{"href":"https:\/\/ms07.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/337","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ms07.de\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ms07.de\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ms07.de\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ms07.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=337"}],"version-history":[{"count":6,"href":"https:\/\/ms07.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/337\/revisions"}],"predecessor-version":[{"id":349,"href":"https:\/\/ms07.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/337\/revisions\/349"}],"wp:attachment":[{"href":"https:\/\/ms07.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ms07.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=337"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ms07.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}