Giter Site home page Giter Site logo

s1r-j / node-red-contrib-loop-processing Goto Github PK

View Code? Open in Web Editor NEW
12.0 12.0 21.0 120 KB

Node-RED nodes to help flow looping.

Home Page: https://www.npmjs.com/package/node-red-contrib-loop-processing

License: Apache License 2.0

HTML 56.21% JavaScript 43.79%
loop node-red node-red-contrib

node-red-contrib-loop-processing's People

Contributors

s1r-j avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

node-red-contrib-loop-processing's Issues

flow attribute fall back to msg

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

Nested loops

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

While loop multiple true?

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.

image

Is the while loop periodically checking the global variable or what am I missing?

example flows for copy-and-paste to node-red?

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.

RFE and Docup - needs a way to break out of loop

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.

Comparing identical values returns false

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?

How to reset a counter

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

How to break array-loop node

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

array-loop

array-loop

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":[]}]

Not load using IE browser

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.