Anyone using the node-red ui for their dashboards?
Just tried it, and although it’s not as comprehensive as the emoncms dashboards, it renders well on both laptop and mobile devices, and could be used for basic easy deployment - as the node-red flows can be exported/imported. Also would prevent users having access to feeds, processes etc to protect data integrity.
I’m using the ‘node-red-contrib-ui’ node module for this example, although the node-red team are currently in the early stages of further developing this work under the name node-red-dashboard (it’s not released as a npm package yet).
To access emoncms data, I’m using 3 MQTT feeds from emoncms, and getting the daily data via api calls every 15 minutes.
npm install node-red-contrib-ui```
2) Import the flow attached to this post into node-red <a class="attachment" href="/uploads/default/original/1X/d89f87dbae26c01841832272b5701ffc0d51f3fd.txt">nodered_flow.txt</a> (8.8 KB)
3) Edit the 3 'Data' MQTT nodes with your MQTT feed names
4) Edit the 'Get emoncms data' inject nodes, and the 'http request' nodes with your emoncms api feed number & URL
Your node-red dashboard will then be available at a URL similar to http://192.168.1.10:1880/ui
Paul
If you weren’t using contrib-ui or you are on a clean install:
Install
Run the following command in your Node-RED user directory (typically ~/.node-red):
npm install node-red-dashboard
Open your Node-RED instance and you should have UI nodes available in the palette and a new dashboard tab in right side panel. The UI interface is available at http://localhost:1880/ui (if default Node-RED settings are used).
Well, in short, I got fed up of waiting for the Rasbian team to update their repo, so I installed it via npm which immediately gave me v14. Also, for some reason node.js doesn’t seem to be getting updated either, as the Jessie version is v0.10.x whilst the current version is v4.4.7 so I updated that too.
To check the installed node.js version; nodejs -v
To update node.js and also switch to the npm installed node-red version on a Pi2 (assuming you’ve already removed node-red-contrib-ui), firstly remove existing versions.
sudo apt-get remove nodejs nodejs-legacy```
NOTE - this doesn't remove your .node-red directory, and all flows, settings etc should remain intact.
Install node.js;
```curl -sL https://deb.nodesource.com/setup_4.x | sudo bash -
sudo apt-get install -y build-essential python-rpi.gpio nodejs```
...and node-red;
```sudo npm cache clean
sudo npm install -g --unsafe-perm node-red```
Then install node-red-dashboard via the link shared by Philipp above.
Reference - http://nodered.org/docs/hardware/raspberrypi#upgrading
Paul
Following removal of the apt-get version & installation of the npm version, I just ran it by node-red-start and it it has run fine since, surviving a number of reboots, and I didn’t have to re-enable the service, which surprised me, because I assumed that it would have been disabled automatically after removing the original node-red version.
(sudo systemctl enable nodered.service instructs systemd to enable Node-RED to run automatically at every boot and upon crashes.)
The link which I provided above;
…has a section on ‘autostart’ and provides all of the necessary scripts to re-install the node-red systemd autostart, if needed.
I downloaded the node-red flow example from the 2nd post (above) and I am having problems getting things to work. It looks like it was written for the node-red-contrib-ui.
Can you post your updated node-red-dashboard flow?