deancording / node-red-contrib-config Goto Github PK
View Code? Open in Web Editor NEWA Node Red node for setting global and flow context data at startup
License: MIT License
A Node Red node for setting global and flow context data at startup
License: MIT License
Help
Given a global array - lets call it gpio_out - of 40 integers...
How do I define and initialise that in the contrib node
I've tried a few variations none of which worked so far??
Hello Dean,
I'd like to extend the documentation of this wonderful node with a couple of sentences, graphics and examples. May I, is it of interest?
E.g. see https://github.com/lutzer/node-red-contrib-easing or https://flows.nodered.org/node/node-red-contrib-finite-statemachine.
Hi Dean,
your node is great for setting up context space.
With the new feature to reapply settings, the following features would be great:
overwrite config values by msg (e.g. msg = { topic: "update", payload:{ flow:{ key1:"value", key2:"value2" }, global: { keyX: 20 } })
provide method to store config (deploy) --> will provide persistence for flow/global context
(e.g. msg = { topic: "commit", payload:{ flow:{ key1:"value", key2:"value2" }, global: { keyX: 20 } })
provide config setting (Checkbox) to persist current config values on runtime shutdown ("close" )
br
Seb
PS: you may checkout node-red-contrib-contextbrowser - builds a great team together with node-red-contrib-config
I've been playing with the Node-RED v1.0.0 betas recently and this config node seems to be broken for those versions.
I have encountered a weird problem using config;
I have a number of flow settings that have default values set in the config node, and I then override these if required via a config file that is read by the flow during initialization.
It all seems to work ok, and if I look at the context the variables show the correct values after override.
One of the variables that I am overriding is the host tcp address for connected websockets
However, I have discovered that the tcp_request node goes to an error state if I have a different tcp address in the config node than I have in the config file. While, the context shows the correct host value the tcp_request goes to error state after about 30 seconds. Note- I am passing msg.host and msg.port to the tcp request node on every poll.
First thanks for this useful node.
What I would like to achieve:
Lets say, I have a property flow.test
with a value of 10
in the config node. Would it be possible to send a msg to the config node, e.g. with:
flow.test
to 5?Thanks in advance for considering.
Hello @DeanCording
first i want to thank you for this awesome node! During the first hours of using it, i thought of the following features to add:
Automatic naming
It would be nice, if the node automatically sets its name automatically based on the entry, if only one is set in a form like set to . If more then one entry was made inside the node, it stays simply at Config. With this in place, its much easier to see in thr canvas what the node i setting without the need to accessing it.
More value types
Before finding this node, i usually set my variables by using a combination of inject and change node. Some of my values are based on calculations. For example, if i want to set a timeout to 24h using miliseconds, i use the value type expression in the inject node and enter 10006060*24 as a value.
In the config node, i miss this feature, because the value type expression is not available at the moment.
In general it would be nice, if the config node provides the same value types as the inject node.
Thanks,
Uli
Hi Dean (@DeanCording),
Was just reading about the new Node-Red 0.19 version, which will be released in about 3 weeks.
Currently I load my config at flow startup using your contribution. However I assume that in the 0.19 version:
Do you have any advice on this?
In case we need to change something (?) in our flows, perhaps you could share that information on the forum?
Thanks a lot !!
Bart
As part of dockerised envs - if we can have option to set values using env variables - that would be very helpful
Can you please consider adding that option.
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.