The Internet of Things

Update Node-Red on the Raspberry Pi

Update Raspberry Strecht Lite to the latest version.

Log in to the Raspberry Pi using Putty
Type the following commands one by one
  • sudo rpi-update
  • sudo reboot & exit (reboot the Raspberry Pi)
  • sudo apt-get -y update
  • sudo apt-get -y upgrade
  • sudo apt-get dist-upgrade
  • sudo reboot & exit (reboot the Raspberry Pi)


Install the latest Node.js and Npm

bash <(curl -sL https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered)

To find the version type this commands:
node -v
v8.9.3
npm -v
5.5.1

Install n

  • sudo npm install -g n
  • sudo n latest
  • sudo npm install -g npm@latest
  • sudo reboot & exit (reboot the Raspberry Pi)
To find the version type this commands: 
node -v
v9.3.0
npm -v
5.6.0

Start and Stop Node-Red

node-red-stop - to stop Node-red
node-red-start - to start Node-Red
node-red-log - to view the recent log output
sudo systemctl enable nodered.service - to autostart Node-Red at every boot
sudo systemctl disable nodered.service - to disable autostart on boot

Fix the Serialport Error

  • cd .node-red
  • node-red-stop
  • sudo npm rebuild
  • de-red-start (ctrl c to exit Node-red)

Start Node-Red as a service

  • sudo systemctl enable nodered.service
  • node-red-start (ctrl c to exit Node-red)
Now you cane see Node-red in your browser by using http://'ip adres raspberry pi':1880

https://youtu.be/B0hpv_8is0Q




No comments:

Post a Comment