{"id":40926,"date":"2023-10-02T10:29:00","date_gmt":"2023-10-02T02:29:00","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=40926"},"modified":"2023-10-02T10:29:00","modified_gmt":"2023-10-02T02:29:00","slug":"synxsxs","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/40926.html","title":{"rendered":"\u4f7f\u7528Node-Red\u663e\u793a\u5c0f\u6570"},"content":{"rendered":"
Node-Red\u662f\u4e00\u4e2a\u6d41\u7a0b\u56fe\u7f16\u8f91\u5668\uff0c\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u5feb\u901f\u521b\u5efa\u548c\u90e8\u7f72\u81ea\u52a8\u5316\u5e94\u7528\u7a0b\u5e8f\u3002\u5b83\u53ef\u4ee5\u7528\u6765\u63a7\u5236\u548c\u76d1\u63a7\u8bbe\u5907\uff0c\u4ee5\u53ca\u6536\u96c6\u6570\u636e\uff0c\u5206\u6790\u548c\u5904\u7406\u6570\u636e\uff0c\u5e76\u5c06\u5176\u53ef\u89c6\u5316\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Node-Red\u663e\u793a\u5c0f\u6570\uff0c\u4ee5\u5e2e\u52a9\u7528\u6237\u66f4\u597d\u5730\u7406\u89e3\u548c\u638c\u63e1Node-Red\u7684\u529f\u80fd\u3002<\/p>\n
Node-Red\u53ef\u4ee5\u901a\u8fc7Node.js\u548cnpm\u5b89\u88c5\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7docker\u5bb9\u5668\u5b89\u88c5\u3002\u5b89\u88c5Node-Red\u4e4b\u524d\uff0c\u9700\u8981\u786e\u4fdd\u5b89\u88c5\u4e86Node.js\u548cnpm\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6765\u68c0\u67e5\u662f\u5426\u5b89\u88c5\u4e86Node.js\u548cnpm\uff1a<\/p>\n
node -v<\/p>
npm -v<\/p><\/pre>\n
\u5982\u679c\u6ca1\u6709\u5b89\u88c5\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5Node.js\u548cnpm\uff1a<\/p>\n
sudo apt-get install nodejs<\/p>
sudo apt-get install npm<\/p><\/pre>\n
\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5Node-Red\uff1a<\/p>\n
sudo npm install -g --unsafe-perm node-red<\/p><\/pre>\n
\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u542f\u52a8Node-Red\uff1a<\/p>\n
node-red<\/p><\/pre>\n
\u4f7f\u7528Node-Red\u663e\u793a\u5c0f\u6570<\/h2>\n
\u4f7f\u7528Node-Red\u663e\u793a\u5c0f\u6570\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u8981\u5728\u6d41\u7a0b\u56fe\u4e2d\u6dfb\u52a0\u4e00\u4e2a\u201cNumber\u201d\u8282\u70b9\uff0c\u5e76\u5c06\u5176\u8fde\u63a5\u5230\u201cDebug\u201d\u8282\u70b9\u5373\u53ef\u3002<\/p>\n
\u6dfb\u52a0Number\u8282\u70b9<\/h3>\n
\u9996\u5148\uff0c\u5728Node-Red\u6d41\u7a0b\u56fe\u4e2d\u6dfb\u52a0\u4e00\u4e2a\u201cNumber\u201d\u8282\u70b9\uff0c\u53ef\u4ee5\u901a\u8fc7\u641c\u7d22\u201cNumber\u201d\u6216\u8005\u70b9\u51fb\u5de6\u4fa7\u83dc\u5355\u680f\u4e2d\u7684\u201cFunction\u201d\uff0c\u7136\u540e\u5728\u201cNumber\u201d\u5206\u7c7b\u4e2d\u627e\u5230\u201cNumber\u201d\u8282\u70b9\u3002<\/p>\n
\u8bbe\u7f6eNumber\u8282\u70b9<\/h3>\n
\u6dfb\u52a0\u5b8cNumber\u8282\u70b9\u540e\uff0c\u53ef\u4ee5\u70b9\u51fbNumber\u8282\u70b9\uff0c\u8fdb\u5165\u8bbe\u7f6e\u754c\u9762\uff0c\u5c06\u201cNumber\u201d\u5b57\u6bb5\u8bbe\u7f6e\u4e3a\u5c0f\u6570\uff0c\u59823.14\uff0c\u7136\u540e\u70b9\u51fb\u201cDone\u201d\u6309\u94ae\u4fdd\u5b58\u8bbe\u7f6e\u3002<\/p>\n
\u8fde\u63a5Number\u8282\u70b9<\/h3>\n
\u63a5\u4e0b\u6765\uff0c\u53ef\u4ee5\u5c06Number\u8282\u70b9\u8fde\u63a5\u5230Debug\u8282\u70b9\uff0cDebug\u8282\u70b9\u53ef\u4ee5\u7528\u6765\u5728Node-Red\u7f16\u8f91\u5668\u4e2d\u663e\u793a\u8282\u70b9\u8f93\u51fa\u7684\u6570\u636e\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u5c06\u5c0f\u6570\u663e\u793a\u5728Node-Red\u7f16\u8f91\u5668\u4e2d\u4e86\u3002<\/p>\n
\u603b\u7ed3<\/h2>\n
\u672c\u6587\u4ecb\u7ecd\u4e86\u5982\u4f55\u4f7f\u7528Node-Red\u663e\u793a\u5c0f\u6570\uff0c\u9996\u5148\u8981\u5b89\u88c5Node-Red\uff0c\u7136\u540e\u5728\u6d41\u7a0b\u56fe\u4e2d\u6dfb\u52a0Number\u8282\u70b9\uff0c\u8bbe\u7f6eNumber\u8282\u70b9\uff0c\u5c06Number\u8282\u70b9\u8fde\u63a5\u5230Debug\u8282\u70b9\uff0c\u5373\u53ef\u5728Node-Red\u7f16\u8f91\u5668\u4e2d\u663e\u793a\u5c0f\u6570\u3002<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"
Node-Red\u662f\u4e00\u4e2a\u6d41\u7a0b\u56fe\u7f16\u8f91\u5668\uff0c\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u5feb\u901f\u521b\u5efa\u548c\u90e8\u7f72\u81ea\u52a8\u5316\u5e94\u7528\u7a0b\u5e8f\u3002\u5b83\u53ef\u4ee5\u7528\u6765\u63a7\u5236\u548c\u76d1\u63a7\u8bbe\u5907\uff0c\u4ee5\u53ca\u6536\u96c6\u6570\u636e\uff0c\u5206\u6790\u548c\u5904\u7406\u6570\u636e\uff0c\u5e76\u5c06\u5176\u53ef\u89c6\u5316\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528No<\/p>\n","protected":false},"author":1,"featured_media":4132,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[36],"tags":[305],"class_list":["post-40926","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-dzjs"],"_links":{"self":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/40926","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/comments?post=40926"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/40926\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media\/4132"}],"wp:attachment":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media?parent=40926"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=40926"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=40926"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}