Hello everybody,
I want to see the values from diffrent devices in one dashboard. The only thing I have to change
is the IP-Adress, the user name and the password.
So I want to use a login form like you see in the picture and set this values as variables in the http-request node.
You should be able to pass in the basic authentication as part of the msg.headers - The name should the Authorization and the valuve should be
Basic plus the base64-encoded username:password. For example, the Base64 version of testuser:testpwd is dGVzdHVzZXI6dGVzdHB3ZA== so the Value for the msg.headers would be
Hi, and thank you for your replys,
first of all, please remember that you are talking to a beginner
Let's get out the username and password first and focus on the IP address.
Maybe I did not put my question right, so I would like to explain that again.
I have three devices. The only difference between these three devices is the IP address. I have now built a dashboard and all data from device 1 will be displayed. Now I want to see all data from device 2 on the dashboard. For this, the IP address must be swapped in all http-request nodes. For that I'm looking for the right solution.
It would of course be easiest for me if I could get a little example.
If it is an IP address you can set msg.url dynamically, as mentioned a few times above.
On the other hand, if it’s just 3 specific devices with a set username/password that doesn’t change you could take a look at node-red-contrib-credentials for each set, followed by a subflow of the relevant nodes such as a function node to set up basic authorisation, the http request node, and handlers to deal with the output. If it’s only 3 devices such a setup is maintainable and will solve the sending out usernames/password potential security issue from the dashboard back to the runtime as they’ll only live in the runtime.
454/5000
Hi,
I think I understand what you mean, but unfortunately can not implement, because I'm too much beginner. I do not understand the syntax of this programming tool and therefore only get error messages.
Since I do not want to waste your time, I'll give it up first and maybe try again later.
Thank you for your attempts to teach me.
Have a nice day and take care.