Git Product home page Git Product logo

cookbook.nodered.org's Introduction

node-red.github.io

Node-RED Site

Contributing / Fixes

For simple typos and single line fixes please just raise an issue pointing out our mistakes. If you need to raise a pull request please read our contribution guidelines before doing so.

cookbook.nodered.org's People

Contributors

dceejay avatar knolleary avatar mblackstock avatar ryoichi-obara avatar sammachin avatar

Stargazers

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

Watchers

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

cookbook.nodered.org's Issues

Feedback on 'Trigger a flow if a message isn’t received after a defined time'

Currently, the Trigger node can be configured to fire one time when an incoming message is not rec'd. I would like an option that it will continually trigger at the specified interval if a message is not rec'd (I. E., until a valid message is rec'd). My current need is to continue to send data to a graph until the actual data flow is rec'd again. The triggered data is to indicate on the graph that data was not rec'd during the indicated time frame. As it is, the graph line will be drawn between the last rec'd data point and the first resumed data point, without any indication that data was lost.
Another example might be to ping a device every 5 minutes, and if the ping is unsuccessful use the Trigger node to send a reset command. The Trigger node would know when to send the first reset, but if a ping is not restarted I'd want the Trigger node to send another reset after 5 more minutes.
I'm still new to NR and I'm sure there's a way to do what I need, but I think an additional option in the Trigger node would be a great place to put it. Thanks for listening.

join nodes really organize and send three different topics?

In https://cookbook.nodered.org/basic/join-streams you've mentioned

it will send on a message each time it receives at least one message from three different topics

But I got a message from this join node when I inject a same temperature node 3 times,
{ temperature: 10 } (It has no humidity and pressure).

Is that page said correct especially "at least three different topics"?

Feedback on 'Create an HTTP Endpoint'

I am attempting to learn how to use Node Red for a project that I am working on. I have installed Node Red on my workstation it appears to be working correctly. Opening Node-red @ 127.0.0.1:1880.

Using the Node Red Cookbook as a tutorial, I am trying to generate an interactive web page. Starting with HTTP endpoints, I follow the instructions, get a HTTP In node, a Template node, HTTP Response node and wire them together. I add the HTML code to the Template node.

What address do I put in the browser to see "Hello World"? 127.0.0.1:1880/???

I am missing how to view the response and need this most basic step to move on.

Thanks,

Jim

Feedback on 'Simple GET request'

Hello

I think the css selector has changed. It now works with .package__counter___2s5Ci instead of .pretty-number

many thanks

Feedback on 'Set the URL of a request using a template'

' The Change node changes this to msg.post'

Does the change node serve any purpose in this example?
The http request node info reads;

'..if the url is set to example.com/{{{topic}}}, it will have the value of msg.topic automatically inserted.'

i.e. msg.topic not msg.post

Feedback on 'Create an HTTP Endpoint'

flow deployed
"curl http://localhost:1880/hello"
gives :
Unauthorized
..
I think this is due to basic authorization security. user ... user/password

(Is it possible to include in request ie curl statement ?) hum...

if done with a web browser (ie http://localhost:1880/hello) , the browser asks for credentials, then the node works and gets triggered.
so the curl could be
"curl http://localhost:1880/hello -u user"
this will prompt for password. With correct password the correct response will be displayed.
This, of course, is not ideal for automated process.

Feedback on 'Set the URL of a request using a template'

The intent of this recipe was to set the url using the node's built-in templating functionality - not to use a Template node.

I would suggest the problem statement should be:

You want to dynamically set the URL of an HTTP request where only parts of the url change between requests.

Is monitor the CPU load enough to understand if we have this problem?

Can we simply monitor CPU, better daily graph of CPU usage, to be sure we haven't benn hacked?
Can you please explain how to wipe service (as you suggested) and reinstall it safely without reinstall Raspbian and reconfigure all? (in my case not few time)
Are modules in github (or installing by palette) possible infected? Or the hack can come ony from internet?
How to change the TCP port number listening?

SOrry for lot of questions, thanks for help!

Feedback on 'Delete a message property'

Small Feedback for documentation:
Your div block is too small and narrow and need to scroll everytime to check the contents.
Its too much annoying as content kept in small and narrow div, its make difficult for comparison with respect to other nodes.

Better remove this line which is no use ie max-height and the overflow-y:
div.flow pre {
/* max-height: 100px;
overflow-y: scroll; */
}

Feedback on 'Basic recipes'

Suggests going to #docs in Slack to discuss/contribute, but Slack doesn't appear to have such a channel (I see only #faq, #general, #projects, and #random).

Feedback on 'Connect to an MQTT Broker'

[{"id":"2c6873d2.992abc","type":"mqtt out","z":"eda2a949.74ea98","name":"","topic":"sensors/livingroom/temp","qos":"","retain":"","broker":"407a01e4.6b637","x":330,"y":80,"wires":[]},{"id":"d9beed59.94155","type":"inject","z":"eda2a949.74ea98","name":"","topic":"","payload":"22","payloadType":"num","repeat":"","crontab":"","once":false,"x":150,"y":80,"wires":[["2c6873d2.992abc"]]},{"id":"be80048.8f232f8","type":"mqtt in","z":"eda2a949.74ea98","name":"","topic":"sensors/livingroom/temp","qos":"2","broker":"407a01e4.6b637","x":170,"y":160,"wires":[["8640b8ff.f82ff8"]]},{"id":"8640b8ff.f82ff8","type":"debug","z":"eda2a949.74ea98","name":"","active":true,"console":"false","complete":"false","x":370,"y":160,"wires":[]},{"id":"407a01e4.6b637","type":"mqtt-broker","z":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]

Two similar links to /http/simple-get-request from Table of Content.

Are you sure you want to link to page under http category from basic?

There's a link - [Simple GET request](/http/simple-get-request) in /_includes/indexes/http.md

There's also a similar link - [Extracting data from an HTML page](/http/simple-get-request) in /_includes/indexes/basic.md

Feedback on 'Parse CSV input'

How can iterate the msg.payload Object array.

I have an message array as below from the CSV file, how can i have a function to iterate.

Regds
Rahul.

[{"Sensor_Value":"0-200","Computed_Value":10},{"Sensor_Value":"200-300","Computed_Value":20},{"Sensor_Value":"300-400","Computed_Value":30},{"Sensor_Value":"400-500","Computed_Value":40},{"Sensor_Value":"500-600","Computed_Value":50},{"Sensor_Value":"600-700","Computed_Value":60},{"Sensor_Value":"700-800","Computed_Value":70},{"Sensor_Value":"800-900","Computed_Value":80}]

Feedback on 'Simple GET request'

Hello,

Your example does not work correctly because the website has changed.

The CSS selector's .pretty number has been changed to .package__counter ___ 2s5Ci.

Can you please correct it?

Many Thanks!

Regards
Dirk

Accessing global context from httpAdmin?

I am writing a custom node, and the intention is that on a successful connection, a token is generated along with some additional attributes that I would like to persist on the node config.

Standard approach has the config node attributes and credentials directly store the returned data. However, this may change over time based on periodic checks, and it should reflect that new state on the config node without having to redeploy.

So the approach I believe may work is to use the http communication with the httpAdmin nodes to set and get the state. I can then query that state on the http oneditprepare and set it on successful config.

I was looking to then use the global context within the httpAdmin endpoints:

RED.httpAdmin.get("/allow2/paired/:id", RED.auth.needsPermission('Allow2Pairing.read'), function(req, res) {
    const nodeId = req.params.id.replace(/\./g, '_');
    const pairing = JSON.parse(RED.globalContext.get('allow2_pairing_' + nodeId) || "{ paired: false }");
    res.json(pairing);
});

RED.httpAdmin.post("/allow2/paired", RED.auth.needsPermission('Allow2Pairing.write'), function(req, res) {
    const nodeId = req.body.id.replace(/\./g, '_');
    RED.globalContext.set('allow2_pairing_' + nodeId, JSON.stringify({
        paired: true,
        children: req.body.children
    }));
    res.json({ status: 'success' });
});

This means that should the token no longer be valid, I can detect that on opening the config node and present the correct interface to gain a new token (shouldn't happen very often). And I can use the config id to retrieve the "children" information at any time to correctly show dropdown values in other nodes.

The complexity is, I believe, that I can't get to the global context from 'RED', only from a node itself, but as none may be deployed in a vanilla installation, then I cannot get to the global context. Is there a way to get a handle to the global context from "RED"?

Alternately, I can also potentially cache the value in memory and then perform the write to global context on deployment, that is a bit of a kludge though.

Alternately, I could also do my own direct file persistence using OS functions from within httpAdmin endpoints.

Any suggestions on a better "preferred" approach?

Feedback on 'Serve a local file'

Where do I find the "File In" node ?
I'm running on Bluemix so I guess its not available there. I used Dropbox as an alternative which works fine

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.