{"id":1846,"date":"2025-01-25T11:01:54","date_gmt":"2025-01-25T03:01:54","guid":{"rendered":"https:\/\/www.fanyamin.com\/wordpress\/?p=1846"},"modified":"2025-01-25T11:01:54","modified_gmt":"2025-01-25T03:01:54","slug":"%e5%a6%82%e4%bd%95%e5%88%b6%e4%bd%9c%e4%b8%80%e9%9d%a2%e8%87%aa%e5%b7%b1%e7%9a%84%e9%ad%94%e9%95%9c-magicmirror","status":"publish","type":"post","link":"https:\/\/www.fanyamin.com\/wordpress\/?p=1846","title":{"rendered":"\u5982\u4f55\u5236\u4f5c\u4e00\u9762\u81ea\u5df1\u7684\u9b54\u955c MagicMirror"},"content":{"rendered":"<h3><strong>\u4e00\u3001\u51c6\u5907\u5de5\u4f5c<\/strong><\/h3>\n<h4><strong>1. \u786c\u4ef6\u51c6\u5907<\/strong><\/h4>\n<ul>\n<li><strong>\u6811\u8393\u6d3e<\/strong>\uff08\u63a8\u8350 Raspberry Pi 4 \u6216\u66f4\u65b0\u7248\u672c\uff09\n<ul>\n<li>\u9700\u8981\u914d\u5907 SD \u5361\uff08\u81f3\u5c11 8GB\uff0c\u63a8\u8350 16GB \u6216\u66f4\u5927\uff09\uff0c\u7528\u4e8e\u5b89\u88c5\u7cfb\u7edf\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u663e\u793a\u5668<\/strong>\n<ul>\n<li>\u666e\u901a\u7684\u7535\u8111\u663e\u793a\u5668\u6216\u5e73\u677f\u663e\u793a\u5668\u5373\u53ef\uff0c\u5927\u5c0f\u6839\u636e\u9700\u6c42\u9009\u62e9\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u53cc\u5411\u955c\u5b50\uff08Two-Way Mirror\uff09<\/strong>\n<ul>\n<li>\u8fd9\u79cd\u955c\u5b50\u65e2\u53ef\u4ee5\u53cd\u5c04\u5149\u7ebf\u53c8\u5141\u8bb8\u5c4f\u5e55\u540e\u9762\u7684\u5185\u5bb9\u900f\u8fc7\u3002\u53ef\u4ee5\u4ece\u7f51\u4e0a\u8d2d\u4e70\u6216\u8005\u627e\u672c\u5730\u73bb\u7483\u5e97\u5b9a\u5236\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u5176\u4ed6\u5de5\u5177<\/strong>\n<ul>\n<li>HDMI \u7ebf\uff1a\u7528\u4e8e\u8fde\u63a5\u663e\u793a\u5668\u4e0e\u6811\u8393\u6d3e\u3002  <\/li>\n<li>\u7535\u6e90\u9002\u914d\u5668\uff1a\u4e3a\u6811\u8393\u6d3e\u4f9b\u7535\u3002  <\/li>\n<li>\u6846\u67b6\uff1a\u7528\u4e8e\u56fa\u5b9a\u955c\u5b50\u548c\u663e\u793a\u5668\uff08\u53ef\u4ee5\u662f\u6728\u6846\u3001\u91d1\u5c5e\u6846\u7b49\uff09\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<hr \/>\n<h3><strong>\u4e8c\u3001\u5b89\u88c5\u548c\u914d\u7f6e MagicMirror \u8f6f\u4ef6<\/strong><\/h3>\n<h4><strong>1. \u5b89\u88c5\u6811\u8393\u6d3e\u64cd\u4f5c\u7cfb\u7edf<\/strong><\/h4>\n<ol>\n<li>\u4e0b\u8f7d <a href=\"https:\/\/www.raspberrypi.com\/software\/\">Raspberry Pi Imager<\/a>\u3002<\/li>\n<li>\u5c06\u6811\u8393\u6d3e\u64cd\u4f5c\u7cfb\u7edf\uff08Raspberry Pi OS\uff09\u5199\u5165 SD \u5361\u3002<\/li>\n<li>\u63d2\u5165\u6811\u8393\u6d3e\uff0c\u63a5\u5165\u7535\u6e90\u3001\u663e\u793a\u5668\u3001\u952e\u76d8\u9f20\u6807\uff0c\u5b8c\u6210\u7cfb\u7edf\u7684\u521d\u59cb\u914d\u7f6e\uff08\u8bed\u8a00\u3001WiFi \u7b49\uff09\u3002<\/li>\n<\/ol>\n<h4><strong>2. \u5b89\u88c5 MagicMirror\u00b2<\/strong><\/h4>\n<ol>\n<li>\u6253\u5f00\u6811\u8393\u6d3e\u7ec8\u7aef\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5 MagicMirror\u00b2\uff1a\n<pre><code class=\"language-bash\">bash -c \"$(curl -sL https:\/\/raw.githubusercontent.com\/MichMich\/MagicMirror\/master\/installers\/install.sh)\"<\/code><\/pre>\n<\/li>\n<li>\u5b89\u88c5\u5b8c\u6210\u540e\uff0cMagicMirror \u7684\u9ed8\u8ba4\u6587\u4ef6\u5c06\u4f4d\u4e8e <code>~\/MagicMirror<\/code> \u76ee\u5f55\u3002<\/li>\n<\/ol>\n<h4><strong>3. \u542f\u52a8 MagicMirror<\/strong><\/h4>\n<ul>\n<li>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u542f\u52a8 MagicMirror\uff1a\n<pre><code class=\"language-bash\">cd ~\/MagicMirror\nnpm start<\/code><\/pre>\n<\/li>\n<li>\u8fd0\u884c\u540e\uff0c\u4f60\u5e94\u8be5\u80fd\u770b\u5230 MagicMirror \u7684\u9ed8\u8ba4\u754c\u9762\uff0c\u5305\u62ec\u65f6\u95f4\u3001\u5929\u6c14\u548c\u65b0\u95fb\u7b49\u6a21\u5757\u3002<\/li>\n<\/ul>\n<hr \/>\n<h3><strong>\u4e09\u3001\u914d\u7f6e MagicMirror<\/strong><\/h3>\n<p>MagicMirror \u7684\u914d\u7f6e\u6587\u4ef6\u4f4d\u4e8e <code>~\/MagicMirror\/config\/config.js<\/code>\uff0c\u53ef\u4ee5\u901a\u8fc7\u7f16\u8f91\u8fd9\u4e2a\u6587\u4ef6\u6765\u81ea\u5b9a\u4e49\u754c\u9762\u3002<\/p>\n<h4><strong>1. \u4fee\u6539\u914d\u7f6e\u6587\u4ef6<\/strong><\/h4>\n<ol>\n<li>\u6253\u5f00\u914d\u7f6e\u6587\u4ef6\uff1a\n<pre><code class=\"language-bash\">nano ~\/MagicMirror\/config\/config.js<\/code><\/pre>\n<\/li>\n<li>\u6839\u636e\u9700\u6c42\u4fee\u6539\u9ed8\u8ba4\u6a21\u5757\u7684\u8bbe\u7f6e\uff0c\u4f8b\u5982\u8c03\u6574\u65f6\u533a\u3001\u66f4\u6539\u663e\u793a\u4f4d\u7f6e\u3001\u4fee\u6539\u8bed\u8a00\u7b49\u3002<\/li>\n<\/ol>\n<h4><strong>2. \u6dfb\u52a0\u6a21\u5757<\/strong><\/h4>\n<p>MagicMirror \u63d0\u4f9b\u8bb8\u591a\u5f00\u6e90\u6a21\u5757\uff0c\u4f60\u53ef\u4ee5\u4ece <a href=\"https:\/\/github.com\/MichMich\/MagicMirror\/wiki\/3rd-Party-Modules\">MagicMirror \u6a21\u5757\u76ee\u5f55<\/a> \u4e2d\u627e\u5230\u9700\u8981\u7684\u6a21\u5757\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u6a21\u5757\u5b89\u88c5\u7684\u4f8b\u5b50\uff1a<\/p>\n<ul>\n<li><strong>\u5b89\u88c5\u5929\u6c14\u6a21\u5757\uff08MMM-WeatherForecast\uff09<\/strong>\uff1a\n<ol>\n<li>\u8fdb\u5165\u6a21\u5757\u76ee\u5f55\uff1a\n<pre><code class=\"language-bash\">cd ~\/MagicMirror\/modules<\/code><\/pre>\n<\/li>\n<li>\u514b\u9686\u6a21\u5757\u4ee3\u7801\uff1a\n<pre><code class=\"language-bash\">git clone https:\/\/github.com\/YOUR_MODULE_REPO.git<\/code><\/pre>\n<\/li>\n<li>\u6839\u636e\u6a21\u5757\u8bf4\u660e\uff0c\u5728 <code>config.js<\/code> \u4e2d\u6dfb\u52a0\u6a21\u5757\u914d\u7f6e\u3002<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<p>\u4f8b\u5982\uff1a<\/p>\n<pre><code class=\"language-javascript\">modules: [\n    {\n        module: &quot;weather&quot;,\n        position: &quot;top_right&quot;,\n        config: {\n            location: &quot;Beijing&quot;,\n            locationID: &quot;1816670&quot;,  \/\/ \u4f60\u6240\u5728\u57ce\u5e02\u7684 OpenWeatherMap ID\n            appid: &quot;YOUR_OPENWEATHER_API_KEY&quot;  \/\/ \u9700\u8981\u53bb OpenWeatherMap \u6ce8\u518c\u83b7\u53d6\n        }\n    }\n]<\/code><\/pre>\n<hr \/>\n<h3><strong>\u56db\u3001\u63d0\u5347 MagicMirror \u7684\u529f\u80fd<\/strong><\/h3>\n<h4><strong>1. \u6dfb\u52a0\u8bed\u97f3\u63a7\u5236<\/strong><\/h4>\n<p>\u53ef\u4ee5\u96c6\u6210\u8bed\u97f3\u52a9\u624b\uff08\u5982 Google Assistant \u6216 Alexa\uff09\uff0c\u901a\u8fc7\u9ea6\u514b\u98ce\u63a7\u5236\u955c\u5b50\u663e\u793a\u5185\u5bb9\u3002<\/p>\n<h4><strong>2. \u4f7f\u7528\u89e6\u63a7\u5c4f<\/strong><\/h4>\n<p>\u5982\u679c\u9009\u62e9\u5e26\u89e6\u63a7\u529f\u80fd\u7684\u663e\u793a\u5668\uff0c\u53ef\u4ee5\u5c06 MagicMirror \u53d8\u6210\u4e00\u4e2a\u4ea4\u4e92\u5f0f\u8bbe\u5907\u3002<\/p>\n<h4><strong>3. \u81ea\u52a8\u542f\u52a8 MagicMirror<\/strong><\/h4>\n<p>\u8ba9 MagicMirror \u5728\u6811\u8393\u6d3e\u542f\u52a8\u65f6\u81ea\u52a8\u8fd0\u884c\uff1a<\/p>\n<ol>\n<li>\u7f16\u8f91 <code>~\/.bashrc<\/code> \u6587\u4ef6\uff1a\n<pre><code class=\"language-bash\">nano ~\/.bashrc<\/code><\/pre>\n<\/li>\n<li>\u5728\u6587\u4ef6\u672b\u5c3e\u6dfb\u52a0\uff1a\n<pre><code class=\"language-bash\">cd ~\/MagicMirror\nnpm start<\/code><\/pre>\n<\/li>\n<\/ol>\n<h4><strong>4. \u8fdc\u7a0b\u8bbf\u95ee<\/strong><\/h4>\n<p>\u901a\u8fc7\u624b\u673a\u6216\u7535\u8111\u8bbf\u95ee MagicMirror\uff0c\u65b9\u6cd5\u5982\u4e0b\uff1a<\/p>\n<ol>\n<li>\u5728\u6811\u8393\u6d3e\u4e0a\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u5f00\u542f\u670d\u52a1\u5668\u6a21\u5f0f\uff1a\n<pre><code class=\"language-bash\">npm run server<\/code><\/pre>\n<\/li>\n<li>\u5728\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165 <code>http:\/\/&lt;\u6811\u8393\u6d3eIP&gt;:8080<\/code>\uff0c\u5373\u53ef\u8bbf\u95ee MagicMirror\u3002<\/li>\n<\/ol>\n<hr \/>\n<h3><strong>\u4e94\u3001DIY \u5916\u89c2\u548c\u6846\u67b6<\/strong><\/h3>\n<ol>\n<li>\n<p><strong>\u8bbe\u8ba1\u6846\u67b6<\/strong>\uff1a<\/p>\n<ul>\n<li>\u4f7f\u7528\u6728\u8d28\u6216\u91d1\u5c5e\u6846\uff0c\u5c06\u663e\u793a\u5668\u548c\u53cc\u5411\u955c\u5b50\u56fa\u5b9a\u5728\u4e00\u8d77\u3002<\/li>\n<li>\u955c\u5b50\u7684\u80cc\u9762\u9700\u8981\u906e\u5149\u6750\u6599\uff0c\u786e\u4fdd\u5c4f\u5e55\u5185\u5bb9\u6e05\u6670\u53ef\u89c1\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u9690\u85cf\u7535\u7ebf<\/strong>\uff1a<\/p>\n<ul>\n<li>\u5c06\u7535\u7ebf\u6574\u7406\u540e\u9690\u85cf\u5728\u6846\u67b6\u5185\uff0c\u4fdd\u6301\u5916\u89c2\u6574\u6d01\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u8c03\u6574\u955c\u5b50\u900f\u660e\u5ea6<\/strong>\uff1a<\/p>\n<ul>\n<li>\u5982\u679c\u5c4f\u5e55\u5185\u5bb9\u4e0d\u591f\u4eae\uff0c\u53ef\u4ee5\u8c03\u6574\u955c\u5b50\u7684\u900f\u5149\u7387\uff08\u63a8\u8350\u900f\u5149\u7387\u5728 30%-50%\uff09\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<hr \/>\n<h3><strong>\u516d\u3001\u5b9e\u7528\u63d0\u793a<\/strong><\/h3>\n<ul>\n<li><strong>\u6a21\u5757\u8c03\u8bd5<\/strong>\uff1a\u5f53\u6a21\u5757\u51fa\u9519\u65f6\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u67e5\u770b\u65e5\u5fd7\uff1a\n<pre><code class=\"language-bash\">pm2 logs<\/code><\/pre>\n<\/li>\n<li><strong>\u5c4f\u5e55\u65b9\u5411<\/strong>\uff1a\u5982\u679c\u663e\u793a\u5668\u9700\u8981\u65cb\u8f6c\uff0c\u53ef\u4ee5\u901a\u8fc7 <code>raspi-config<\/code> \u8c03\u6574\u5c4f\u5e55\u65b9\u5411\uff1a\n<pre><code class=\"language-bash\">sudo raspi-config<\/code><\/pre>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u51c6\u5907\u5de5\u4f5c 1. \u786c\u4ef6\u51c6\u5907 \u6811\u8393\u6d3e\uff08\u63a8\u8350 Raspberry Pi 4 \u6216\u66f4\u65b0\u7248\u672c\uff09 \u9700\u8981\u914d\u5907 SD \u5361\uff08\u81f3\u5c11 8GB\uff0c\u63a8\u8350 16GB \u6216\u66f4\u5927\uff09\uff0c\u7528\u4e8e\u5b89\u88c5\u7cfb\u7edf\u3002 \u663e\u793a\u5668 \u666e\u901a\u7684\u7535\u8111\u663e\u793a\u5668\u6216\u5e73\u677f\u663e\u793a\u5668\u5373\u53ef\uff0c\u5927\u5c0f\u6839\u636e\u9700\u6c42\u9009\u62e9\u3002 \u53cc\u5411\u955c\u5b50\uff08Two-Way Mirror\uff09 \u8fd9\u79cd\u955c\u5b50\u65e2\u53ef\u4ee5\u53cd\u5c04\u5149\u7ebf\u53c8\u5141\u8bb8\u5c4f\u5e55\u540e\u9762\u7684\u5185\u5bb9\u900f\u8fc7\u3002\u53ef\u4ee5\u4ece\u7f51\u4e0a\u8d2d\u4e70\u6216\u8005\u627e\u672c\u5730\u73bb\u7483\u5e97\u5b9a\u5236\u3002 \u5176\u4ed6\u5de5\u5177 HDMI \u7ebf\uff1a\u7528\u4e8e\u8fde\u63a5\u663e\u793a\u5668\u4e0e\u6811\u8393\u6d3e\u3002 \u7535\u6e90\u9002\u914d\u5668\uff1a\u4e3a\u6811\u8393\u6d3e\u4f9b\u7535\u3002 \u6846\u67b6\uff1a\u7528\u4e8e\u56fa\u5b9a\u955c\u5b50\u548c\u663e\u793a\u5668\uff08\u53ef\u4ee5\u662f\u6728\u6846\u3001\u91d1\u5c5e\u6846\u7b49\uff09\u3002 \u4e8c\u3001\u5b89\u88c5\u548c\u914d\u7f6e MagicMirror \u8f6f\u4ef6 1. \u5b89\u88c5\u6811\u8393\u6d3e\u64cd\u4f5c\u7cfb\u7edf \u4e0b\u8f7d Raspberry Pi Imager\u3002 \u5c06\u6811\u8393\u6d3e\u64cd\u4f5c\u7cfb\u7edf\uff08Raspberry Pi OS\uff09\u5199\u5165 SD \u5361\u3002 \u63d2\u5165\u6811\u8393\u6d3e\uff0c\u63a5\u5165\u7535\u6e90\u3001\u663e\u793a\u5668\u3001\u952e\u76d8\u9f20\u6807\uff0c\u5b8c\u6210\u7cfb\u7edf\u7684\u521d\u59cb\u914d\u7f6e\uff08\u8bed\u8a00\u3001WiFi \u7b49\uff09\u3002 2. \u5b89\u88c5 MagicMirror\u00b2 \u6253\u5f00\u6811\u8393\u6d3e\u7ec8\u7aef\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5 MagicMirror\u00b2\uff1a bash -c &#8220;$(curl -sL https:\/\/raw.githubusercontent.com\/MichMich\/MagicMirror\/master\/installers\/install.sh)&#8221; \u5b89\u88c5\u5b8c\u6210\u540e\uff0cMagicMirror \u7684\u9ed8\u8ba4\u6587\u4ef6\u5c06\u4f4d\u4e8e ~\/MagicMirror \u76ee\u5f55\u3002 3. [&hellip;] <a class=\"read-more\" href=\"https:\/\/www.fanyamin.com\/wordpress\/?p=1846\" title=\"Permanent Link to: \u5982\u4f55\u5236\u4f5c\u4e00\u9762\u81ea\u5df1\u7684\u9b54\u955c MagicMirror\">&rarr;Read&nbsp;more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-1846","post","type-post","status-publish","format-standard","hentry","category-5"],"_links":{"self":[{"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1846"}],"collection":[{"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1846"}],"version-history":[{"count":1,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1846\/revisions"}],"predecessor-version":[{"id":1847,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1846\/revisions\/1847"}],"wp:attachment":[{"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1846"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1846"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}