{"id":736,"date":"2020-08-13T23:04:04","date_gmt":"2020-08-13T15:04:04","guid":{"rendered":"https:\/\/www.iotch.xyz\/?p=736"},"modified":"2020-08-13T23:04:04","modified_gmt":"2020-08-13T15:04:04","slug":"%e6%a0%91%e8%8e%93%e6%b4%be3b%e5%ae%89%e8%a3%85home-assistant","status":"publish","type":"post","link":"https:\/\/www.iotch.xyz\/?p=736","title":{"rendered":"\u6811\u8393\u6d3e3b+\u5b89\u88c5home assistant"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\"><strong>\u6811\u8393\u6d3e3b+\u5b89\u88c5home assistant<\/strong><\/h1>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>\u5b89\u88c5\u6811\u8393\u6d3e\u64cd\u4f5c\u7cfb\u7edf<\/strong><\/li><\/ol>\n\n\n\n<p>\u53c2\u8003\u7f51\u7ad9\u6559\u7a0b\uff1ahttps:\/\/blog.csdn.net\/weixin_39449466\/article\/details\/80686835<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>\u4e0b\u8f7d\u64cd\u4f5c\u7cfb\u7edf<\/strong><\/li><\/ol>\n\n\n\n<p>\u5b98\u7f51\u4e0b\u8f7dRASPBIAN STRETCH WITH DESKTOP\u7248\u672c<\/p>\n\n\n\n<p>\u5730\u5740\uff1a<a href=\"https:\/\/www.raspberrypi.org\/downloads\/raspbian\/\" target=\"_blank\"  rel=\"nofollow\" >https:\/\/www.raspberrypi.org\/downloads\/raspbian\/<\/a><\/p>\n\n\n\n<p>\u4e0b\u8f7d\u540e\u6587\u4ef6\u4e3a\uff1a2018-10-09-raspbian-stretch.zip,\u5927\u5c0f\uff1a1.33 GB<\/p>\n\n\n\n<p>\u89e3\u538b\u540e\u6587\u4ef6\u4e3a\uff1a2018-10-09-raspbian-stretch.img,\u5927\u5c0f\uff1a3.85 GB<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>\u4e0b\u8f7dSD\u5361\u683c\u5f0f\u5316\u8f6f\u4ef6<\/strong><\/li><\/ol>\n\n\n\n<p>\u540d\u79f0\uff1a<a href=\"https:\/\/www.sdcard.org\/downloads\/formatter_4\/eula_windows\/index.html\" target=\"_blank\"  rel=\"nofollow\" >SD card formatter<\/a>&nbsp;, SD_CardFormatter0500SetupEN.exe<\/p>\n\n\n\n<p>\u5927\u5c0f\uff1a6.67 MB<\/p>\n\n\n\n<p>\u4e0b\u8f7d\u5730\u5740\uff1ahttps:\/\/www.sdcard.org\/downloads\/formatter_4\/eula_windows\/index.html<\/p>\n\n\n\n<p>\u5b89\u88c5\u597d\u540e\uff0c\u9009\u62e9sd\u5361\u540e\uff0c\u76f4\u63a5\u70b9quick format\u5c31\u884c\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>\u4e0b\u8f7dSD\u5361\u70e7\u5f55\u8f6f\u4ef6<\/strong><\/li><\/ol>\n\n\n\n<p>\u540d\u79f0\uff1a<a href=\"https:\/\/jaist.dl.sourceforge.net\/project\/win32diskimager\/Archive\/win32diskimager-1.0.0-install.exe\" target=\"_blank\"  rel=\"nofollow\" >win32diskimager<\/a>&nbsp;, win32diskimager-1.0.0-install.exe<\/p>\n\n\n\n<p>\u5927\u5c0f\uff1a11.9 MB<\/p>\n\n\n\n<p>\u4e0b\u8f7d\u5730\u5740\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/jaist.dl.sourceforge.net\/project\/win32diskimager\/Archive\/win32diskimager-1.0.0-install.exe\n<\/div><\/figure>\n\n\n\n<p>\u5b89\u88c5\u597d\u540e\uff0c\u9009\u62e9sd\u5361\uff0c\u9009\u62e9\u521a\u521a\u89e3\u538b\u7684img\u6587\u4ef6\uff0c\u76f4\u63a5\u70b9\u5199\u5165\u5c31\u884c\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>\u4fee\u6539\u914d\u7f6e\uff0c\u652f\u6301HDMI<\/strong><\/li><\/ol>\n\n\n\n<p>\u5728SD\u5361\u7684\u6839\u76ee\u5f55\u4e0b\uff0c\u627e\u5230config.txt\uff0c\u6253\u5f00\u628a\u4e0b\u9762\u7684#\u6ce8\u91ca\u53d6\u6d88\u5c31\u884c\u4e86\u3002<\/p>\n\n\n\n<p># uncomment if hdmi display is not detected and composite is being output<\/p>\n\n\n\n<p>hdmi_force_hotplug=1#<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>\u4fee\u6539\u914d\u7f6e\uff0c\u652f\u6301SSH<\/strong><\/li><\/ol>\n\n\n\n<p>\u6253\u5f00cmd\u547d\u4ee4\u7a97\u53e3\uff0c\u8f93\u5165SD\u5361\u6240\u5728\u76d8\u7b26\uff0c\u8f93\u5165echo &gt;ssh\u3002<\/p>\n\n\n\n<p>\u56e0\u4e3a\u76ee\u524d\u5b98\u65b9\u7cfb\u7edf\u9ed8\u8ba4\u4e0d\u5f00\u542fssh\uff0c\u5728\u6839\u76ee\u5f55\u4e0b\u5efa\u7acb\u8fd9\u4e2a\u6587\u4ef6\u53ef\u4ee5ssh\u4e86\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>\u63d2\u5165SD\u5361<\/strong><\/li><\/ol>\n\n\n\n<p>\u5c06SD\u62d4\u51fa\uff0c\u63d2\u5165\u6811\u8393\u6d3e\u4e2d\uff0c\u4e0a\u7535\u542f\u52a8\u6811\u8393\u6d3e\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>\u7b2c\u4e00\u6b21\u542f\u52a8\u914d\u7f6e<\/strong><ol><li><strong>\u914d\u7f6e\u65f6\u533a\u3001\u8bed\u8a00\u3001wifi\u7b49<\/strong><\/li><\/ol><\/li><\/ol>\n\n\n\n<p>\u6309\u7167\u56fe\u5f62\u754c\u9762\u7684\u63d0\u793a\uff0c\u628a\u8fd9\u4e9b\u90fd\u914d\u7f6e\u597d\u5c31\u884c\u4e86<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>\u6269\u5c55\u7cfb\u7edf\u7a7a\u95f4<\/strong><\/li><\/ol>\n\n\n\n<p>\u5728ssh\u4e2d\u8f93\u5165\uff1a<\/p>\n\n\n\n<p>sudo raspi-config<\/p>\n\n\n\n<p>\u7136\u540e\u9009\u62e9\u7b2c\u4e00\u4e2aExpandFilesystem\u3002OK<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>\u66f4\u6539\u5bc6\u7801<\/strong><\/li><\/ol>\n\n\n\n<p>\u5982\u679c\u4e4b\u524d\u6539\u8fc7\u5bc6\u7801\u4e86\uff0c\u90a3\u4e48\u5c31\u4e0d\u7528\u6539\u4e86\uff0c\u6ca1\u6539\u7684\u8bdd\uff0c\u6309\u7167\u4e0b\u9762\u6539\u5bc6\u7801\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u521a\u624d\u7684\u8bbe\u7f6e\u754c\u9762\u6ca1\u9000\u51fa \u9009\u62e9 2 Change User Password\u5c31\u53ef\u4ee5<\/p>\n\n\n\n<p>\u5982\u679c\u521a\u624d\u9000\u51fa\u4e86 \u518d\u6b21\u8f93\u5165sudo raspi-config\u5c31\u884c\u4e86<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>\u66f4\u6362\u7cfb\u7edf\u56fd\u5185\u6e90<\/strong><\/li><\/ol>\n\n\n\n<p>\u53c2\u8003\u5730\u5740\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/bbs.hassbian.com\/forum.php?mod=viewthread&tid=4013&highlight=%E6%A0%91%E8%8E%93%E6%B4%BE%2B%E7%B3%BB%E7%BB%9F\n<\/div><\/figure>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>\u4fee\u6539\u6811\u8393\u6d3eRaspbian \u7cfb\u7edf\u6e90<\/strong><\/li><\/ol>\n\n\n\n<p>sudo nano \/etc\/apt\/sources.list<\/p>\n\n\n\n<p>\u5982\u4e0b\uff1a\u6ce8\u610f\u8981\u770b\u81ea\u5df1\u7684\u7cfb\u7edf\u7248\u672c\uff08stretch\uff09<\/p>\n\n\n\n<p>#deb&nbsp;<a href=\"http:\/\/raspbian.raspberrypi.org\/raspbian\/\" target=\"_blank\"  rel=\"nofollow\" >http:\/\/raspbian.raspberrypi.org\/raspbian\/<\/a>&nbsp;stretch main contrib non-free rpi<\/p>\n\n\n\n<p># Uncomment line below then 'apt-get update' to enable 'apt-get source'<\/p>\n\n\n\n<p>#deb-src&nbsp;<a href=\"http:\/\/raspbian.raspberrypi.org\/raspbian\/\" target=\"_blank\"  rel=\"nofollow\" >http:\/\/raspbian.raspberrypi.org\/raspbian\/<\/a>&nbsp;stretch main contrib non-free rpi<\/p>\n\n\n\n<p>#deb&nbsp;<a href=\"http:\/\/mirrors.aliyun.com\/raspbian\/raspbian\/\" target=\"_blank\"  rel=\"nofollow\" >http:\/\/mirrors.aliyun.com\/raspbian\/raspbian\/<\/a>&nbsp;stretch main contrib non-free rpi<\/p>\n\n\n\n<p>#\u79d1\u5927\u6e90<\/p>\n\n\n\n<p>deb&nbsp;<a href=\"http:\/\/mirrors.ustc.edu.cn\/raspbian\/raspbian\/\" target=\"_blank\"  rel=\"nofollow\" >http:\/\/mirrors.ustc.edu.cn\/raspbian\/raspbian\/<\/a>&nbsp;stretch main contrib non-free rpi&nbsp;<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>\u4fee\u6539debian\u8f6f\u4ef6\u6e90<\/strong><\/li><\/ol>\n\n\n\n<p>sudo nano \/etc\/apt\/sources.list.d\/raspi.list<\/p>\n\n\n\n<p>\u5982\u4e0b\uff1a<\/p>\n\n\n\n<p>#deb&nbsp;<a href=\"http:\/\/archive.raspberrypi.org\/debian\/\" target=\"_blank\"  rel=\"nofollow\" >http:\/\/archive.raspberrypi.org\/debian\/<\/a>&nbsp;stretch main ui<\/p>\n\n\n\n<p># Uncomment line below then 'apt-get update' to enable 'apt-get source'<\/p>\n\n\n\n<p>#deb-src&nbsp;<a href=\"http:\/\/archive.raspberrypi.org\/debian\/\" target=\"_blank\"  rel=\"nofollow\" >http:\/\/archive.raspberrypi.org\/debian\/<\/a>&nbsp;stretch main ui<\/p>\n\n\n\n<p>#deb&nbsp;<a href=\"http:\/\/mirrors.aliyun.com\/debian\/\" target=\"_blank\"  rel=\"nofollow\" >http:\/\/mirrors.aliyun.com\/debian\/<\/a>&nbsp;stretch main ui<\/p>\n\n\n\n<p>#\u79d1\u5927\u6e90<\/p>\n\n\n\n<p>deb&nbsp;<a href=\"http:\/\/mirrors.ustc.edu.cn\/archive.raspberrypi.org\/debian\/\" target=\"_blank\"  rel=\"nofollow\" >http:\/\/mirrors.ustc.edu.cn\/archive.raspberrypi.org\/debian\/<\/a>&nbsp;stretch main ui<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>\u66f4\u6539pip\u7684\u56fd\u5185\u7684\u6e90<\/strong><\/li><\/ol>\n\n\n\n<p>\u6211\u7684pip\u914d\u7f6e\u6587\u4ef6\u5728\/etc\/pip.conf<\/p>\n\n\n\n<p>pi@raspberrypi:~ $ nano \/etc\/pip.conf<\/p>\n\n\n\n<p>\u628a\u539f\u6765\u7684\u7528#\u6ce8\u91ca\u6389\uff0c\u7136\u540e\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u5199\u5165<\/p>\n\n\n\n<p>[global]<\/p>\n\n\n\n<p>index-url =&nbsp;<a href=\"https:\/\/pypi.mirrors.ustc.edu.cn\/simple\/\" target=\"_blank\"  rel=\"nofollow\" >https:\/\/pypi.mirrors.ustc.edu.cn\/simple\/<\/a><\/p>\n\n\n\n<p>[install]<\/p>\n\n\n\n<p>trusted-host = pypi.mirrors.ustc.edu.cn<\/p>\n\n\n\n<p>\u4fdd\u5b58\u540e\uff0c\u6267\u884c<\/p>\n\n\n\n<p><strong>sudo apt-get update<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>\u914d\u7f6eVNC<\/strong><\/li><\/ol>\n\n\n\n<p>\u6309\u7167\u6811\u8393\u6d3e\u5b98\u7f51\u6559\u7a0b\u6765\u505a<\/p>\n\n\n\n<p>\u5730\u5740\uff1a<a href=\"https:\/\/www.raspberrypi.org\/documentation\/remote-access\/vnc\/\" target=\"_blank\"  rel=\"nofollow\" >https:\/\/www.raspberrypi.org\/documentation\/remote-access\/vnc\/<\/a><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>Enabling VNC Server(\u5b89\u88c5VNC\u670d\u52a1\u7aef)<\/strong><\/li><\/ol>\n\n\n\n<p><code>sudo apt<\/code>-<code>get update<\/code><\/p>\n\n\n\n<p><code>sudo apt<\/code>-<code>get install realvnc<\/code>-<code>vnc<\/code>-<code>server realvnc<\/code>-<code>vnc<\/code>-<code>viewer<\/code><\/p>\n\n\n\n<p>\u5b89\u88c5\u597d\u4e4b\u540e\uff0c\u6709\u4e24\u79cd\u5f00\u542f\u6a21\u5f0f\uff0c\u56fe\u5f62\u754c\u9762\u64cd\u4f5c\u548c\u547d\u4ee4\u884c<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><ol><li><strong>\u56fe\u5f62\u754c\u9762<\/strong><\/li><\/ol><\/li><li>On your Raspberry Pi, boot into the graphical desktop.<\/li><li>Select&nbsp;Menu &gt; Preferences &gt; Raspberry Pi Configuration &gt; Interfaces.<\/li><li>Ensure&nbsp;VNC&nbsp;is&nbsp;Enabled.<\/li><li>\u5176\u5b9e\u8fd9\u4e2a\u5730\u65b9\u4e5f\u53ef\u4ee5\u5f00\u542fSSH\u670d\u52a1\u7b49<ol><li><strong>\u547d\u4ee4\u884c<\/strong><\/li><\/ol><\/li><\/ol>\n\n\n\n<ol class=\"wp-block-list\"><li>sudo raspi-config<\/li><li>Navigate to&nbsp;Interfacing Options.<\/li><li>Scroll down and select&nbsp;VNC &gt; Yes.<ol><li><strong>Windows\u7aef<\/strong><\/li><\/ol><\/li><\/ol>\n\n\n\n<p>\u6587\u4ef6\uff1aVNC-Viewer-6.18.907-Windows.exe<\/p>\n\n\n\n<p>\u5927\u5c0f\uff1a9.53 MB<\/p>\n\n\n\n<p>\u4e0b\u8f7d\u5730\u5740\uff1a<a href=\"https:\/\/www.realvnc.com\/en\/connect\/download\/viewer\/\" target=\"_blank\"  rel=\"nofollow\" >https:\/\/www.realvnc.com\/en\/connect\/download\/viewer\/<\/a><\/p>\n\n\n\n<p>\u5b89\u88c5\u597d\u4e4b\u540e\uff0c\u76f4\u63a5\u5728\u8f93\u5165\u6846\u4e2d\u8f93\u5165\u6811\u8393\u6d3e\u7684ip\u5730\u5740\uff0c\u7136\u540e\u6839\u636e\u63d0\u793a\u8f93\u5165\u7528\u6237\u540d\u548c\u5bc6\u7801\u5c31\u53ef\u4ee5\u8fdc\u7a0b\u63a7\u5236\u6811\u8393\u6d3e\u4e86\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>\u5b89\u88c5Home Assistant<\/strong><\/li><\/ol>\n\n\n\n<p>\u6211\u6ca1\u6709\u7528hass.io\u7684\u65b9\u5f0f\u6765\u5b89\u88c5<\/p>\n\n\n\n<p>\u53c2\u8003\u5b98\u7f51\u6559\u7a0b\uff1a<a href=\"https:\/\/www.home-assistant.io\/docs\/installation\/raspberry-pi\/\" target=\"_blank\"  rel=\"nofollow\" >https:\/\/www.home-assistant.io\/docs\/installation\/raspberry-pi\/<\/a><\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/www.home-assistant.io\/docs\/installation\/hassbian\/#\n<\/div><\/figure>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>\u524d\u7f6e\u6761\u4ef6<\/strong><\/li><\/ol>\n\n\n\n<p>You must have Python 3.5.3 or later installed (including the package&nbsp;python3-dev) which is the case for Raspbian Stretch.<\/p>\n\n\n\n<p>\u6211\u4e4b\u524d\u4e0b\u8f7d\u7684\u7cfb\u7edf\u5c31\u662f\u5b98\u7f51\u6700\u65b0\u76842018-10-9\u7684Raspbian Stretch\uff0c\u6ee1\u8db3\u4e86\u8fd9\u4e2apython\u7248\u672c\u8981\u6c42\uff0c\u5b83\u5305\u542b\u4e86\u4e24\u4e2a\u7248\u672c\u7684python\uff0c2.7\u548c3.5.3<\/p>\n\n\n\n<p>pi@raspberrypi:~ $ python<\/p>\n\n\n\n<p>Python 2.7.13 (default, Sep 26 2018, 18:42:22)<\/p>\n\n\n\n<p>[GCC 6.3.0 20170516] on linux2<\/p>\n\n\n\n<p>Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.<\/p>\n\n\n\n<p>&gt;&gt;&gt;<\/p>\n\n\n\n<p>pi@raspberrypi:~ $ python3<\/p>\n\n\n\n<p>Python 3.5.3 (default, Sep 27 2018, 17:25:39)<\/p>\n\n\n\n<p>[GCC 6.3.0 20170516] on linux<\/p>\n\n\n\n<p>Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.<\/p>\n\n\n\n<p>&gt;&gt;&gt;<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>\u5f00\u59cb\u5b89\u88c5<\/strong><\/li><\/ol>\n\n\n\n<p>$ sudo apt-get update<\/p>\n\n\n\n<p>$ sudo apt-get upgrade \u2013y<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Install the dependencies.<\/li><\/ol>\n\n\n\n<p>$ sudo apt-get install python3 python3-venv python3-pip<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u521b\u5efahomeassistant\u7528\u6237<\/li><\/ol>\n\n\n\n<p>$ sudo useradd -rm homeassistant -G dialout,gpio<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u8bbe\u7f6ehomeassistant\u7528\u6237\u5bc6\u7801<\/li><\/ol>\n\n\n\n<p>pi@raspberrypi:~ $ sudo passwd homeassistant<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u521b\u5efahomeassistant\u5de5\u4f5c\u76ee\u5f55<\/li><\/ol>\n\n\n\n<p>$ cd \/srv<\/p>\n\n\n\n<p>$ sudo mkdir homeassistant<\/p>\n\n\n\n<p>$ sudo chown homeassistant:homeassistant homeassistant<\/p>\n\n\n\n<p>$ sudo -u homeassistant -H \u2013S<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u521b\u5efapython3\u865a\u62df\u73af\u5883<\/li><\/ol>\n\n\n\n<p>$ cd \/srv\/homeassistant<\/p>\n\n\n\n<p>$ python3 -m venv .<\/p>\n\n\n\n<p>$ source bin\/activate<\/p>\n\n\n\n<p>(homeassistant) homeassistant@raspberrypi:\/srv\/homeassistant $ python3 -m pip install wheel<\/p>\n\n\n\n<p>(homeassistant) homeassistant@raspberrypi:\/srv\/homeassistant $ pip3 install homeassistant<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>\u9519\u8bef<\/strong><\/li><\/ol>\n\n\n\n<p>Requirement already satisfied, skipping upgrade: MarkupSafe&gt;=0.23 in \/srv\/homeassistant\/lib\/python3.6\/site-packages (from jinja2&gt;=2.10-&gt;homeassistant) (1.0)<br>Requirement already satisfied, skipping upgrade: pycparser in \/srv\/homeassistant\/lib\/python3.6\/site-packages (from cffi!=1.11.3,&gt;=1.7-&gt;cryptography==2.3.1-&gt;homeassistant) (2.19)<br>Building wheels for collected packages: cryptography, bcrypt, cffi<br>&nbsp;&nbsp;Running setup.py bdist_wheel for cryptography ... error<br>&nbsp;&nbsp;Complete output from command \/srv\/homeassistant\/bin\/python3 -u -c \"import setuptools, tokenize;__file__='\/tmp\/pip-install-cl03y186\/cryptography\/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))\" bdist_wheel -d \/tmp\/pip-wheel-zady7x64 --python-tag cp36:<br>&nbsp;&nbsp;c\/_cffi_backend.c:2:20: fatal error: Python.h: No such file or directory<br>&nbsp;&nbsp;compilation terminated.<br>&nbsp;&nbsp;Traceback (most recent call last):<br>&nbsp; &nbsp; File \"\/usr\/lib\/python3.6\/distutils\/unixccompiler.py\", line 118, in _compile<br>&nbsp; &nbsp;&nbsp; &nbsp;extra_postargs)<br>&nbsp; &nbsp; File \"\/usr\/lib\/python3.6\/distutils\/ccompiler.py\", line 909, in spawn<br>&nbsp; &nbsp;&nbsp; &nbsp;spawn(cmd, dry_run=self.dry_run)<br>&nbsp; &nbsp; File \"\/usr\/lib\/python3.6\/distutils\/spawn.py\", line 36, in spawn<br>&nbsp; &nbsp;&nbsp; &nbsp;_spawn_posix(cmd, search_path, dry_run=dry_run)<br>&nbsp; &nbsp; File \"\/usr\/lib\/python3.6\/distutils\/spawn.py\", line 159, in _spawn_posix<br>&nbsp; &nbsp;&nbsp; &nbsp;% (cmd, exit_status))<br>&nbsp;&nbsp;distutils.errors.DistutilsExecError: command 'arm-linux-gnueabihf-gcc' failed with exit status 1<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><ol><li><strong>\u89e3\u51b3<\/strong><\/li><\/ol><\/li><\/ol>\n\n\n\n<p>sudo apt-get install build-essential libssl-dev libffi-dev python-dev<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>\u5982\u4f55\u542f\u52a8<\/strong><\/li><\/ol>\n\n\n\n<p>\u7b2c\u4e00\u6b65\uff1a\u5207\u6362\u5230homeassistant\u7528\u6237\u4e0b<\/p>\n\n\n\n<p>\u7b2c\u4e8c\u6b65\uff1a\u8fdb\u5165python3\u7684\u865a\u62df\u73af\u5883\u76ee\u5f55<\/p>\n\n\n\n<p>\u7b2c\u4e09\u6b65\uff1a\u542f\u52a8hass<\/p>\n\n\n\n<p>sudo -u homeassistant -H -s<\/p>\n\n\n\n<p>cd \/srv\/homeassistant<\/p>\n\n\n\n<p>source bin\/activate<\/p>\n\n\n\n<p><strong>(<\/strong>homeassistant<strong>)<\/strong> $ hass<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8<\/strong><\/li><\/ol>\n\n\n\n<p>\u8fd9\u91cc\u6211\u91c7\u7528\u4e86<a href=\"https:\/\/www.home-assistant.io\/docs\/autostart\/init.d\/\" target=\"_blank\"  rel=\"nofollow\" >init.d (Linux)<\/a>\u7684\u65b9\u5f0f\u6765\u8bbe\u7f6e<\/p>\n\n\n\n<p>\u5b98\u7f51\u914d\u7f6e\u5730\u5740\uff1a<a href=\"https:\/\/www.home-assistant.io\/docs\/autostart\/init.d\/\" target=\"_blank\"  rel=\"nofollow\" >https:\/\/www.home-assistant.io\/docs\/autostart\/init.d\/<\/a><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><ol><li><strong>\u521b\u5efa\u811a\u672c<\/strong><\/li><\/ol><\/li><\/ol>\n\n\n\n<p>pi@raspberrypi:~ $ cd \/etc\/init.d\/<\/p>\n\n\n\n<p>pi@raspberrypi:\/etc\/init.d $ nano hass-daemon<\/p>\n\n\n\n<p>\u5c06\u4ee5\u4e0b\u811a\u672c\u5168\u90e8\u590d\u5236\u5230hass-daemon\u4e2d<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><ol><li><strong>\u811a\u672c\u5185\u5bb9<\/strong><\/li><\/ol><\/li><\/ol>\n\n\n\n<p>#!\/bin\/sh<\/p>\n\n\n\n<p>### BEGIN INIT INFO<\/p>\n\n\n\n<p># Provides:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hass<\/p>\n\n\n\n<p># Required-Start:&nbsp;&nbsp;&nbsp; $local_fs $network $named $time $syslog<\/p>\n\n\n\n<p># Required-Stop:&nbsp;&nbsp;&nbsp;&nbsp; $local_fs $network $named $time $syslog<\/p>\n\n\n\n<p># Default-Start:&nbsp;&nbsp;&nbsp;&nbsp; 2 3 4 5<\/p>\n\n\n\n<p># Default-Stop:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 1 6<\/p>\n\n\n\n<p># Description:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Home\\ Assistant<\/p>\n\n\n\n<p>### END INIT INFO<\/p>\n\n\n\n<p># \/etc\/init.d Service Script for Home Assistant<\/p>\n\n\n\n<p># Created with: https:\/\/gist.github.com\/naholyr\/4275302#file-new-service-sh<\/p>\n\n\n\n<p>PRE_EXEC=\"cd \/srv\/homeassistant; python3 -m venv .; source bin\/activate;\"<\/p>\n\n\n\n<p># Typically \/usr\/bin\/hass<\/p>\n\n\n\n<p>HASS_BIN=\"hass\"<\/p>\n\n\n\n<p>RUN_AS=\"homeassistant\"<\/p>\n\n\n\n<p>PID_DIR=\"\/var\/run\/hass\"<\/p>\n\n\n\n<p>PID_FILE=\"$PID_DIR\/hass.pid\"<\/p>\n\n\n\n<p>CONFIG_DIR=\"\/home\/$RUN_AS\/.homeassistant\"<\/p>\n\n\n\n<p>LOG_DIR=\"\/var\/log\/homeassistant\"<\/p>\n\n\n\n<p>LOG_FILE=\"$LOG_DIR\/home-assistant.log\"<\/p>\n\n\n\n<p>FLAGS=\"-v --config $CONFIG_DIR --pid-file $PID_FILE --log-file $LOG_FILE --daemon\"<\/p>\n\n\n\n<p>start() {<\/p>\n\n\n\n<p>&nbsp; create_piddir<\/p>\n\n\n\n<p>&nbsp; if [ -f $PID_FILE ] &amp;&amp; kill -0 $(cat $PID_FILE) 2&gt; \/dev\/null; then<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; echo 'Service already running' &gt;&amp;2<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; return 1<\/p>\n\n\n\n<p>&nbsp; fi<\/p>\n\n\n\n<p>&nbsp; echo -n 'Starting service\u2026 ' &gt;&amp;2<\/p>\n\n\n\n<p>&nbsp; local CMD=\"$PRE_EXEC $HASS_BIN $FLAGS;\"<\/p>\n\n\n\n<p>&nbsp; su -s \/bin\/bash -c \"$CMD\" $RUN_AS<\/p>\n\n\n\n<p>&nbsp; if [ $? -ne 0 ]; then<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; echo \"Failed\" &gt;&amp;2<\/p>\n\n\n\n<p>&nbsp; else<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; echo 'Done' &gt;&amp;2<\/p>\n\n\n\n<p>&nbsp; fi<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>stop() {<\/p>\n\n\n\n<p>&nbsp; if [ ! -f \"$PID_FILE\" ] || ! kill -0 $(cat \"$PID_FILE\") 2&gt; \/dev\/null; then<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; echo 'Service not running' &gt;&amp;2<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; return 1<\/p>\n\n\n\n<p>&nbsp; fi<\/p>\n\n\n\n<p>&nbsp; echo -n 'Stopping service\u2026 ' &gt;&amp;2<\/p>\n\n\n\n<p>&nbsp; kill $(cat \"$PID_FILE\")<\/p>\n\n\n\n<p>&nbsp; while ps -p $(cat \"$PID_FILE\") &gt; \/dev\/null 2&gt;&amp;1; do sleep 1;done;<\/p>\n\n\n\n<p>&nbsp; rm -f $PID_FILE<\/p>\n\n\n\n<p>&nbsp; echo 'Done' &gt;&amp;2<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>install() {<\/p>\n\n\n\n<p>&nbsp; echo \"Installing Home Assistant Daemon (hass-daemon)\"<\/p>\n\n\n\n<p>&nbsp; update-rc.d hass-daemon defaults<\/p>\n\n\n\n<p>&nbsp; create_piddir<\/p>\n\n\n\n<p>&nbsp; mkdir -p $CONFIG_DIR<\/p>\n\n\n\n<p>&nbsp; chown $RUN_AS $CONFIG_DIR<\/p>\n\n\n\n<p>&nbsp; mkdir -p $LOG_DIR<\/p>\n\n\n\n<p>&nbsp; chown $RUN_AS $LOG_DIR<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>uninstall() {<\/p>\n\n\n\n<p>&nbsp; echo \"Are you really sure you want to uninstall this service? The INIT script will\"<\/p>\n\n\n\n<p>&nbsp; echo -n \"also be deleted! That cannot be undone. [yes|No] \"<\/p>\n\n\n\n<p>&nbsp; local SURE<\/p>\n\n\n\n<p>&nbsp; read SURE<\/p>\n\n\n\n<p>&nbsp; if [ \"$SURE\" = \"yes\" ]; then<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; stop<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; remove_piddir<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; echo \"Notice: The config directory has not been removed\"<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; echo $CONFIG_DIR<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; echo \"Notice: The log directory has not been removed\"<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; echo $LOG_DIR<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; update-rc.d -f hass-daemon remove<\/p>\n\n\n\n<p>&nbsp; &nbsp;&nbsp;rm -fv \"$0\"<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; echo \"Home Assistant Daemon has been removed. Home Assistant is still installed.\"<\/p>\n\n\n\n<p>&nbsp; fi<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>create_piddir() {<\/p>\n\n\n\n<p>&nbsp; if [ ! -d \"$PID_DIR\" ]; then<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; mkdir -p $PID_DIR<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; chown $RUN_AS \"$PID_DIR\"<\/p>\n\n\n\n<p>&nbsp; fi<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>remove_piddir() {<\/p>\n\n\n\n<p>&nbsp; if [ -d \"$PID_DIR\" ]; then<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; if [ -e \"$PID_FILE\" ]; then<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rm -fv \"$PID_FILE\"<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; fi<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; rmdir -fv \"$PID_DIR\"<\/p>\n\n\n\n<p>&nbsp; fi<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>case \"$1\" in<\/p>\n\n\n\n<p>&nbsp; start)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; start<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; ;;<\/p>\n\n\n\n<p>&nbsp; stop)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; stop<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; ;;<\/p>\n\n\n\n<p>&nbsp; install)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; install<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; ;;<\/p>\n\n\n\n<p>&nbsp; uninstall)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; uninstall<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; ;;<\/p>\n\n\n\n<p>&nbsp; restart)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; stop<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; start<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; ;;<\/p>\n\n\n\n<p>&nbsp; *)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; echo \"Usage: $0 {start|stop|restart|install|uninstall}\"<\/p>\n\n\n\n<p>esac<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><ol><li><strong>\u6ce8\u518c\u81ea\u542f\u52a8\u670d\u52a1<\/strong><\/li><\/ol><\/li><\/ol>\n\n\n\n<p>$ sudo service hass-daemon install<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><ol><li><strong>\u5176\u4ed6\u8bf4\u660e<\/strong><\/li><\/ol><\/li><li>SELECT A USER.(\u8bbe\u7f6e\u8fd0\u884chass\u7684\u7528\u6237)<\/li><\/ol>\n\n\n\n<p>Create or pick a user that the Home Assistant daemon will run under. Update script to set&nbsp;<code>RUN_AS<\/code>&nbsp;to the username that should be used to execute hass.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>CHANGE HASS EXECUTABLE AND OTHER VARIABLES IF REQUIRED. (\u8bbe\u7f6e\u8fd0\u884chass\u7684\u5de5\u4f5c\u76ee\u5f55\u548c\u5176\u4ed6\u53d8\u91cf)<\/li><\/ol>\n\n\n\n<p>Some installation environments may require a change in the Home Assistant executable&nbsp;<code>hass<\/code>. Update script to set&nbsp;<code>HASS_BIN<\/code>&nbsp;to the appropriate&nbsp;<code>hass<\/code>&nbsp;executable path. Please also check the other variables for the appropriate value. In general the defaults should work<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u6211\u4e0d\u77e5\u9053\u4e3a\u4ec0\u4e48\u5728\u5b89\u88c5\u5b8c\u4e4b\u540e\uff0c\u76f4\u63a5\u8fd0\u884chass\uff0cweb\u7aef\u5c31\u662f\u4e0d\u80fd\u8bbf\u95eehass\uff0c\u8bbe\u7f6e\u5f00\u542f\u542f\u52a8\u540e\u5c31\u80fd\u8bbf\u95ee\u4e86\uff0c\u5947\u602a\u3002<ol><li><strong>\u91cd\u542f\u6811\u8393\u6d3e<\/strong><\/li><\/ol><\/li><\/ol>\n\n\n\n<p>pi@raspberrypi:~ $ reboot<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>web\u8bbf\u95eeHome Assistant<\/strong><\/li><\/ol>\n\n\n\n<p>\u5728Windows\u4e0a\u6253\u5f00<a href=\"https:\/\/blog.csdn.net\/zzzzzqf\/article\/details\/86637752\" target=\"_blank\"  rel=\"nofollow\" >http:\/\/\u6811\u8393\u6d3eIP:8123<\/a><\/p>\n\n\n\n<p>\u7b2c\u4e00\u6b21\u8bbf\u95ee\u7684\u8bdd\uff0c\u8fd8\u9700\u8981\u8bbe\u7f6e\u7528\u6237\u540d\u548c\u5bc6\u7801\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20190125102752993.jpeg?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3p6enp6cWY=,size_16,color_FFFFFF,t_70\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>\u5347\u7ea7Home Assistant<\/strong><\/li><\/ol>\n\n\n\n<p>To update to the latest version of Home Assistant follow these simple steps:<\/p>\n\n\n\n<p>$ sudo -u homeassistant -H -s<\/p>\n\n\n\n<p>$ source \/srv\/homeassistant\/bin\/activate<\/p>\n\n\n\n<p>$ pip3 install --upgrade homeassistant<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>Mosquitto\u5b89\u88c5(MQTT)<\/strong><ol><li><strong>\u5b89\u88c5&amp;&amp;\u914d\u7f6emqtt<\/strong><\/li><\/ol><\/li><\/ol>\n\n\n\n<p>#\u66f4\u65b0\u4e0b\u7cfb\u7edf\uff0c\u66f4\u65b0\u524d\u8bb0\u5f97\u6539\u56fd\u5185\u6e90\uff0c\u4e0d\u77e5\u600e\u4e48\u66f4\u6362\u7684\u770b\u8fd9\u8d34\uff1ahttp:\/\/bbs.hassbian.com\/thread-27-1-1.html<\/p>\n\n\n\n<p>sudo apt-get update<\/p>\n\n\n\n<p>sudo apt-get upgrade -y<\/p>\n\n\n\n<p>#\u5b89\u88c5mosquitto\u548cmosquitto-clients\uff08\u540e\u8005\u4e3b\u8981\u7528\u4e8e\u6d4b\u8bd5\uff0c\u5982\u679c\u4e0d\u60f3\u6d4b\u8bd5\uff0c\u53ef\u4ee5\u53ea\u5b89\u88c5\u524d\u8005\uff09<\/p>\n\n\n\n<p>sudo apt-get install mosquitto mosquitto-clients<\/p>\n\n\n\n<p>#\u66f4\u6539mqtt\u8bbe\u7f6e<\/p>\n\n\n\n<p>sudo nano \/etc\/mosquitto\/conf.d\/mqtt.conf<\/p>\n\n\n\n<p>#\u5728\u4e0a\u9762\u6587\u4ef6\u91cc\u52a0\u5165\uff1a<\/p>\n\n\n\n<p>allow_anonymous false<\/p>\n\n\n\n<p>password_file \/etc\/mosquitto\/pwfile<\/p>\n\n\n\n<p>#\u8bbe\u7f6e\u7528\u6237\u548c\u5bc6\u7801\uff0c\u8fd9\u91cc\u7528\u6237\u4e3amqtt\uff0c\u53ef\u6539\u4e3a\u4f60\u60f3\u8bbe\u7684\u7528\u6237\u540d\uff0c\u5bc6\u7801\u81ea\u8bbe\uff0c\u8fd9\u91cc\u90fd\u8bbe\u4e3amqtt<\/p>\n\n\n\n<p>sudo mosquitto_passwd -c \/etc\/mosquitto\/pwfile mqtt<\/p>\n\n\n\n<p>#\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8\uff0c\u4ee5\u53ca\u542f\u52a8\uff0c\u505c\u6b62\uff0c\u91cd\u542f\u4ee3\u7801\uff08enable\u4e3a\u5f00\u673a\u542f\u52a8\uff0c\u5176\u4ed6\u4f60\u4eec\u61c2\u7684\uff09\uff1a<\/p>\n\n\n\n<p>sudo \/etc\/init.d\/mosquitto enable|disable|start|stop|restart|reload|<\/p>\n\n\n\n<p>#\u91cd\u542f\u7cfb\u7edf<\/p>\n\n\n\n<p>sudo reboot<\/p>\n\n\n\n<p>#\u6d4b\u8bd5MQTT\uff0c\u5728\u4e00\u4e2a\u7ec8\u7aef\u4e0b\u53d1\u5e03\uff0c\u53e6\u4e2a\u7ec8\u7aef\u4e0b\u63a5\u6536\uff0c\u6d4b\u8bd5\u662f\u5426\u6210\u529f\u3002\u770b\u4e0d\u61c2\u6b64\u6761\u8005\u8bf7\u5ffd\u7565\u3002<\/p>\n\n\n\n<p>mosquitto_sub -d -u mqtt -P mqtt -t dev\/test<\/p>\n\n\n\n<p>mosquitto_pub -d -u mqtt -P mqtt -t dev\/test -m \"hello world\"<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>\u914d\u7f6ehome assistant<\/strong><\/li><\/ol>\n\n\n\n<p>\u5728configuration.yaml\u6587\u4ef6\u4e2d\u52a0\u5165<\/p>\n\n\n\n<p>mqtt:<\/p>\n\n\n\n<p>&nbsp; broker: 192.168.1.4<\/p>\n\n\n\n<p>&nbsp; port: 1883<\/p>\n\n\n\n<p>&nbsp; username: mqtt<\/p>\n\n\n\n<p>&nbsp; password: mqtt<\/p>\n\n\n\n<p>&nbsp; discovery: true<\/p>\n\n\n\n<p>broker\u7684ip\u6539\u4e3a\u81ea\u5df1\u5b89\u88c5mqtt\u673a\u5668\u7684IP\u5730\u5740\u5373\u53ef<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>samba\u5b89\u88c5<\/strong><\/li><\/ol>\n\n\n\n<p>#\u5b89\u88c5\u914d\u7f6esamba<\/p>\n\n\n\n<p>sudo apt-get install samba<\/p>\n\n\n\n<p>\u590d\u5236\u4ee3\u7801<\/p>\n\n\n\n<p><br><br>#\u6dfb\u52a0\u4e00\u4e2asamba\u8d26\u6237\uff0c\u5e76\u8bbe\u7f6e\u4e00\u4e2a\u5bc6\u7801\uff0c\u4e00\u5b9a\u8981\u8bb0\u4f4f\uff0c\u4ee5\u540e\u8bbf\u95ee\u65f6\u9700\u8981<\/p>\n\n\n\n<p>sudo smbpasswd -a homeassistant<\/p>\n\n\n\n<p>\u590d\u5236\u4ee3\u7801<\/p>\n\n\n\n<p><br><br>#\u7f16\u8f91samba\u914d\u7f6e<\/p>\n\n\n\n<p>sudo nano \/etc\/samba\/smb.conf<\/p>\n\n\n\n<p>\u590d\u5236\u4ee3\u7801<\/p>\n\n\n\n<p><br><br>#\u5c06\u4ee5\u4e0b\u5185\u5bb9\u52a0\u5165\u5230smb.conf\u7684\u6700\u540e\u9762<\/p>\n\n\n\n<p>--------------------------------------<\/p>\n\n\n\n<p>[HomeAssistant]<\/p>\n\n\n\n<p>&nbsp; &nbsp;comment = HomeAssistant<\/p>\n\n\n\n<p>&nbsp; &nbsp;browseable = yes<\/p>\n\n\n\n<p>&nbsp; &nbsp;read only = no<\/p>\n\n\n\n<p>&nbsp; &nbsp;path = \/home\/homeassistant\/.homeassistant<\/p>\n\n\n\n<p>&nbsp; &nbsp;valid users = homeassistant<\/p>\n\n\n\n<p>--------------------------------------<\/p>\n\n\n\n<p>\u590d\u5236\u4ee3\u7801<\/p>\n\n\n\n<p><br><br><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"https:\/\/img-blog.csdnimg.cn\/20190125102752941.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3p6enp6cWY=,size_16,color_FFFFFF,t_70\" width=\"982\" height=\"373\">&nbsp;<br><br>#\u91cd\u542fsamba\u670d\u52a1<\/p>\n\n\n\n<p>sudo service smbd restart<\/p>\n\n\n\n<p>\u590d\u5236\u4ee3\u7801<\/p>\n\n\n\n<p><br><br>#\u5728windows\u4e2d\uff0c\u7f51\u7edc\u4e2d\u626b\u63cf\u4e0d\u5230\u7684\u8bdd\uff0c\u76f4\u63a5Win+R\u6253\u5f00\u8fd0\u884c\u7a97\u53e3\uff0c\u8f93\u5165\u4ee5\u4e0b\u5185\u5bb9\uff0c\u6ce8\u610f\u5c06ip\u6362\u6210\u4f60\u5b89\u88c5hass\u4e3b\u673a\u7684ip\uff1a<\/p>\n\n\n\n<p>\\\\192.168.6.18\\<\/p>\n\n\n\n<p>\u539f\u6587\u94fe\u63a5\uff1a<a href=\"https:\/\/blog.csdn.net\/zzzzzqf\/article\/details\/86637752\" target=\"_blank\" rel=\"noreferrer noopener\" rel=\"nofollow\" >https:\/\/blog.csdn.net\/zzzzzqf\/article\/details\/86637752<\/a><\/p>\n<button class=\"simplefavorite-button\" data-postid=\"736\" 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>\u6811\u8393\u6d3e3b+\u5b89\u88c5home assistant \u5b89\u88c5\u6811\u8393\u6d3e\u64cd\u4f5c\u7cfb\u7edf \u53c2\u8003\u7f51\u7ad9\u6559\u7a0b\uff1ahttps:\/\/blog.csdn.net\/wei &#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-736","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\/736","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=736"}],"version-history":[{"count":0,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts\/736\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=736"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=736"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=736"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}