hi,
i want create flow and dashboard with "admin" user and share this dashboard with read-only users.
i read i need create one istance for every users, but i can i do?
thanks for help.
You only need an instance of Node-RED for each user if you want each user to run a different set of flows.
If you want a read-only dashboard, you would normally just set up a Dashboard with just outputs and no inputs and let admins have access to the NR admin ui.
If you want more than this - bearing in mind that NR isn't really set up as authenticated multi-user - you would likely want to use a custom set of UI's (e.g. not Dashboard). You can craft these using the build in http nodes or use a helper such as uibuilder. There are then various ways to integrate user login and authorisation.
We would really need to know more about your requirements in order to give more a comprehensive response.
Thanks for reply.
i only want users (not admin) not access to editor
The documentation here tells you how to secure the editor.
Hello
I hope this is the right place to raise my dilemma
I have Dashboard installed and running stable with a single user connected to localhost:1880/ui but when two or more are connected to the ui the dashboard becomes slow, it does not update, it is disconnected, it is unstable. I read the following:
Multiple Users
This Dashboard does NOT support multiple individual users. It is a view of the status of the underlying Node-RED flow, which itself is single user. If the state of the flow changes then all clients will get notified of that change.
I do not know if this is a limitation of the dashboard.
I believe you are using the word user to mean client browser. Connecting multiple client browsers should not cause any problem. The text you quoted was referring the ability to have multiple named users configured each with their own password.
What do you see in the node-red log when it goes slow?
Also tell us what hardware node-red is running on and what versions of node-red and node.js. You can get that information from the start of the node red log.
When you say multiple users I presume you mean multiple users on multiple PCs connected to the same server. Is that correct?
Thanks for your quick reply Colin
I have installed
node-network 0.18.7: Maintenance Release
nodejs v8.11.3
Installed on an OPi Zero Plus (Linux orangepizeroplus 4.14.48-sunxi64)
I want to access the graphic interface of node-red-dashboard localhost:1880/ui from any cell phone, tablet, laptop, pc, etc.
the cited text is from this link https://github.com/node-red/node-red-dashboard
on your local network only or from anywhere in the world?
If oyou want to do it from anywhere in the world there are many security issues you need to address so your network will not be attacked. Doing a google search will find old threads that discuess the issues.
It's for a local network.
I understand the security levels that I must take, but it is only for a local network.
You can only use localhost on the device running node-red. I presume however that this is just an error in your post.
You did not answer my question as to what you see in the node red log when it goes slow.
Notice the final sentence "If the state of the flow changes then all clients will get notified of that change" which indicates that multiple browsers can be connected at once.
Another question, are you running charts with a lot of datapoints? You can determine the number of datapoints on a chart by multiplying the number of lines by the sample rate (per minute) by the time range of the chart in minutes. If that is a large number then you may be overloading the pi sending all that data to the clients. Run top
in a terminal on the pi to see if it is working hard.
OPI zero plus is my server, my access point. So I have installed the mosquitto broker.
I have the following devices connected to the broker:
4 sonoff hacked with espurna
1 NodeMCU current sensor sends data every 5 seconds.
1 NodeMCU MQ2 sensor sends data only when requested
2 NodeMCU curtain control
3 NodeMCU with touch screens to turn the sonoff on and off and display the sensor data.
All this system works without major problem.
The next step I wanted to take was to have control through a web interface. The recommendation I found was node-red and node-red-dashboard.
I have 5 flows (5 tabs) I do not know if I add all the flow here.
Try with the browser of my cell phone accessing my broker 172.24.1.1:1880/ui and it works well, turn on and off lights with the switch, that is, all the buttons work well. the problem comes when I access from another cell phone or another laptop to address 172.24.1.1:1880/ui the switchs are not updated or updated after x seconds. sometimes I can not even access that address within my local network. It is as if only the first device that connects to the interface has priority and the rest of the browsers is slow.
I am sorry. where I see the node-red log.
the top command in the terminal shows me this among other executions
%CPU %MEM TIME+ COMMAND
1.0 7.8 3:14.06 node-red
0.3 0.0 1:53.02 mosquitto
I don't know about OPi, but on a regular pi running raspbian you can run
node-red-log
if node red is started using systemctl then you can also do
sudo systemctl status nodered
Alternatively it may be in /var/log/syslog
or if you start node-red in a terminal then it will appear there.
Please copy/paste here the start of the log when node red is started and also what you see when the second device connects.
I think I have solved my problem. change my server for a Raspberry Pi 3 B. and the node-red-dashboard UI is accessible without major problems from 3 cell phones and 2 laptops and everything works fine.
Apparently the problem was the WiFi OPI Zero Plus that does not provide connections from cell phones or laptops. the NodeMCU connect well.
OPI Zero Plus = Realtek RTL8189FTV, IEEE 802.11 b/g/n
Raspberry PI 3 B = BCM43438 Wireless LAN IEEE 802.11 b/g/n
node-red-log showed nothing strange
Thanks Colin, zenofmud for your interest in helping me.
I think that the OPI Zero Plus only has 256 or 512mb of RAM which may be an issue. When things get slow on an SBC, you should firstly check to see the memory and CPU utilisation. Pay particular attention to any swap/paging activity - this is especially slow on any SBC using an SD card as a main drive.