發表文章

目前顯示的是有「node-red」標籤的文章

centos 8 安裝node-red 與 mosquitto-1.6.8

今天來用我大centos裝node-red 與 mosquitto 裝到一半 幹咧 阿怎麼沒有mosquitto 只好從官網抓QAQ 然後自己make 自己 make install 不囉嗦 上步驟: yum install epel-release yum install gcc-c++ make yum install openssl-devel firewall-cmd --permanent --zone=public --add-port=1880/tcp firewall-cmd --permanent --zone=public --add-port=1883/tcp firewall-cmd --reload curl -sL https://rpm.nodesource.com/setup_12.x | bash - yum install nodejs npm install -g node-red npm install -g node-red-dashboard npm install -g node-red-admin node-red-admin hash-pw vim .node-red/settings.js (把你的username 跟 password 的hash填進去) wget https://mosquitto.org/files/source/mosquitto-1.6.8.tar.gz tar -zxvf mosquitto-1.6.8.tar.gz make make install mosquitto_passwd -c /etc/mosquitto/passwd admin cp /etc/mosquitto/mosquitto.conf.example /etc/mosquitto/mosquitto.conf vim /etc/mosquitto/mosquitto.conf 199行 加入 user root 因為新的mosquitto 好像不讓root開(? 650行 加入 password_file /etc/mosquitto/passwd 這邊是要指定password file 最後: mosquitto...

node-red 寫成服務時遇到 typeerror the path argument must be of type string. received type undefined

之前有在我的NUC的VM上架過node-red 這次把它寫成服務時 卻噴了 typeerror the path argument must be of type string. received type undefined 這個錯誤 以下是我服務寫成的內容 [Unit] Description=node-redd Daemon after=network.target [Service] Type=forking ExecStart=/home/node-red-start.sh ExecStop=/home/node-red-stop.sh StandardOutput=tty [Install] WantedBy=multi-user.target node-red-stop.sh: #!/bin/sh ps aux | grep node-red | awk '{print $2}' | xargs kill -9 node-red-start.sh: #!/bin/sh node-red & 會噴出錯誤的原因主要是我之前居然是用root開node-red的 他找不到我放在 /root/.node-red/settings.js 所以把node-red-start.sh 內容修改一下: #!/bin/sh node-red -s /root/.node-red/settings.js & 就行了

node-red nodemailer throws error Invalid login: 534-5.7.14

圖片
試著用node red寫出一個可以傳送email的API 時 遇到的email的驗證問題 nodemailer throws error Invalid login: 534-5.7.14 解決辦法: 請你試著使用瀏覽器 登入你要用的gmail帳號 再開啟以下連結 https://accounts.google.com/b/0/DisplayUnlockCaptcha 按下"繼續"應該就行了

debain安裝node-red , mosquitto 以及node-red增加登入面板

apt-get install vim apt-get install curl curl -sL https://deb.nodesource.com/setup_12.x | bash - apt-get install -y nodejs npm install -g node-red npm install -g node-red-dashboard apt-get install mosquitto apt-get install firewalld systemctl enable firewalld firewall-cmd --permanent --zone=public --add-port=1880/tcp firewall-cmd --permanent --zone=public --add-port=1883/tcp firewall-cmd --permanent --zone=public --add-port=443/tcp firewall-cmd --reload systemctl enable mosquitto systemctl restart mosquitto npm install -g node-red-admin node-red-admin hash-pw 你會得到一串HASH vim setting.js 找到 Securing Node-RED的地方 把註解拿掉 把HASH填上去 儲存後離開