Node-RED my OLD ARMv7l Raspberry PI

sudo apt update
sudo apt upgrade
uname -m เช็คว่า CPU เป็น ARMv7 ขึ้นไปหรือไม่

ติดตั้ง NodeJS และติดตั้ง Node-RED
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

ตอบ Y

ตอนนี้จะเข้าได้ทาง http://x.x.x.x:1880
ตั้ง authen
sudo nano /home/XXX/.node-red/settings.js
เอา comment ออก
adminAuth: {
type: “credentials”,
users: [{
username: “admin”,
password: “$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN.”,
permissions: “*”
}]
},
แก้ admin ตามที่ชอบ

sudo npm install -g –unsafe-perm node-red-admin
สร้าง hash password
node-red-admin hash-pw
ใส่ password จะได้ hash ไปใส่ใน password: ไฟล์ settings.js

sudo node-red-stop หรือ sudo systemctl stop nodered หยุดการทำงาน Node-RED
sudo node-red-start หรือ sudo systemctl start nodered เริ่มการทำงาน Node-RED อีกครั้ง
sudo node-red-log ดู log
sudo sudo systemctl enable nodered.service to autostart Node-RED at every boot
sudo systemctl disable nodered.service to disable autostart on boot