{"id":573,"date":"2020-08-23T11:40:24","date_gmt":"2020-08-23T03:40:24","guid":{"rendered":"https:\/\/easylife.yt\/smarthome\/?p=573"},"modified":"2022-09-05T08:28:57","modified_gmt":"2022-09-05T00:28:57","slug":"diy-%e9%90%b5%e6%8d%b2%e9%96%80%e9%9b%b2%e7%ab%af%e6%8e%a7%e5%88%b6%e5%99%a8%e9%81%a0%e7%ab%af%e9%96%8b%e9%97%9c%e9%90%b5%e6%8d%b2%e9%96%80%ef%bc%88%e4%b8%89%ef%bc%89","status":"publish","type":"post","link":"https:\/\/easylife.yt\/smarthome\/2020\/08\/573\/","title":{"rendered":"DIY \u9435\u6372\u9580\u96f2\u7aef\u63a7\u5236\u5668,\u9060\u7aef\u958b\u95dc\u9435\u6372\u9580\uff08\u4e09\uff09"},"content":{"rendered":"\n<p class=\"has-medium-font-size\">\u770b\u4e86\u7b2c\u4e00\u7bc7<strong><a href=\"https:\/\/easylife.yt\/smarthome\/2020\/08\/531\/\" target=\"_blank\" rel=\"noreferrer noopener\">DIY\u96f2\u7aef\u63a7\u5236\u5668<\/a><\/strong>\u7684\u4ecb\u7d39\u4e4b\u5f8c\uff0c\u60a8\u662f\u4e0d\u662f\u4e5f\u60f3\u81ea\u5df1DIY\u505a\u4e00\u500b\u5462\uff01<br>\u6574\u500bDIY\u7684\u88fd\u4f5c\u904e\u7a0b\uff0c\u4e00\u5171\u5206\u6210\u56db\u7bc7\u6587\u7ae0\uff0c\u7c21\u8ff0\u5982\u4e0b\uff1a<br><a href=\"https:\/\/easylife.yt\/smarthome\/2020\/08\/531\/\" target=\"_blank\" rel=\"noreferrer noopener\">1.\u7b2c\u4e00\u7bc7\u4ecb\u7d39\u529f\u80fd\u8207\u64cd\u4f5c\u65b9\u6cd5\u3002<\/a><br><a href=\"https:\/\/easylife.yt\/smarthome\/2020\/08\/540\/\" target=\"_blank\" rel=\"noreferrer noopener\" title=\"https:\/\/easylife.yt\/smarthome\/2020\/08\/540\/\">2.\u7b2c\u4e8c\u7bc7\u4ecb\u7d39\u96fb\u8def\u63a5\u6cd5\uff0c\u9019\u7bc7\u9700\u8981\u96fb\u8def\u677f\u710a\u63a5\u7684<strong><span class=\"has-inline-color has-primary-color\">\u6280\u80fd<\/span><\/strong>\uff0c\u4e5f\u662f\u6211\u89ba\u5f97\u6700\u96e3\u7684\u90e8\u5206\u3002<\/a><br>3.\u7b2c\u4e09\u7bc7\uff08<strong>\u672c\u7bc7<\/strong>\uff09\u4ecb\u7d39\u5982\u4f55\u8a3b\u518a\u96f2\u7aef\u5e33\u865f\u4ee5\u53ca\u4e0b\u8f09\u8207\u4fee\u6539ESP8266\u7684Arduino\u7a0b\u5f0f\u78bc\uff0c\u7136\u5f8c\u71d2\u9304\u5230ESP8266\uff0c\u9019\u90e8\u5206\u4e5f\u4e0d\u96e3\uff0c\u6309\u7167\u6b65\u9a5f\u505a\u5c31\u884c\u4e86\u3002<br>4.\u7b2c\u56db\u7bc7\u4ecb\u7d39\u5982\u4f55\u4fee\u6539Android APP\u7684\u7bc4\u4f8b\u7a0b\u5f0f\uff0c\u6211\u7528\u7684\u662fAppinventor 2\u4f86\u958b\u767c\u9019\u500bAPP\u7684\uff0c\u4fee\u6539\u76f8\u7576\u7c21\u55ae\u5bb9\u6613\u3002<\/p>\n\n\n\n<p class=\"has-medium-font-size\">\u9996\u5148\u8981\u8a3b\u518aIoT\u7269\u806f\u7db2\u7684\u96f2\u7aef\u5e33\u865f\uff0c\u9019\u88e1\u4f7f\u7528\u7684\u662f<a href=\"http:\/\/demo.thingsboard.io\" target=\"_blank\" rel=\"noreferrer noopener\" title=\"http:\/\/demo.thingsboard.io\">Thingsboard\u7269\u806f\u7db2<\/a>\u7cfb\u7d71\uff0c\u7533\u8acb\u6b65\u9a5f\u8acb\u53c3\u8003\u4ee5\u4e0b\u5f71\u7247\uff0c\u8a18\u5f97\u8981\u628a\u7533\u8acb\u7684&#8221;<strong><span class=\"has-inline-color has-primary-color\">\u5e33\u865f<\/span><\/strong>&#8220;\uff0f&#8221;<strong><span class=\"has-inline-color has-primary-color\">\u5bc6\u78bc<\/span><\/strong>&#8220;\u4ee5\u53ca&#8221;\u8a2d\u5099\u7684<strong><span class=\"has-inline-color has-primary-color\">\u5b58\u53d6\u4ee4\u724c\uff08Token\uff09<\/span><\/strong>&#8220;\u8a18\u4e0b\u4f86\u3002<\/p>\n\n\n\n<div style=\"position:relative;padding-bottom:56.25%;height:0;overflow:hidden;\"><iframe loading=\"lazy\" style=\"width:100%;height:100%;position:absolute;left:0px;top:0px;overflow:hidden\" frameborder=\"0\" type=\"text\/html\" data-src=\"https:\/\/www.dailymotion.com\/embed\/video\/x7vq28j\" width=\"100%\" height=\"100%\" allow=\"autoplay\" allowfullscreen=\"\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" class=\"lazyload\" data-load-mode=\"1\"><\/iframe><\/div>\n\n\n\n<p class=\"has-medium-font-size\">\u7533\u8acb\u5b8c\u7269\u806f\u7db2\u5e33\u865f\u5f8c\uff0c\u63a5\u4e0b\u4f86\u5230GitHub\u4e0b\u8f09ESP8266\u7684\u7a0b\u5f0f\u78bc\uff0c\u8acb\u9ede\u64ca\u4ee5\u4e0b\u7db2\u5740<br><a href=\"https:\/\/github.com\/YT-Hung\/esp8266_gpio_control_with_Thingsboard\/tree\/master\/ESP8266ArduinoThingsboard\" target=\"_blank\" rel=\"noreferrer noopener\">\u9ede\u6211\u4e0b\u8f09\u7a0b\u5f0f\u78bc<\/a>\uff0c\u958b\u555fGitHub\u5f8c\u7528<strong><span class=\"has-inline-color has-primary-color\">\u6ed1\u9f20\u53f3\u9375<\/span><\/strong>\u9ede\u9078\u4e0b\u5716\u7d05\u6846\u4f4d\u7f6e\u7684&#8221;ThingsBoard_esp8266-remote-control-sample.ino&#8221;\uff0c\u7136\u5f8c\u9078\u64c7<strong><span class=\"has-inline-color has-primary-color\">\u53e6\u5b58\u9023\u7d50\u70ba<\/span><\/strong>\uff0c<br><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"406\" class=\"wp-image-575 lazyload\" style=\"--smush-placeholder-width: 800px; --smush-placeholder-aspect-ratio: 800\/406;width: 800px;\" data-src=\"https:\/\/easylife.yt\/smarthome\/wp-content\/uploads\/2020\/08\/p32-0.jpg\" alt=\"DIY\u9435\u6372\u9580\u96f2\u7aef\u63a7\u5236\u5668\" data-srcset=\"https:\/\/easylife.yt\/smarthome\/wp-content\/uploads\/2020\/08\/p32-0.jpg 1333w, https:\/\/easylife.yt\/smarthome\/wp-content\/uploads\/2020\/08\/p32-0-300x152.jpg 300w, https:\/\/easylife.yt\/smarthome\/wp-content\/uploads\/2020\/08\/p32-0-1024x520.jpg 1024w, https:\/\/easylife.yt\/smarthome\/wp-content\/uploads\/2020\/08\/p32-0-768x390.jpg 768w\" data-sizes=\"auto, (max-width: 800px) 100vw, 800px\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" \/><noscript><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"406\" class=\"wp-image-575\" style=\"width: 800px;\" src=\"https:\/\/easylife.yt\/smarthome\/wp-content\/uploads\/2020\/08\/p32-0.jpg\" alt=\"DIY\u9435\u6372\u9580\u96f2\u7aef\u63a7\u5236\u5668\" srcset=\"https:\/\/easylife.yt\/smarthome\/wp-content\/uploads\/2020\/08\/p32-0.jpg 1333w, https:\/\/easylife.yt\/smarthome\/wp-content\/uploads\/2020\/08\/p32-0-300x152.jpg 300w, https:\/\/easylife.yt\/smarthome\/wp-content\/uploads\/2020\/08\/p32-0-1024x520.jpg 1024w, https:\/\/easylife.yt\/smarthome\/wp-content\/uploads\/2020\/08\/p32-0-768x390.jpg 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/noscript><br>\u5c07\u7a0b\u5f0f\u5b58\u653e\u5230\u684c\u9762\uff0c\u4e0b\u4e00\u6b65\u8981\u71d2\u9304\u5230ESP8266\u9019\u584a\u677f\u5b50\u3002<br><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"505\" class=\"wp-image-576 lazyload\" style=\"--smush-placeholder-width: 800px; --smush-placeholder-aspect-ratio: 800\/505;width: 800px;\" data-src=\"https:\/\/easylife.yt\/smarthome\/wp-content\/uploads\/2020\/08\/p32-0-1.jpg\" alt=\"DIY\u9435\u6372\u9580\u96f2\u7aef\u63a7\u5236\u5668\" data-srcset=\"https:\/\/easylife.yt\/smarthome\/wp-content\/uploads\/2020\/08\/p32-0-1.jpg 886w, https:\/\/easylife.yt\/smarthome\/wp-content\/uploads\/2020\/08\/p32-0-1-300x189.jpg 300w, https:\/\/easylife.yt\/smarthome\/wp-content\/uploads\/2020\/08\/p32-0-1-768x485.jpg 768w\" data-sizes=\"auto, (max-width: 800px) 100vw, 800px\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" \/><noscript><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"505\" class=\"wp-image-576\" style=\"width: 800px;\" src=\"https:\/\/easylife.yt\/smarthome\/wp-content\/uploads\/2020\/08\/p32-0-1.jpg\" alt=\"DIY\u9435\u6372\u9580\u96f2\u7aef\u63a7\u5236\u5668\" srcset=\"https:\/\/easylife.yt\/smarthome\/wp-content\/uploads\/2020\/08\/p32-0-1.jpg 886w, https:\/\/easylife.yt\/smarthome\/wp-content\/uploads\/2020\/08\/p32-0-1-300x189.jpg 300w, https:\/\/easylife.yt\/smarthome\/wp-content\/uploads\/2020\/08\/p32-0-1-768x485.jpg 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/noscript><\/p>\n\n\n\n<p class=\"has-medium-font-size\">\u7a0b\u5f0f\u4e0b\u8f09\u5b8c\u6210\u5f8c\uff0c\u9700\u8981\u7528Arduino\uff08IDE\uff09\u8edf\u9ad4\u4f86\u4fee\u6539\u4e00\u4e0b\u53c3\u6578\uff0c\u7136\u5f8c\u71d2\u9304\u5230ESP8266\u7684\u677f\u5b50\uff0c\u5982\u679c\u60a8\u719f\u6089\u9019\u8edf\u9ad4\u64cd\u4f5c\u7684\u8a71\uff0c\u8acb\u958b\u555f\u8f09\u5165\u525b\u525b\u4e0b\u8f09\u7684&#8221;ThingsBoard_esp8266-remote-control-sample.ino&#8221;\u7a0b\u5f0f\uff0c\u7136\u5f8c\u5728\/\/*******\u4e0b\u7684#define\u628a WIFI_AP\u7684\u503c\u6539\u70ba<span class=\"has-inline-color has-primary-color\"><strong>\u4f60\u5bb6\u7684WiFi\u540d\u7a31<\/strong><\/span>\uff0cWIFI_PASSWORD\u7684\u503c\u6539\u70ba<strong><span class=\"has-inline-color has-primary-color\">\u4f60\u5bb6\u7684WIFI\u5bc6\u78bc<\/span><\/strong>\uff0cTOKEN\u7684\u503c\u6539\u70ba\u672c\u7bc7\u6559\u5b78\u7b2c\u4e00\u6b65\u7533\u8acb\u7269\u806f\u7db2\u5e33\u865f\u6240\u5f97\u5230\u7684\u8a2d\u5099<strong><span class=\"has-inline-color has-primary-color\">\u5b58\u53d6\u4ee4\u724c\uff08Token\uff09<\/span><\/strong>\uff08\u5982\u4e0b\u5716\u6df1\u7da0\u8272\u5b57\u9ad4\u7684\u90e8\u5206\uff09\uff0c\u6539\u5b8c\u5b58\u6a94\u7136\u5f8c\u71d2\u9304\u5230\u677f\u5b50\u5c31\u5b8c\u6210\u4e86\u3002<br>\u677f\u5b50\u71d2\u9304\u7684\u53c3\u6578\u8a2d\u5b9a\u5982\u4e0b\uff1a<br>\u958b\u767c\u677f\u7ba1\u7406\u7db2\u5740\uff1ahttp:\/\/arduino.esp8266.com\/stable\/package_esp8266com_index.json<br>\u958b\u767c\u677f\uff1aNodeMCU 1.0<br>\u4e0a\u50b3\u901f\u7387\uff1a115200<br>\u7a0b\u5f0f\u5eab\u9700\u5b89\u88dd\uff1aArduinoJson v5.13.5 &amp; PubSubClient v2.8<br><img loading=\"lazy\" decoding=\"async\" width=\"512\" height=\"625\" class=\"wp-image-577 lazyload\" style=\"--smush-placeholder-width: 512px; --smush-placeholder-aspect-ratio: 512\/625;width: 512px;\" data-src=\"https:\/\/easylife.yt\/smarthome\/wp-content\/uploads\/2020\/08\/p32-32.jpg\" alt=\"DIY\u9435\u6372\u9580\u96f2\u7aef\u63a7\u5236\u5668\" data-srcset=\"https:\/\/easylife.yt\/smarthome\/wp-content\/uploads\/2020\/08\/p32-32.jpg 486w, https:\/\/easylife.yt\/smarthome\/wp-content\/uploads\/2020\/08\/p32-32-246x300.jpg 246w\" data-sizes=\"auto, (max-width: 512px) 100vw, 512px\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" \/><noscript><img loading=\"lazy\" decoding=\"async\" width=\"512\" height=\"625\" class=\"wp-image-577\" style=\"width: 512px;\" src=\"https:\/\/easylife.yt\/smarthome\/wp-content\/uploads\/2020\/08\/p32-32.jpg\" alt=\"DIY\u9435\u6372\u9580\u96f2\u7aef\u63a7\u5236\u5668\" srcset=\"https:\/\/easylife.yt\/smarthome\/wp-content\/uploads\/2020\/08\/p32-32.jpg 486w, https:\/\/easylife.yt\/smarthome\/wp-content\/uploads\/2020\/08\/p32-32-246x300.jpg 246w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/noscript><\/p>\n\n\n\n<p class=\"has-medium-font-size\">\u5982\u679c\u60a8\u5c0d\u65bcArduino\uff08IDE\uff09\u8edf\u9ad4\u64cd\u4f5c\u4e0d\u719f\u6089\u7684\u8a71\uff0c\u8acb\u53c3\u8003\u4ee5\u4e0b\u5f71\u7247\u7684\u6559\u5b78\uff0c\u5305\u542b\u8edf\u9ad4\u4e0b\u8f09\u5b89\u88dd\u8207\u8a2d\u5b9a\uff0c\u4ee5\u53ca\u4fee\u6539\u53c3\u6578\u503c\u548c\u71d2\u9304\u5230ESP8266\u8207\u6e2c\u8a66\u7684\u64cd\u4f5c\u90fd\u5728\u5f71\u7247\u4e2d\u3002<\/p>\n\n\n\n<div style=\"position:relative;padding-bottom:56.25%;height:0;overflow:hidden;\"> <iframe loading=\"lazy\" style=\"width:100%;height:100%;position:absolute;left:0px;top:0px;overflow:hidden\" frameborder=\"0\" type=\"text\/html\" data-src=\"https:\/\/www.dailymotion.com\/embed\/video\/x7vqb9k?rel=0\" width=\"100%\" height=\"100%\" allowfullscreen=\"\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" class=\"lazyload\" data-load-mode=\"1\"> <\/iframe> <\/div>\n\n\n\n<p class=\"has-medium-font-size\"><a href=\"https:\/\/easylife.yt\/smarthome\/2020\/08\/540\/\" target=\"_blank\" rel=\"noreferrer noopener\" title=\"https:\/\/easylife.yt\/smarthome\/2020\/08\/540\/\">\u4e0a\u4e00\u7bc7\uff1aDIY \u9435\u6372\u9580\u96f2\u7aef\u63a7\u5236\u5668,\u9060\u7aef\u958b\u95dc\u9435\u6372\u9580\uff08\u4e8c\uff09<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u770b\u4e86\u7b2c\u4e00\u7bc7DIY\u96f2\u7aef\u63a7\u5236\u5668\u7684\u4ecb<\/p>\n","protected":false},"author":1,"featured_media":541,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[234,235,236,237,238,233,231,232],"class_list":["post-573","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-upgrade","tag-diy","tag-esp8266","tag-relay","tag-app","tag-238","tag-233","tag-231","tag-232"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/easylife.yt\/smarthome\/wp-json\/wp\/v2\/posts\/573","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/easylife.yt\/smarthome\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/easylife.yt\/smarthome\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/easylife.yt\/smarthome\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/easylife.yt\/smarthome\/wp-json\/wp\/v2\/comments?post=573"}],"version-history":[{"count":5,"href":"https:\/\/easylife.yt\/smarthome\/wp-json\/wp\/v2\/posts\/573\/revisions"}],"predecessor-version":[{"id":676,"href":"https:\/\/easylife.yt\/smarthome\/wp-json\/wp\/v2\/posts\/573\/revisions\/676"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/easylife.yt\/smarthome\/wp-json\/wp\/v2\/media\/541"}],"wp:attachment":[{"href":"https:\/\/easylife.yt\/smarthome\/wp-json\/wp\/v2\/media?parent=573"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/easylife.yt\/smarthome\/wp-json\/wp\/v2\/categories?post=573"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/easylife.yt\/smarthome\/wp-json\/wp\/v2\/tags?post=573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}