Custom url for my flow

Hi! I have discovered Node Red and have been playing around with a lot of fun. I have created a weather site with some info on it like temp, humidity, wind.

But....I can't figure out how to make it accessible through 1880/weather in stead of 1880/ui

I can make a simple website and display the contents through 1880/anything.

I must inform you that I am not a programmer, and I can use some help :wink:

Hope to hear from you!

Rob

Hi,

I think this will help you.

The default url for the dashboard is based off your existing Node-RED httpRoot path with /ui added. This can be changed in your Node-RED settings.js file - ui: { path: "ui" },

The source URL

Edit:
Note that you have to restart the Node-Red server after adjusting the settings. The settings are only read at start-up, if I am not mistaken.

Arne

Hi, and thanks!

I would also like to keep the /ui url.
Is it possible to achieve:
/ui
/weather
/whatelse
/etc

This way I can easily have multiple projects :wink: When a project is finished it can have it's own url.

Rob

Hey

I don't think this is possible.
You can do the following: "/ ui / whatever". There is only 1 dashboard, so multiple URLs (multiple dashboards) are not possible.

I don't know if it is possible to set a custom URL per 'tab'.

I am also quite new to Node-Red (and "programming"). Someone who can confirm this?

Arne

You are correct - there is only one dashboard endpoint /ui OR /weather etc.
(you can use other dashboards like uibuilder etc - that can accommodate multiple endpoints - but they require you to build the complete dashboard yourself).

What about a custom URL per tab?
Just out of curiosity. :star_struck:

The dashboard is an Angular Single Page Application and there is (pedantically) a URL per tab but it is not customise-able .

1 Like

I think second best option might be described here:

Seems do-able. I'll publish my "ready" websites on an other server. I am using Proxmox so deployment of extra servers is very easy.

Thanks to all and if you have better solutions I'm all eyes & ears!

Rob

1 Like

Maybe this is nice for someone??

[{"id":"53c48301.6e0044","type":"inject","z":"38b7bd89.2791c2","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"30","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":140,"wires":[["e1d74287.87c698"]]},{"id":"e1d74287.87c698","type":"http request","z":"38b7bd89.2791c2","name":"Openweathermap","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.openweathermap.org/data/2.5/weather?q=YOUR_LOCATION,YOUR_COUNTRY&units=metric&appid=PYT_YOUR_API_ID HERE","tls":"","persist":false,"proxy":"","authType":"","x":370,"y":140,"wires":[["7147d49f.6d63dc","bc5e06aa.141e08","3e141302.97a6ec","962309c9.3b7b3"]]},{"id":"7147d49f.6d63dc","type":"change","z":"38b7bd89.2791c2","name":"Temperatuur","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.main.temp","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":240,"wires":[["bad56f23.a4d66","7a9a6acb.b685ac","f32fd8c.06de528"]]},{"id":"bc5e06aa.141e08","type":"change","z":"38b7bd89.2791c2","name":"Luchtvochtigheid","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.main.humidity","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":300,"wires":[["b74cca2c.468628","8dea1c2c.c0a278","c61dadac.a257e"]]},{"id":"3e141302.97a6ec","type":"change","z":"38b7bd89.2791c2","name":"Wind","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.wind.speed","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":590,"y":360,"wires":[["6adeba02.a8a0dc","9091fff9.fb6d48","d520f951.41f058","df18f8b1.a96aa8"]]},{"id":"bad56f23.a4d66","type":"debug","z":"38b7bd89.2791c2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":420,"y":400,"wires":[]},{"id":"b74cca2c.468628","type":"debug","z":"38b7bd89.2791c2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":430,"y":440,"wires":[]},{"id":"6adeba02.a8a0dc","type":"debug","z":"38b7bd89.2791c2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":430,"y":480,"wires":[]},{"id":"7a9a6acb.b685ac","type":"ui_gauge","z":"38b7bd89.2791c2","name":"","group":"bee0bd7b.6a68a8","order":1,"width":0,"height":0,"gtype":"gage","title":"Temperatuur Celcius","label":"Celcius","format":"{{value}}","min":"-20","max":"50","colors":["#00c7fd","#77bb40","#ca3838"],"seg1":"0","seg2":"28","x":860,"y":240,"wires":[]},{"id":"8dea1c2c.c0a278","type":"ui_gauge","z":"38b7bd89.2791c2","name":"","group":"bee0bd7b.6a68a8","order":2,"width":0,"height":0,"gtype":"gage","title":"Luchtvochtigheid %","label":"%","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"40","seg2":"","x":860,"y":300,"wires":[]},{"id":"9091fff9.fb6d48","type":"ui_gauge","z":"38b7bd89.2791c2","name":"","group":"bee0bd7b.6a68a8","order":3,"width":0,"height":0,"gtype":"gage","title":"Windsnelheid m/s","label":"m/s","format":"{{value}}","min":0,"max":"30","colors":["#00b500","#e6e600","#ca3838"],"seg1":"5","seg2":"15","x":850,"y":360,"wires":[]},{"id":"c61dadac.a257e","type":"ui_chart","z":"38b7bd89.2791c2","name":"","group":"3cf5fe4f.bd38b2","order":2,"width":0,"height":0,"label":" ","chartType":"line","legend":"false","xformat":"auto","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"100","removeOlder":"86400","removeOlderPoints":"","removeOlderUnit":"1","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1030,"y":300,"wires":[[]]},{"id":"f32fd8c.06de528","type":"ui_chart","z":"38b7bd89.2791c2","name":"","group":"3cf5fe4f.bd38b2","order":1,"width":0,"height":0,"label":" ","chartType":"line","legend":"false","xformat":"auto","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"35","removeOlder":"86400","removeOlderPoints":"","removeOlderUnit":"1","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1040,"y":220,"wires":[[]]},{"id":"d520f951.41f058","type":"ui_chart","z":"38b7bd89.2791c2","name":"","group":"3cf5fe4f.bd38b2","order":3,"width":0,"height":0,"label":" ","chartType":"line","legend":"false","xformat":"auto","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"30","removeOlder":"86400","removeOlderPoints":"","removeOlderUnit":"1","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1020,"y":360,"wires":[[]]},{"id":"df18f8b1.a96aa8","type":"function","z":"38b7bd89.2791c2","name":"","func":"var temp = (msg.payload * 3600) / 1000\n//msg.originalPayload = msg.payload; //save for later debugging / verifying results\nmsg.payload = temp; \nreturn msg; //this causes the msg to be sent out the output & on to the next node","outputs":1,"noerr":0,"initialize":"","finalize":"","x":980,"y":440,"wires":[["c63f27d2.cbb168"]]},{"id":"962309c9.3b7b3","type":"debug","z":"38b7bd89.2791c2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":620,"y":100,"wires":[]},{"id":"c63f27d2.cbb168","type":"ui_gauge","z":"38b7bd89.2791c2","name":"","group":"d803e64d.8ee008","order":3,"width":0,"height":0,"gtype":"gage","title":"Wind km/u","label":"km/u","format":"{{value | number:2}}","min":0,"max":"60","colors":["#00b500","#e6e600","#ca3838"],"seg1":"10","seg2":"30","x":1200,"y":360,"wires":[]},{"id":"bee0bd7b.6a68a8","type":"ui_group","z":"","name":"Weer","tab":"8c8986ba.2f15e","order":1,"disp":true,"width":"6","collapse":false},{"id":"3cf5fe4f.bd38b2","type":"ui_group","z":"","name":" ","tab":"8c8986ba.2f15e","order":1,"disp":true,"width":"6","collapse":false},{"id":"d803e64d.8ee008","type":"ui_group","z":"","name":" ","tab":"8c8986ba.2f15e","order":3,"disp":true,"width":"6","collapse":false},{"id":"8c8986ba.2f15e","type":"ui_tab","z":"","name":" Home","icon":"dashboard","disabled":false,"hidden":false}]

The rain info comes from a Dutch weather site, you can adjust this to your preferred site.

2 Likes

Please use the </> icon in the message editor to format it (else people cannot import it).

....help me with that one...??

help with what one?

I edited your post and fixed the flow. go back and see what I added so you will know how to do it in the future

Aha, I'll do that next time! Thanx! :wink:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.