Translate

Sunday, April 7, 2019

IoT - node-red tips

Playing with node-red I did hit a couple of problems.
This page collects some tips/suggestions/FAQ to easy deal with this great program.


Dashboard



When installing node-red, a default dashboard is installed.
The dashboard contains different modules, among them some to handle the UI (User Interface), i.e. the portion of node-red that you can "see" in your flow.
There are many others dashboard out there, specifically one that has interesting modules.

It is important to remember that very probably adding a new dashboard will make node-red not working anymore !
So BEFORE to install a new dashboard be sure to have a procedure to install it correctly, things that normally can imply to remove the default one.

For example on my node-red server I installed the node-red-dashboard.
But I had already installed the node-red-contrib-ui that of course caused node-red to don't work properly when showing the UI.

To correctly install the dashboard :

  • go on the server via a terminal
  • stop node-red
    • node-red stop
  • go on the node-red directory
    • cd ~/.node-red
  • remove the old/default UI (in my case node-red-contrib-ui
    • npm unisntall node-red-contrib-ui
    • sudo npm install node-red-contrib-ui
  • install the new dashboard
    • npm install node-red-dashboard
    • sudo nopm install node-red-dashboard
  • reboot
  • go back login via a terminal
  • start node-red
    • node-red start
Everythign should work now

No comments:

Post a Comment