Need help with node-red-node-random

I am having trouble being able to dynamically change the From and To Values on the random node.

I understand that if you leave the values blank it will default to 1-10. My plan is to be able to eventually have the user change these values within the dashboard. To learn the basics, I have tried the flow below but it does not seem to change anything when I inject them. Any help on what I am doing wrong would be appreciated

[{"id":"88fadd65b9040724","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"5b14b924b0b55ab6","type":"random","z":"88fadd65b9040724","name":"","low":"","high":"","inte":"true","property":"payload","x":520,"y":420,"wires":[["519e4a61faf0608d"]]},{"id":"1d4211b782562bef","type":"inject","z":"88fadd65b9040724","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"5","crontab":"","once":true,"onceDelay":0.1,"topic":"","payloadType":"date","x":330,"y":420,"wires":[["5b14b924b0b55ab6"]]},{"id":"de24ae3cbfe1f4dc","type":"inject","z":"88fadd65b9040724","name":"6 to 10","props":[{"p":"To","v":"10","vt":"num"},{"p":"From","v":"6","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":310,"y":360,"wires":[["5b14b924b0b55ab6"]]},{"id":"519e4a61faf0608d","type":"ui_gauge","z":"88fadd65b9040724","name":"","group":"59724156.b9182","order":0,"width":0,"height":0,"gtype":"gage","title":"gauge","label":"units","format":"{{value}}","min":0,"max":10,"colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":730,"y":420,"wires":[]},{"id":"4344849c67d0c01a","type":"inject","z":"88fadd65b9040724","name":"1 to 5","props":[{"p":"To","v":"5","vt":"num"},{"p":"From","v":"1","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":310,"y":300,"wires":[["5b14b924b0b55ab6"]]},{"id":"59724156.b9182","type":"ui_group","name":"random","tab":"d116ebd315ba9b1a","order":1,"disp":false,"width":"6","collapse":false},{"id":"d116ebd315ba9b1a","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

The random node doesn't remember previous values of msg.from or msg.to, you have to send them with every inject

You are sending msg.From and msg.To but it has to be msg.from and msg.to.

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