{"id":698,"date":"2020-08-13T22:42:00","date_gmt":"2020-08-13T14:42:00","guid":{"rendered":"https:\/\/www.iotch.xyz\/?p=698"},"modified":"2020-08-13T22:42:00","modified_gmt":"2020-08-13T14:42:00","slug":"homeassistant-%e5%ae%9e%e7%8e%b0%e6%8e%a7%e5%88%b6%e5%b0%8f%e7%81%af","status":"publish","type":"post","link":"https:\/\/www.iotch.xyz\/?p=698","title":{"rendered":"Homeassistant &#8212;\u5b9e\u73b0\u63a7\u5236\u5c0f\u706f"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">1. Home Assistant\u4ecb\u7ecd<\/h3>\n\n\n\n<p>Home Assistant \u662f\u4e00\u6b3e\u57fa\u4e8e Python \u7684\u667a\u80fd\u5bb6\u5c45\u5f00\u6e90\u7cfb\u7edf\uff0c\u652f\u6301\u4f17\u591a\u54c1\u724c\u7684\u667a\u80fd\u5bb6\u5c45\u8bbe\u5907\uff0c\u53ef\u4ee5\u8f7b\u677e\u5b9e\u73b0\u8bbe\u5907\u7684\u8bed\u97f3\u63a7\u5236\u3001\u81ea\u52a8\u5316\u7b49\u3002<br>\u5b98\u65b9\u7f51\u5740\uff1a<a href=\"https:\/\/www.home-assistant.io\/\" target=\"_blank\"  rel=\"nofollow\" >https:\/\/www.home-assistant.io\/<\/a><\/p>\n\n\n\n<p>Home Assistant\u80fd\u8fde\u63a5\u54ea\u4e9b\u4e1c\u897f\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u5b9e\u65f6\u6c47\u7387\u884c\u60c5\u2014\u2014\u83b7\u5f97\u5f53\u524d\u5b9e\u65f6\u7684\u6c47\u7387\u884c\u60c5<br>\u7c7b\u4f3c\u7684\uff0c\u8fd8\u6709\u80a1\u7968\u884c\u60c5\u3001\u7535\u5b50\u8d27\u5e01\u884c\u60c5\u3001\u4ea4\u901a\u62e5\u5835\u60c5\u51b5\u3001\u5929\u6c14\u9884\u62a5\u3001\u7a7a\u6c14\u8d28\u91cf\u9884\u62a5\u2026\u2026<\/li><li>Android\u624b\u673a\u6444\u50cf\u5934\u2014\u2014\u83b7\u5f97\u6444\u50cf\u5934\u7684\u89c6\u9891\u6d41<br>\u7c7b\u4f3c\u7684\uff0c\u6240\u6709\u652f\u6301\u6807\u51c6\u534f\u8bae\u7684\u786c\u4ef6\u6444\u50cf\u5934\u90fd\u53ef\u4ee5\u63a5\u5165\u3002<\/li><li>\u4eba\u8138\u8bc6\u522b\u2014\u2014\u57fa\u4e8e\u89c6\u9891\u6d41\uff0c\u8bc6\u522b\u51fa\u5176\u4e2d\u7684\u4eba\u8138\u662f\u8c01<br>\u7c7b\u4f3c\u7684\uff0c\u53ef\u4ee5\u57fa\u4e8e\u89c6\u9891\u6d41\u8fdb\u884c\u8f66\u724c\u8bc6\u522b\u3001\u6587\u5b57\u8bc6\u522b\u3001\u52a8\u4f5c\u63a2\u6d4b\u3001\u566a\u97f3\u76d1\u63a7\u2026\u2026<\/li><li>\u767e\u5ea6\u6587\u5b57\u8f6c\u8bed\u97f3\u670d\u52a1\u2014\u2014\u901a\u8fc7\u767e\u5ea6\u514d\u8d39\u7684TTS\u670d\u52a1\uff0c\u5c06\u6587\u5b57\uff08\u6bd4\u5982\u5929\u6c14\u9884\u62a5\u3001\u80a1\u7968\u884c\u60c5\u7b49\u6587\u5b57\u4fe1\u606f\uff09\u8f6c\u6362\u6210\u8bed\u97f3\uff08MP3\uff09<br>\u7c7b\u4f3c\u7684\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528voiceRSS\u3001Google\u7b49\u7684\u670d\u52a1\u3002<\/li><li>KODI\u5a92\u4f53\u64ad\u653e\u5668\u2014\u2014\u5c06\u8bed\u97f3\u4fe1\u53f7\u901a\u8fc7\u786c\u4ef6\u64ad\u653e\u51fa\u6765<br>\u7c7b\u4f3c\u7684\uff0c\u53ef\u4ee5\u7528VLC\u3001Gstreamer\u7b49\u8f6f\u4ef6\uff0c\u4e5f\u53ef\u4ee5\u76f4\u63a5\u8fde\u63a5\u5916\u90e8\u7684\u5404\u79cd\u84dd\u7259\u97f3\u7bb1\u3002<\/li><li>\u4e9a\u9a6c\u900aECHO\u2014\u2014\u4e0e\u4e9a\u9a6c\u900aECHO\u8fdb\u884c\u8054\u52a8<br>\u7c7b\u4f3c\u7684\uff0c\u53ef\u4ee5\u4e0e\u5404\u79cd\u5916\u90e8\u7684\u667a\u80fd\u5f15\u64ce\u8054\u52a8\uff0c\u53ef\u4ee5\u4e0e\u82f9\u679c\u624b\u673a\uff08Siri\uff09\u8fdb\u884c\u8054\u52a8\uff0c\u53ef\u4ee5\u4e0eGoogleAssistant\u8054\u52a8\uff0c\u53ef\u4ee5\u4e0eIFTTT\u8054\u52a8\u3002<\/li><li>\u5c0f\u7c73\u6e29\u6e7f\u5ea6\u4f20\u611f\u5668\u2014\u2014\u83b7\u5f97\u73af\u5883\u7684\u6e29\u6e7f\u5ea6\u4fe1\u606f<br>\u7c7b\u4f3c\u7684\uff0c\u5c0f\u7c73\u7cfb\u5217\u7684\u5404\u79cd\u4f20\u611f\u5668\u95e8\u7a97\u5f00\u5408\u3001\u4eba\u4f53\u611f\u5e94\u3001\u5c0f\u7c73\u9b54\u65b9\u7b49\u90fd\u53ef\u4ee5\u63a5\u5165\u3002<\/li><li>Philips\u667a\u80fd\u706f\u2014\u2014\u63a7\u5236Philips\u667a\u80fd\u706f\u7684\u5f00\u5173\u3001\u989c\u8272\u3001\u4eae\u5ea6<br>\u7c7b\u4f3c\u7684\uff0c\u5c0f\u7c73\u667a\u80fd\u706f\u3001\u667a\u80fd\u5f00\u5173\u3001\u5b9c\u5bb6\u667a\u80fd\u706f\u4e5f\u53ef\u4ee5\u88ab\u63a7\u5236\uff0c\u8fd8\u53ef\u4ee5\u901a\u8fc7\u7ea2\u5916\u8f6c\u53d1<\/li><li>\u63a7\u5236\u4f20\u7edf\u5bb6\u7535\u3002<\/li><li>\u53d1\u9001\u90ae\u4ef6\u2014\u2014\u53ef\u4ee5\u53d1\u9001\u90ae\u4ef6\u901a\u77e5<br>\u7c7b\u4f3c\u7684\uff0c\u4e5f\u53ef\u4ee5\u53d1\u9001\u624b\u673a\u77ed\u6d88\u606f\u3002<\/li><li>Arduino\u2014\u2014DIY\u7684\u4e50\u56ed<br>\u7c7b\u4f3c\u7684\uff0c\u53ef\u4ee5\u81ea\u5df1\u5199\u4e00\u4e9b\u811a\u672c\u3001\u505a\u4e00\u4e9b\u4e32\u53e3\u8bbe\u5907\uff0c\u90fd\u53ef\u4ee5\u8054\u52a8\u8d77\u6765\u3002<\/li><li>\u2026\u2026<\/li><\/ul>\n\n\n\n<p>\u57fa\u4e8eHomeAssistant\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u8fde\u63a5\u5404\u79cd\u5916\u90e8\u8bbe\u5907\uff08\u667a\u80fd\u8bbe\u5907\u3001\u6444\u50cf\u5934\u3001\u90ae\u4ef6\u3001\u77ed\u6d88\u606f\u3001\u4e91\u670d\u52a1\u7b49\uff0c\u6210\u719f\u7684\u53ef\u8fde\u63a5\u7ec4\u4ef6\u6709\u8fd1\u5343\u79cd\uff09\uff0c\u624b\u52a8\u6216\u6309\u7167\u81ea\u5df1\u7684\u9700\u6c42\u81ea\u52a8\u5316\u5730\u8054\u52a8\u8fd9\u4e9b\u5916\u90e8\u8bbe\u5907\uff0c\u6784\u5efa\u968f\u5fc3\u6240\u6b32\u7684\u667a\u6167\u7a7a\u95f4\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Home Assistant\u7684\u5b89\u88c5\u65b9\u5f0f<\/h3>\n\n\n\n<p>\u8fd9\u91cc\u4ee5\u6811\u8393\u6d3e3b+\u4e3a\u4f8b\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2.1 \u65b9\u5f0f\u4e00\uff1a\u624b\u52a8\u5b89\u88c5<\/h4>\n\n\n\n<p>\u5927\u81f4\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u5b89\u88c5\u4e00\u4e9b\u57fa\u672c\u4f9d\u8d56\u5e93<\/li><li>\u5b89\u88c5<code>samba<\/code>,\u4f7fwindows\u53ef\u4ee5\u8bbf\u95ee\u6811\u8393\u6d3e\u7684\u6587\u4ef6\u3002\u6216\u8005\u7528\u5b89\u88c5<code>WinSCP<\/code>\u4e5f\u53ef\u4ee5<\/li><li>\u5b89\u88c5jupyternotebook\uff0c\u914d\u7f6e\u6587\u4ef6\u6bd4\u8f83\u65b9\u4fbf<\/li><li>\u5b89\u88c5HomeAssistant<\/li><li>\u52a0\u5165\u5f00\u673a\u542f\u52a8<\/li><\/ol>\n\n\n\n<h4 class=\"wp-block-heading\">2.2 \u65b9\u5f0f\u4e8c\uff1a\u5237\u5199 Hass.io \u955c\u50cf<\/h4>\n\n\n\n<p>Hass.io \u662f\u4e00\u6b3e Home Assistant \u7279\u522b\u5b9a\u5236\u7684\u9ad8\u96c6\u6210\u5ea6\u3001\u56fe\u5f62\u5316\u64cd\u4f5c\u3001\u6613\u4e0a\u624b\u7684 Home Assistant \u7cfb\u7edf\u3002\u7cfb\u7edf\u7531 ResinOS \u53ca Docker \u9a71\u52a8\uff0c\u65e8\u5728\u7b80\u5316 Home Assistant \u7684\u914d\u7f6e\u64cd\u4f5c\u3002<\/p>\n\n\n\n<p>\u76ee\u524d Hass.io \u652f\u6301\u6811\u8393\u6d3e\u3001Intel NUC \u53ca Linux \u7cfb\u7edf\u3002<\/p>\n\n\n\n<p>\u8bf7\u53c2\u8003\u5b98\u65b9\u5b89\u88c5\u65b9\u6cd5\u8fdb\u884c\u5b89\u88c5\uff1a<a href=\"https:\/\/home-assistant.cc\/hassio\/installation\/\" target=\"_blank\"  rel=\"nofollow\" >https:\/\/home-assistant.cc\/hassio\/installation\/<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2.3 \u65b9\u5f0f\u4e09\uff1a\u5237\u5199 HAChina\u6811\u8393\u6d3e\u955c\u50cf<\/h4>\n\n\n\n<p>HAChina\u5730\u5740\uff1a<a href=\"https:\/\/www.hachina.io\/docs\/321.html\" target=\"_blank\"  rel=\"nofollow\" >https:\/\/www.hachina.io\/docs\/321.html<\/a><\/p>\n\n\n\n<p><strong>HAChina\u5b9a\u5236\u6811\u8393\u6d3e\u955c\u50cf<\/strong>\uff1a<br>1\u3001\u57fa\u4e8e\u6811\u8393\u6d3e\u5b98\u65b9\u955c\u50cf\u5236\u4f5c\uff0c\u4fdd\u8bc1\u955c\u50cf\u7684\u517c\u5bb9\u6027\u3001\u7a33\u5b9a\u6027\u53ca\u5f00\u653e\u6027\uff1b<\/p>\n\n\n\n<p>2\u3001\u642d\u8f7dhomeassistant\u3001jupyter notebook\u3001mosquitto\u3001samba\u53caHAdashboard\u7b49\u5e38\u7528\u8f6f\u4ef6\uff0c\u5e76\u8bbe\u7f6e\u81ea\u542f\u52a8\uff0c\u9884\u88c5\u5404\u4e2a\u8f6f\u4ef6\u6240\u6709\u4f9d\u8d56\u5305\uff0c\u7701\u53bb\u7e41\u7410\u7684\u73af\u5883\u642d\u5efa\u8fc7\u7a0b\uff0c\u5165\u624b\u5373\u7528\uff1b<\/p>\n\n\n\n<p>3\u3001\u96c6\u6210\u5c0f\u7c73\u53ca\u82f9\u679c\u8bbe\u5907\u626b\u63cf\u5de5\u5177\uff0c\u4fbf\u6377\u83b7\u53d6\u540c\u4e00\u5c40\u57df\u7f51\u5185\u5c0f\u7c73\u53ca\u82f9\u679c\u8bbe\u5907\u7684ip\u3001token\u7b49\u4fe1\u606f\uff1b<\/p>\n\n\n\n<p>4\u3001HomeAssistant\u4e2d\u9884\u8bbetunnel2local\u5de5\u5177\uff0c\u53ef\u4ee5\u76f4\u63a5\u5916\u7f51\u8bbf\u95ee\uff1b<\/p>\n\n\n\n<p>5\u3001\u642d\u8f7d\u6700\u65b0\u7248\u672c\u7684redpoint\uff0c\u83b7\u53d6Homeassistant\u53ef\u89c6\u5316\u5185\u6d4b\u673a\u4f1a\uff1b<\/p>\n\n\n\n<p>6\u3001\u4e24\u5468\u4e00\u6b21\u7248\u672c\u66f4\u65b0\uff0c\u4fdd\u6301\u4e0eHomeassistant\u66f4\u65b0\u9891\u7387\u540c\u6b65\u3002<\/p>\n\n\n\n<p>\u4e0b\u8f7d\u6700\u65b0HAchina\u6811\u8393\u6d3e\u955c\u50cf\uff1a<a href=\"https:\/\/pan.baidu.com\/s\/1QurIFKwoOYeuwrnlO_yxFg\" target=\"_blank\"  rel=\"nofollow\" >\u767e\u5ea6\u7f51\u76d8\u70b9\u6211\u4e0b\u8f7d<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. \u5b9e\u73b0\u63a7\u5236\u5c0f\u706f<\/h3>\n\n\n\n<p>\u8fd9\u6b21\u5c1d\u8bd5\u505a\u4e00\u4e2a\u5c0fdemo\uff0c\u7b80\u5355\u5b9e\u73b0homeassistant\u63a7\u5236\u4e00\u4e2a\u53d1\u5149\u4e8c\u6781\u7ba1\u3002\u91c7\u7528\u7684\u662f\u7b2c\u4e09\u79cd\u65b9\u6cd5\uff0c\u5237\u5199 HAChina\u6811\u8393\u6d3e\u955c\u50cf\uff0c\u64cd\u4f5c\u7b80\u5355\u7c97\u66b4\u3002\u5237\u5199\u955c\u50cf\u5c31\u4e0d\u591a\u8bf4\u4e86\uff0c\u53ef\u4ee5\u53c2\u8003\u53e6\u4e00\u7bc7\u535a\u6587\uff1a<a href=\"https:\/\/mp.csdn.net\/mdeditor\/102055866#\" target=\"_blank\"  rel=\"nofollow\" >https:\/\/mp.csdn.net\/mdeditor\/102055866#<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3.1 \u51c6\u5907\u6750\u6599<\/h4>\n\n\n\n<ol class=\"wp-block-list\"><li>5v\u7ee7\u7535\u5668<\/li><li>ESP8266<\/li><li>\u5c0f\u53f7\u9762\u5305\u677f<\/li><li>\u53d1\u5149\u4e8c\u6781\u7ba1\u4e00\u4e2a<\/li><li>\u7535\u963b\uff08\u964d\u538b\u7528\uff09<\/li><li>USB-TTL\uff08\u7528\u67655v\u4f9b\u7535\uff0c\u53ef\u7528\u5176\u5b83\u4ee3\u66ff\uff09<\/li><li>\u675c\u90a6\u7ebf\u82e5\u5e72<br>\u5982\u56fe\uff1a<br><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20191020181329424.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3k0NTk1NDExOTU=,size_16,color_FFFFFF,t_70\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"><\/li><\/ol>\n\n\n\n<h4 class=\"wp-block-heading\">3.2 \u914d\u7f6eESP8266\uff08ESPEasy\uff09<\/h4>\n\n\n\n<p>ESPEasy\u662fweb\u63a7\u5236esp8266\u7684\u56fa\u4ef6\uff0c\u5f88\u65b9\u4fbf\uff0c\u9996\u5148\u53c2\u8003\u8fd9\u7bc7\u535a\u6587\u5237ESPEasy:<br><a href=\"https:\/\/blog.csdn.net\/y459541195\/article\/details\/100763023\" target=\"_blank\"  rel=\"nofollow\" >\u6811\u8393\u6d3e\u6253\u9020\u667a\u80fd\u5bb6\u5c45\uff08\u4e00\uff09\uff1aesp8266\u6a21\u5757\u5237ESPEasy<\/a><\/p>\n\n\n\n<p>\u5237\u5b8cESPEasy\u4e4b\u540e\uff0c\u8981\u786e\u4fddesp8266\u8fde\u63a5\u7684WiFi\u548chomeassistant\uff08\u6811\u8393\u6d3e\uff09\u662f\u540c\u4e00\u4e2aWiFi\uff0c\u63a5\u7740\u7ed9\u6a21\u5757<code>VIN<\/code>\u548c<code>G<\/code>\u9488\u811a\u4f9b\u7535\uff0cVIN\u8f93\u51655v\uff0c\u5982\u4e0b\uff1a<br><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20191020195255693.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3k0NTk1NDExOTU=,size_16,color_FFFFFF,t_70#pic_center\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" width=\"200\" height=\"300\"><\/p>\n\n\n\n<h5 class=\"wp-block-heading\">3.2.1 config\u9879<\/h5>\n\n\n\n<p>\u8f93\u5165IP\u5730\u5740\uff0c\u6253\u5f00espeasy\u9875\u9762\uff08\u8fd9\u91cc\u662f\u201c192.168.43.8\u201d\uff09\uff0c\u914d\u7f6e\u4e00\u4e0bconfig\uff0c\u7ed9esp8266\u8d77\u4e2a\u540d\u5b57\u201cESP3\u201d\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<br><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/2019102020035682.PNG?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3k0NTk1NDExOTU=,size_16,color_FFFFFF,t_70#pic_center\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" width=\"700\" height=\"400\"><\/p>\n\n\n\n<h5 class=\"wp-block-heading\">3.2.2 Contollers\u9879<\/h5>\n\n\n\n<p>\u7136\u540e\uff0c\u5207\u6362\u5230Contollers\u9879\uff0c\u8fd9\u4e2a\u662f\u914d\u7f6eMQTT\u7684\uff0c\u9009\u62e9\u201cOpenHAB MQTT\u201d\uff0c<br>\u586b\u4e00\u4e0bMQTT\u670d\u52a1\u5668\u5730\u5740\uff1a\u201c192.168.43.100\u201d\uff0c\u7aef\u53e3\u53f7\uff1a1883<\/p>\n\n\n\n<p><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20191020200936781.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3k0NTk1NDExOTU=,size_16,color_FFFFFF,t_70\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"><br><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20191020201450729.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3k0NTk1NDExOTU=,size_16,color_FFFFFF,t_70\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"><br>\u56fe\u4e2d\u7528\u6237\u540d\u548c\u5bc6\u7801\uff085\u548c6\uff09\uff0c\u53ef\u4ee5\u4e0d\u586b\uff0c7\u52fe\u9009\uff0c\u63d0\u4ea48<\/p>\n\n\n\n<p><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20191020201657860.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3k0NTk1NDExOTU=,size_16,color_FFFFFF,t_70\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"><br>\u63d0\u4ea4\u5b8c\u4e4b\u540e\u7684\u72b6\u6001\uff0c\u53ef\u4ee5\u770b\u5230\uff0c\u8fd8\u53ef\u4ee5\u6dfb\u52a0\u4e24\u4e2aMQTT\u670d\u52a1\u5668\u63a7\u5236\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">3.2.3 Devices\u9879<\/h5>\n\n\n\n<p>\u7ed9\u8fd9\u4e2a\u5c0f\u706f\u8d77\u4e2a\u540d\u5b57\uff0c\u5728\u56fe\u4e2d2\u5904\u586b\u4e0a\u201cdeng\u201d\uff0c\u52fe\u90093\uff0c4\u662f\u9009\u62e9\u4e00\u4e2a\u9488\u811a\u6765\u63a7\u5236\u7ee7\u7535\u5668\uff0c\u8fd9\u91cc\u9009\u7684GPIO13\uff0c5\u662f\u201cSwitch\u201d\uff0c6\uff0c7\u52fe\u9009\uff0c8\u53ef\u4ee5\u6539\u4e5f\u53ef\u9ed8\u8ba4\uff0c9\u63d0\u4ea4\u3002<br><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20191020202626600.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3k0NTk1NDExOTU=,size_16,color_FFFFFF,t_70\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"><br><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20191020203045421.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3k0NTk1NDExOTU=,size_16,color_FFFFFF,t_70\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"><br>\u63d0\u4ea4\u540e\u72b6\u6001<br><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/2019102020331078.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3k0NTk1NDExOTU=,size_16,color_FFFFFF,t_70\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"><\/p>\n\n\n\n<h5 class=\"wp-block-heading\">3.2.4 Tools\u9879<\/h5>\n\n\n\n<p>\u9009\u62e9\u201cAdanced\u201d\uff0c\u6253\u5f00\u540e\u52fe\u9009\u201cMQTT Retain Msg\u201d\u9009\u9879\uff0c\u62c9\u5230\u6700\u4e0b\u9762\u63d0\u4ea4\u4e00\u4e0bSubmit\u3002<br><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20191020203419179.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3k0NTk1NDExOTU=,size_16,color_FFFFFF,t_70\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"><br><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20191020203500404.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3k0NTk1NDExOTU=,size_16,color_FFFFFF,t_70\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3.3 \u63a5\u7ebf<\/h4>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20191020204232798.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3k0NTk1NDExOTU=,size_16,color_FFFFFF,t_70#pic_center\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>\u7ee7\u7535\u5668\u7684\u4fe1\u53f7\u89e6\u53d1\u7aef\u63a5\u521a\u521a\u8bbe\u7f6e\u7684\u5f15\u811a<code>GPIO13<\/code>\uff08D7\uff09<\/li><li>\u53d1\u5149\u4e8c\u6781\u7ba1\u957f\u5f15\u811a\u4e3a\u6b63\u6781\uff0c\u77ed\u7684\u4e3a\u8d1f\u6781\uff0c\u63a5\u5165\u9762\u5305\u677f<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20191020221836551.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3k0NTk1NDExOTU=,size_16,color_FFFFFF,t_70#pic_center\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"\/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">3.4 \u63a5\u5165homeassistant<\/h4>\n\n\n\n<p>\u6d4f\u89c8\u5668\u8f93\u5165\uff1ahttp:\/\/192.168.43.100:8123\uff0c\uff08\u6811\u8393\u6d3e\u7684ip\uff1a192.168.43.100\uff09<br>\u6ce8\u518c\u4e00\u4e0b\uff0c\u767b\u5f55HaChina.<br><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20191020212059921.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3k0NTk1NDExOTU=,size_16,color_FFFFFF,t_70\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"><br><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/2019102021252988.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3k0NTk1NDExOTU=,size_16,color_FFFFFF,t_70\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"><br>\u627e\u5230MQTT\u670d\u52a1\u5668\u914d\u7f6e\u4e00\u4e0b\uff0c\u5e76\u4fdd\u5b58\uff1a<br><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20191020212859989.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3k0NTk1NDExOTU=,size_16,color_FFFFFF,t_70\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" width=\"700\" height=\"400\"><br>\u63a5\u7740\u641c\u7d22MQTT\u5f00\u5173\uff0c<br><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20191020213233143.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3k0NTk1NDExOTU=,size_16,color_FFFFFF,t_70\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" width=\"700\" height=\"380\"><br>\u586b\u5199\u5982\u4e0b\u5185\u5bb9\uff1a<br><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20191020213847972.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3k0NTk1NDExOTU=,size_16,color_FFFFFF,t_70\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" width=\"400\" height=\"200\"><br>state_topic\u548ccommand_topic \u662f\u4e0a\u9762\u201c3.2.3 Devices\u9879\u201d\u914d\u7f6e\u7684\u5185\u5bb9<br><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20191020213731867.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3k0NTk1NDExOTU=,size_16,color_FFFFFF,t_70\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" width=\"400\" height=\"300\"><br>\u4fdd\u5b58\uff0c\u4e0a\u4f20\u53d1\u5e03\uff0c\u91cd\u542fhomeassistant\uff1a\u201c\u914d\u7f6e\u201d\u2013&gt;\u201c\u901a\u7528\u201d\u2013&gt;\u201c\u68c0\u67e5\u914d\u7f6e\u201d\u2013&gt;\u201c\u91cd\u542f\u670d\u52a1\u201d\u3002<br>\u91cd\u542f\u4e4b\u540e\uff0chomeassistant \u754c\u9762\u4e0a\u51fa\u73b0\u4e86\u5c0f\u706f\u7684\u5f00\u5173\u3002<br>\u5728\u706f\u6ca1\u4eae\u4e4b\u524d\uff0c\u72b6\u6001State\u503c\u662f0\uff0c\u7ee7\u7535\u5668\u6ca1\u5de5\u4f5c<br><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20191020215245166.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3k0NTk1NDExOTU=,size_16,color_FFFFFF,t_70\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"><\/p>\n\n\n\n<p>\u6253\u5f00\u5f00\u5173\uff0c\u7ee7\u7535\u5668\u5de5\u4f5c\uff0c\u706f\u5c31\u4eae\u4e86<br><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20191020214814883.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3k0NTk1NDExOTU=,size_16,color_FFFFFF,t_70\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" width=\"400\" height=\"200\"><br><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20191020222011516.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3k0NTk1NDExOTU=,size_16,color_FFFFFF,t_70\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" width=\"300\" height=\"400\"><br>\u6b64\u65f6\u7684State\u72b6\u6001\u503c\u662f1<br><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20191020220437379.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3k0NTk1NDExOTU=,size_16,color_FFFFFF,t_70\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3.5 HomeKit<\/h4>\n\n\n\n<p>\u8fdb\u5165\u7ea2\u70b9\uff0c\u641c\u7d22\u201chomekit\u201d<br><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20191020222331214.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3k0NTk1NDExOTU=,size_16,color_FFFFFF,t_70\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"><br>\u4e0d\u7528\u914d\u7f6e\uff0c\u70b9\u51fb\u4fdd\u5b58\uff0c\u4e0a\u4f20\u53d1\u5e03\u3002\u91cd\u542fhomeassistant\u540e\uff0c\u53f3\u4e0a\u89d2\u6d88\u606f\u6253\u5f00\u4f1a\u6709\u4e2a8\u4f4dHomeKit\u7801<br><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20191020222221221.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\"><br>\u6253\u5f00\u624b\u673a\u4e0a\u7684HomeKit,\u624b\u673aWiFi\u548c\u6811\u8393\u6d3e\u5728\u540c\u4e00\u4e2a\u5c40\u57df\u7f51\u4e0b\uff0c\u8f93\u51658\u4f4d\u6570\uff0c\u547d\u540d\u4e2a\u623f\u95f4\uff0c\u706f\u4e5f\u91cd\u53ef\u547d\u540d\u3002\u7528\u201cSiri\u201d\u6253\u5f00\u706f<br><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20191020223345344.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3k0NTk1NDExOTU=,size_16,color_FFFFFF,t_70\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" width=\"300\" height=\"430\"><br><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20191020223440957.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3k0NTk1NDExOTU=,size_16,color_FFFFFF,t_70\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" width=\"300\" height=\"430\"><br>\u81f3\u6b64\uff0c\u5c0fdemo\u5b8c\u6210\u4e86\u3002\u53ef\u4ee5\u52a0\u5165\u81ea\u5df1\u611f\u5174\u8da3\u7684\u4f20\u611f\u5668\uff0c\u5982\u6e29\u6e7f\u5ea6\uff0c\u571f\u58e4\u6e7f\u5ea6\uff0c\u89c6\u89c9\u6444\u50cf\u5934\u7b49<\/p>\n\n\n\n<p>\u539f\u6587\uff1a<a href=\"https:\/\/blog.csdn.net\/y459541195\/article\/details\/102645633?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-5.channel_param&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-5.channel_param\" target=\"_blank\" rel=\"noreferrer noopener\" rel=\"nofollow\" >https:\/\/blog.csdn.net\/y459541195\/article\/details\/102645633?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-5.channel_param&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-5.channel_param<\/a><\/p>\n<button class=\"simplefavorite-button\" data-postid=\"698\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"0\" style=\"\">\u6536\u85cf <i class=\"sf-icon-star-empty\"><\/i><\/button>","protected":false},"excerpt":{"rendered":"<p>1. Home Assistant\u4ecb\u7ecd Home Assistant \u662f\u4e00\u6b3e\u57fa\u4e8e Python \u7684\u667a\u80fd\u5bb6\u5c45\u5f00\u6e90\u7cfb\u7edf\uff0c\u652f\u6301\u4f17\u591a\u54c1\u724c\u7684 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,11],"tags":[],"class_list":["post-698","post","type-post","status-publish","format-standard","hentry","category-9","category-11"],"_links":{"self":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts\/698","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=698"}],"version-history":[{"count":0,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts\/698\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=698"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=698"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=698"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}