Start Flow by Name?

Hello,

I downloaded the flow "PWM Control LED" from the Node-Red page [https://flows.nodered.org/?term=gpio&num_pages=1] and imported:

[{“id”:“fde7314.d38d4d”,“type”:“rpi-gpio out”,“z”:“b73e866c.ea2e08”,“name”:“LED 2 on BCM7”,“pin”:“26”,“set”:"",“level”:“0”,“out”:“pwm”,“x”:593,“y”:81,“wires”:[]},{“id”:“216a7c2c.b2864c”,“type”:“inject”,“z”:“b73e866c.ea2e08”,“name”:“Off”,“topic”:"",“payload”:“0”,“payloadType”:“num”,“repeat”:"",“crontab”:"",“once”:false,“x”:149,“y”:79,“wires”:[[“fde7314.d38d4d”]]},{“id”:“85150548.334f38”,“type”:“inject”,“z”:“b73e866c.ea2e08”,“name”:“5%”,“topic”:"",“payload”:“5”,“payloadType”:“num”,“repeat”:"",“crontab”:"",“once”:false,“x”:162,“y”:135,“wires”:[[“fde7314.d38d4d”]]},{“id”:“db754534.4d67e”,“type”:“inject”,“z”:“b73e866c.ea2e08”,“name”:“30%”,“topic”:"",“payload”:“30”,“payloadType”:“num”,“repeat”:"",“crontab”:"",“once”:false,“x”:165,“y”:196,“wires”:[[“fde7314.d38d4d”]]},{“id”:“7fc774f5.49ca3c”,“type”:“inject”,“z”:“b73e866c.ea2e08”,“name”:“50%”,“topic”:"",“payload”:“50”,“payloadType”:“num”,“repeat”:"",“crontab”:"",“once”:false,“x”:167,“y”:252,“wires”:[[“fde7314.d38d4d”]]},{“id”:“c58e66c.40af618”,“type”:“inject”,“z”:“b73e866c.ea2e08”,“name”:“100%”,“topic”:"",“payload”:“100”,“payloadType”:“num”,“repeat”:"",“crontab”:"",“once”:false,“x”:165,“y”:310,“wires”:[[“fde7314.d38d4d”]]},{“id”:“f3b7be45.4ccfd8”,“type”:“comment”,“z”:“b73e866c.ea2e08”,“name”:“Pins”,“info”:"** Notes: **\nYou can’t have a pin in 2 flows\nIf you add a pin into a second flow with a different type then you’ll need to restart node-red",“x”:564,“y”:169.5,“wires”:[]}]

My question: how can I start the flow?
http: // localhost: 1880 /?

Kind Regards

Juergen B.

Assuming you have configured and nodes that need to be configured (double click on the node) and then deployed the flow. If there is an inject node click on the button on the Left hand side of the object node to inject a message into the flow

Hello,
thank you for your fast answer.
Now the flow is working.
But in this tutorial https://randomnerdtutorials.com/esp32-mqtt-publish-subscribe-arduino-ide/
with this flow:

[{"id":"9e58624.7faaba","type":"mqtt out","z":"c02b79b2.501998","name":"","topic":"esp32/output","qos":"","retain":"","broker":"10e78a89.5b4fd5","x":610,"y":342,"wires":[]},{"id":"abf7079a.653be8","type":"mqtt in","z":"c02b79b2.501998","name":"","topic":"esp32/temperature","qos":"2","broker":"10e78a89.5b4fd5","x":484,"y":249,"wires":[["cc79021b.9a751","21eae8f8.2971b8"]]},{"id":"83cf37cf.c76988","type":"ui_switch","z":"c02b79b2.501998","name":"","label":"Output","group":"61285987.c20328","order":0,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"on","onvalueType":"str","onicon":"","oncolor":"","offvalue":"off","offvalueType":"str","officon":"","offcolor":"","x":469,"y":342,"wires":[["9e58624.7faaba"]]},{"id":"cc79021b.9a751","type":"debug","z":"c02b79b2.501998","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":681,"y":216,"wires":[]},{"id":"4aecba01.78ce64","type":"mqtt in","z":"c02b79b2.501998","name":"","topic":"esp32/humidity","qos":"2","broker":"10e78a89.5b4fd5","x":473,"y":133,"wires":[["22efa7b7.544a28","df37e6b7.64c1c8"]]},{"id":"22efa7b7.544a28","type":"debug","z":"c02b79b2.501998","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":670,"y":100,"wires":[]},{"id":"21eae8f8.2971b8","type":"ui_chart","z":"c02b79b2.501998","name":"","group":"61285987.c20328","order":0,"width":0,"height":0,"label":"Temperature","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":681,"y":276,"wires":[[],[]]},{"id":"df37e6b7.64c1c8","type":"ui_gauge","z":"c02b79b2.501998","name":"","group":"61285987.c20328","order":0,"width":0,"height":0,"gtype":"gage","title":"Humidity","label":"%","format":"{{value}}","min":0,"max":"100","colors":["#00b3d9","#0073e6","#001bd7"],"seg1":"33","seg2":"66","x":660,"y":160,"wires":[]},{"id":"10e78a89.5b4fd5","type":"mqtt-broker","z":"","name":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"61285987.c20328","type":"ui_group","z":"","name":"Main","tab":"e7c46d5e.a1283","disp":true,"width":"6","collapse":false},{"id":"e7c46d5e.a1283","type":"ui_tab","z":"","name":"Dashboard","icon":"dashboard"}]

I must start the flow with: "http://localhost:1880/ui"
Which is the different ?

Kind Regards

Juergen B.

P.S: I'm new working with Node-Red

That doesn't start the flow, it points the browser to that address so it can see the nodes deployed on the dashboard. The flow is running whether you open the browser or not.

Thanks for the note, I will remember.

Juergen B.

Hello,
from another tutorial I used a flow to start also with:
http://localhost:1880/ui
Is it possible to change the start-name "ui" to ui2 ?

Kind Regards
Juergen B.

Hi @jbaben

You misunderstand what is happening when you access that url.

The examples you are following include a set of nodes provided by the node-red-dashboard module. This module can be used to generate a webpage with buttons/graphs and the like on. By default, you access that dashboard at the /ui url.

If you want the dashboard to be served on a different path, you can edit your settings file and look for the ui setting and change /ui to whatever you want. Then restart node-red.

Hello,
thank you for your answer. But how can I use two flows ?
I have saved both flow (the used the dashboard module) in my node-red ( flows_raspberryPi.json).
Or is this not possible ?

Kind Regards

Juergen B.

What do you mean by flows? If you mean tabs in the node-red editor then they will both run (in the sense of handling any messages they receive, or running any inject nodes that are set to repeat) as soon as you deploy. There is nothing else you need to do.
What is it that is not happening automatically for you?

Hello,
yes with flows I mean the tabs in the node-red editor.
To my problem:
I have in the node-red editor two examples using the dashboard module.
See here: [ https://randomnerdtutorials.com/esp32-mqtt-publish-subscribe-arduino-ide/] and here
[https://randomnerdtutorials.com/ac-pir-esp8266].
To display the values (temperature or movement), the tabs must be started with: http: // localhost: 1880 / ui.
But I can only start the last tab, since both are started with ... / ui.
That's why my question about "ui"

Kind Regards

Juergen B.

You should be able to switch between them using the hamburger menu in the dashboard

Hello,
I think now I have understand the handling of the various tabs with dashboard modules.
I have to switch the current one to active (enable) and the others to inactive (disable).

Kind Regards

Juergen B.