s1r-j / node-red-contrib-loop-processing Goto Github PK
View Code? Open in Web Editor NEWNode-RED nodes to help flow looping.
Home Page: https://www.npmjs.com/package/node-red-contrib-loop-processing
License: Apache License 2.0
Node-RED nodes to help flow looping.
Home Page: https://www.npmjs.com/package/node-red-contrib-loop-processing
License: Apache License 2.0
When specifying flow as array attribute it fall back to msg even if specified attribue as flow.get("value") or existing flow.value.
Regards
julien
Hello,
I'm trying to use the array-loop imbricated, like a loop, in a loop.
Do you confirm it does not work ?
Thanks for your feedback.
.Christian
Hi,
i got a issue using a while loop - may i´m just misunderstanding sth.
I start the loop daily a 3pm by an inject.
While loop is checking a global variable "brightness". When brightness is under 600 while loop is true and exits.
However i notice, that the command is sent multiple times.
For example the loop has just exited and the command was sent, but there is still a waiting "delay" which will send it again after the delay is finished.
Is the while loop periodically checking the global variable or what am I missing?
Only the comparator "smaller than" is foreseen. Is this by design ? Can I simply add other cases like >, >=, <=, == in other Options ? (new to html5 sorry)
yould you provide your example flows not only as an image,
but also as source-text to import into node-red?
would be helpful for a first start and first experiments with your function node.
or do i miss it somewhere?
great thanx.
like
loop 1/10
loop 2/10
...
It would be nice to show in the documentation how one could break out of the loop and/or cancel a loop with an incoming message.
also in the 'Usage' section you have a spelling error
Usage
Example flow is in examples/exmple.json. <===== missing 'a' in exmple.json
Drag & drop in your Node-RED editor.
I'm storing a value in a flow variable. Then when a new value comes in, I compare it with the stored value. If they differ, I execute a while loop and correct the value until they match.
However, for the While loop returns TRUE with this expression
msg.payload != flow.tiltAngle
even though both values are identical numeric values (-40 in this case).
What am I missing here?
icon: "font-awesome/fa-refresh"
In array-loop section, the image is counter-loop.
Hi,
I'd like to be able to reset the counter (or a while loop) to a new value and restart counting. In your examples that could be achieved by clicking two or more times on the inject node.
However it starts a second counter, probably because the node injects a distinct _msgid.
How could I achieve my goal ?
Txs
Matthieu
I use the array-loop node to browse the array,
I tried setting the node to break the array midway but it didn't work.
Please tell me!
Thanks.
For example, output to value C will break the array and continue to process outside array-loop
add repository property in package.json
When I run a sample flow I get an error from Array loop saying "Array is not array". Here is the flow that I am testing:
[{"id":"a80d83e2.deef3","type":"tab","label":"Flow 4","disabled":false,"info":""},{"id":"81c8aed9.81877","type":"inject","z":"a80d83e2.deef3","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":180,"wires":[["3094c433.7366cc"]]},{"id":"3094c433.7366cc","type":"function","z":"a80d83e2.deef3","name":"","func":"msg.payload = [\"A\", \"B\", \"C\"];\nreturn msg;","outputs":1,"noerr":0,"x":290,"y":180,"wires":[["a582d76.fde6428"]]},{"id":"a582d76.fde6428","type":"array-loop","z":"a80d83e2.deef3","name":"","key":"al5654908587b9b","keyType":"msg","reset":false,"resetValue":"value-null","array":"payload","arrayType":"msg","x":530,"y":180,"wires":[["8f5a5b6b.9e0438"],["ab0e205c.6d1ba"]]},{"id":"8f5a5b6b.9e0438","type":"debug","z":"a80d83e2.deef3","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":720,"y":180,"wires":[]},{"id":"ab0e205c.6d1ba","type":"function","z":"a80d83e2.deef3","name":"","func":"\nreturn msg;","outputs":1,"noerr":0,"x":510,"y":240,"wires":[["a582d76.fde6428","9675db64.aceec8"]]},{"id":"9675db64.aceec8","type":"debug","z":"a80d83e2.deef3","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":680,"y":260,"wires":[]}]
I noticed an error occurs when installing this node into the IE browser, this did not happen using the earlier version of the node.
Digging into the last changes included into the v0.4.0, there are some characters that are incompatible with the IE browser, specifically this line:
commit/78974702b23d0d1dc5c6d457728fe2197ddc1f22#diff-d1e192a5f310175b68d711da74311a70R151
that templates literals ( ${ expresssion }
), prohibit to load the node successfully.
I am agree to use this kind of expressions, because are more handy, but in this case could easily be replaced, and also become compatible again with IE ( of course if you wish that)
Regards!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.