/r/nodered

Photograph via snooOG

A place to share nodes and flows, and discuss Node-RED, a low-code tool for event-driven applications.

Node-RED is a drag and drop programming tool made by IBM Emerging Technology to automate the Internet of Things.

You can think of it as the glue that connects your phone to your air conditioner, so that your AC is on half an hour before you get home.

Project home page at: http://nodered.org

/r/nodered

14,773 Subscribers

2

Controlling a fan by both Radon and CO2

I've got a fan I want to control by both Radon- and CO2-levels. Whichever is "worse" must be the decider.

Fan settings are 0%, 25%, 50%, 75% and 100%

Radon-levels are 0-200

CO2-levels are 0-2000

If Radon = 200 and CO2 = 0 then the fan = 100%

If Radon = 0 and CO2 = 100 then the fan = 25%

If Radon = 100 and CO2 = 200 then the fan = 50% and so on.

Any pointers on how to do it?

2 Comments
2024/11/22
19:22 UTC

1

Tabulator torment

Hi all,

I have started using Node Red a couple of months ago and have managed to get data in and out of REST APIs following lots of examples online. I can also display JSON data on a Dashboard (2.0) with the standard table node.

My problem is, I now want to show tables with nested data.

Tabulator supports this but I have no clear examples of how to get this working,. I think I need to send commands to the tabulator node and then link it to the standard table? Can anyone provide or point me to a guide with examples of how to do this please? The tabulator site has lots of reference data but I don't know how to apply this to the Node Red workflow. I can only go so far on guesswork and limited coding experience.

Any pointers would be greatly appreciated.

2 Comments
2024/11/22
18:03 UTC

1

Node Red Chatbot with node-red-contrib-ai-intent - Stuck in Infinite Function Calling Loop

Hi everyone!
I'm developing a chatbot using Node Red and the node-red-contrib-ai-intent package, and I'm encountering a persistent issue with function invocation. The chatbot seems to get trapped in an endless loop, repeatedly calling the same function even when it should logically stop.

Specific details:

  • Tools/functions are defined for the chatbot to perform tasks
  • When certain conditions should halt function calls, the bot continues triggering the same function

Has anyone experienced similar challenges? Any insights on:

  • Debugging infinite loops in AI intent-driven chatbots
  • Implementing proper exit conditions
  • Configuring node-red-contrib-ai-intent to prevent recursive function calls

Any guidance or troubleshooting tips would be greatly appreciated!

0 Comments
2024/11/22
15:23 UTC

1

Can I use a global variable withun a node?

Hi,

I'm wondering: is possible to use a global variable in e.g., a change node, or do I need to replace it with a function node to be able to call the global variable?

Thanks!

2 Comments
2024/11/21
19:38 UTC

0

NodeRed Template/Tableify Issue

Hey guys, so amnew to node red and am still trying to learn it but I have an issue that i cannot solve If someone can help Pls !
So I want to display my database info in a table. If I use tableify it works perfectly, But I want to do it using a template node because it's more flexible.
Am using : http in (post) => Mongodb in => Funtion that collects data and does some math on the data => Tableify => Http response. So this works perfectly.

But when I use template instead of tableify (or even a template after tableify) it doesn't work anymore ( { template (the orange one) nor </> template (the blue one) ) and it's a huge obstacle for me ATM

If someone can help I would appreciate it <3

This Flow works well !

Here is the result of the first flow

But when I use a template : { template (the orange one) or </> template (the blue one) it doesn't work anymore.

https://preview.redd.it/a29nbeqq5b2e1.png?width=1098&format=png&auto=webp&s=eb91492d04785fe8133c44febc95718b9a442103

https://preview.redd.it/3wkx9alw5b2e1.png?width=395&format=png&auto=webp&s=a2dc58f5e24ee6a02623de54f885850a85f17960

I used a debug node in each step and I have the problem specifically in the template.

If anyone knows how to fix this problem, I would appreciate the help ! much love reddit <3

3 Comments
2024/11/21
13:30 UTC

7

A dashboard built for smart retail inventory monitoring & unauthorized intrusion monitoring

0 Comments
2024/11/19
07:16 UTC

21

I've written a Node-RED column with 88 articles to help people who want to learn Node-RED and use it for their projects.

I'm a Chinese software technology blogger who has been blogging consistently for more than 8 years, and all my posts are on CSDN (China's largest technical communication community). I wrote a column about Node-RED, there are more than 80 articles, contains the basic concept of Node-RED explanation, use, component development, business case design, and some project examples I did using it. But these documents are all in Chinese, I don't know if anyone needs them. Here's the link to the column.

https://blog.csdn.net/github_35631540/category_11294112.html

If anyone wants to know more about it, feel free to write to me privately, and if anyone wants technical support for Node-RED, I'd be happy to help.

2 Comments
2024/11/19
01:55 UTC

2

I’m working on a project with a DHT11 sensor, potentiometer, and LED (acting as AC).The LED should turn ON when the potentiometer value exceeds the temperature. I also added an override mode to manually control the LED with serial commands (OVERRIDE_ON and OVERRIDE_OFF), but it’s not working

1 Comment
2024/11/18
12:20 UTC

2

Can I find the Xilinx Zynq 7020 IO Library?

Hello Redditors,

I wanted to ask a small question, I am currently working with a Zynq 7000 series SoC module and have Node-Red installed on it via Embedded Linux, can you also find a library for Zynq 7020 IO pins? like Raspery pi?

My board is a Digilent Pynq-Z1

Thank you!

0 Comments
2024/11/17
15:46 UTC

3

Inject node changes—no longer a button?

I use node-red as a home-assistant add-on. Both are up to date, with the add-on version 18.1.1. Everything has been working, but since I last touched node-red, at some point none of the Inject nodes work as buttons in the interface. They'll work as expected at specific times etc, but can't be used as a push-button any more for debugging. I've scanned the changelogs, but don't see anything really relevant.

Is that new behavior, or am I missing something stupid?

4 Comments
2024/11/17
02:03 UTC

1

Extract Value using Switch Note

Hi,

Nodered Noob here.

I am trying to get power readings form my shelly PM mini.

In the picture is the Output from the Shelly API. The only problem is the ":" in "pm1:0".

Please could someone telly me, how to extract the "apower" value. All my attempts failed because of the ":"

https://preview.redd.it/cey5peh96j0e1.png?width=523&format=png&auto=webp&s=e1e6c10d56284295e7b8a60f85d1ff92d95abb43

3 Comments
2024/11/12
20:33 UTC

6

Unlocking the Power of Real-Time Data: FlowFuse MQTT Broker for Industrial Transformation

FlowFuse MQTT Broker for Industrial Transformation

Optimize your industrial processes with FlowFuse MQTT Broker, a new service that simplifies real-time data access.

In today's rapidly evolving industrial landscape, real-time data is the key to unlocking operational efficiency and driving innovation. However, managing and utilizing this data effectively can be a significant challenge. Legacy systems, disparate data sources, and complex integration processes often hinder organizations from harnessing the full potential of their industrial data.

This is where an MQTT Broker can help. It acts as a central hub, facilitating communication between devices and applications by receiving, filtering, and distributing messages.

About the Webinar:

In this webinar, we'll introduce the FlowFuse MQTT Broker, a seamless solution that enables you to manage all your MQTT clients, Node-RED instances, and devices from a single, centralized platform, eliminating the need for a separate broker service.

Join Nick O’Leary, creator of Node-RED and CTO at FlowFuse on November 27, 2024, at 17:00 CET (11:00 AM ET) to learn about :

  • The advantages of MQTT for industrial communication
  • Key features and benefits of the FlowFuse MQTT Broker
  • How to integrate FlowFuse with existing industrial systems

Who Should Attend?

This webinar is perfect for:

  • Automation Engineers
  • Operational Technology (OT) Leaders
  • Anyone looking to optimize their industrial processes and accelerate digital transformation.

Register now to secure your spot and take the first step toward transforming your industrial processes with FlowFuse!

🔗 Register Now

0 Comments
2024/11/11
14:00 UTC

1

Issues with node red & telnet / ssh

Hey guys.

I have a device I’m trying to control via Telnet. I can control it just fine with basic strings through Telnet via putty, though as soon as I try via node red I get all sorts of whacky outcomes.

Tried with SSH aswell, and I get errors back on the SSH authentication (which is odd as there’s no password).

I spent afew hours trying to debug with chatGPT, to which got to a point where it seemed the command would be sent correctly as per debug, though no actual state change was made on the device. And expected feedback message from the device was different.

Does anyone have any pointers / suggestions to try and resolve this?

Very confused why I can send a basic string command in putty and it works perfectly but trying the same thing on node red just errors out.

Thanks!

11 Comments
2024/11/10
01:01 UTC

3

Google classroom into mode red

Integrating node red with Google Classroom

I am a student who uses Notion for all my college work. I am looking at integrating Notion into node red, and I wondered if there is a way to integrate Google Classroom into node redt too, so I can use node red to create flows such as 'when assignment added to classroom, create task in database' with the title and date etc. I have already tried this in Pipedream and it works however I am limited to 3 workflows. Does anyone know of anyway to integrate Google Classroom to node red? I don't have much knowledge of coding however can try and teach myself if someone can explain the basics of how to create such an integration

4 Comments
2024/11/06
07:24 UTC

7

Is this the proper way of turning light on?

17 Comments
2024/11/05
23:41 UTC

1

'Connect Socket Failed' error while trying to send a message to node red (via HTTP) through lte modem (SIM A7670c) using AT commands

I am trying to send a message using my lte modem (SIM A7670c) to cloud. I am interested in making use of the http protocol for achieving the same. I also set up a node red flow as shown below. I tried sending http request using the modem's at commands, but it responds with an error - 'connect socket failed'. To refine the issue to the modem or node red or server, I made use of MQTT protocol instead of HTTP and just replaced the 'http in' node in the flow to a 'mqtt in' flow. The message sent using at commands was received. So, I think its safe to presume that the modem is working just fine. Then, I used Postman to a HTTP request to the same url and I was able to notice the requests in the debug panel of the node red flow. I have also tried to send HTTP request from the modem to ThingSpeak instead of NodeRed and it works. But, how does this error occur when we try to connect the modem to node red. I have done multiple attempts and wasn't able to get over it. I have attached the AT commands I have used and also the http AT command list of the modem. Any views/ opinions on tackling this situation is welcome. TIA

node red flow

at commands used

list of http at commands

https://preview.redd.it/no9k6uph72zd1.png?width=479&format=png&auto=webp&s=7d14669890c0ed13d147328b57326125841e9035

details of the at command for setting http parameters

5 Comments
2024/11/05
10:25 UTC

3

Best practice for MQTT sources

I am a complete beginner with node-red, and have just started tinkering about with zigbee2mqtt and a couple handful sensors and lights.

I was wondering, what is the best practise when it comes to MQTT input?

Is it having a single input node listening to all messages in the zigbee2mqtt topic and then branches out and maybe connects to other flows?

or

Having multiple MQTT in nodes listening to only relevant topics for the flow it is placed in?

The reason I am asking is that I can see that node-red establishes separate connections per MQTT in node, which will result in many connections to the MQ server.

12 Comments
2024/11/04
18:40 UTC

2

Storing data

Hello all,

I am trying to store data from my p1 port of my electricity meter. This spits out data every second. This has 34 variables. Now I tried to put that in a csv file but after some time my pi zero 2 started to become very slow and not responding and accessible via the website. I had to pull the plug and restart and start node red in safe mode from putty. I checked the file and it is 17mb after 1 week or so. Is this (too) big? Does anyone have advise on how to store this data. Should I for example start a new file every day or is once a month enough? Thanks in advance.

9 Comments
2024/11/04
10:37 UTC

2

Node-RED on iot2050 native installation or docker

Hi !
I plan to install a node-RED instance on an IOT2050 advance from Siemens in production.
On this device, the disk space is limited to 16GB.
What would be the best solution a node-RED docker container or a native installation ?

I plan to have the MQTT broker mosquitto, too.

I'm afraid that the docker would use more disk space. But on the other hand, I could create a backup image of the container (configuration + flows) which would be easier to deploy in case of crash.

3 Comments
2024/10/31
11:05 UTC

3

What will happen to my existing flows if I set NODE_RED_ENABLE_PROJECTS to true?

I sure hope they get integrated in the version control? can you also connect it to github?

7 Comments
2024/10/29
14:52 UTC

1

How best to do if/else logic based off a value stored within a file.

I'm very new to node red and home assistant in general, but my first project has been automating my IR ceiling fan with a zigbee IR blaster and a zigbee wall switch.

What I want:
- If I press the left switch, this toggles the light on and off (done)
- If I press the right switch, this turns on the ceiling fan at the speed it was on previously (value stored in a file, sends the right IR code as a payload based upon the value stored in file)
- If I press the right switch again while the fan is on, it sends the payload to the fan off button.

- If I press and hold the right switch, it cycles the value stored within the file.

I am not sure what is the best way to do these things in Node Red, can anyone please help a newbie out?

6 Comments
2024/10/28
11:38 UTC

2

Time clock on/off Switch (Christmas lights)

Hi there, I have a very simple flow that turns on/off a shelly (which my christmas lights are connected to) at certain time a day.
But the same outlets I use for my christmas lights are also used for other stuff during the year. Therefore I want a Switch in my Dashboard 2.0 that Basically allows the Time based activation to work or not to block it if the switch is turned off.
I think it is very easy to do with an "if (switch is on) then pass on the received function to the shelly; else dont do anything". But im to new to node red and json to actually implement it.
It would be great if you could help me out, probably done quickly for the pros :)

I left out my specific Shelly information, but the shelly is connected and works, I checked.

https://preview.redd.it/ch9xzwmgjgxd1.png?width=830&format=png&auto=webp&s=b3788e3cf2a8fc726a90c4813c6c008764d26239

[

{

"id": "1ecb09b1a8e9c9f1",

"type": "function",

"z": "c3c9639b29b171fb",

"name": "0 on",

"func": "msg.payload = {\n method: \"Switch.Set\",\n parameters : {\n id : 0,\n on : true,\n \n }\n};\nreturn msg;",

"outputs": 1,

"timeout": "",

"noerr": 0,

"initialize": "",

"finalize": "",

"libs": [],

"x": 510,

"y": 160,

"wires": [

[

"46d8129945cd99ec"

]

]

},

{

"id": "9c07e75deb355aee",

"type": "function",

"z": "c3c9639b29b171fb",

"name": "0 off",

"func": "msg.payload = {\n method: \"Switch.Set\",\n parameters : {\n id : 0,\n on : false,\n }\n};\nreturn msg;",

"outputs": 1,

"timeout": "",

"noerr": 0,

"initialize": "",

"finalize": "",

"libs": [],

"x": 510,

"y": 240,

"wires": [

[

"46d8129945cd99ec"

]

]

},

{

"id": "f718049e4bd1c324",

"type": "inject",

"z": "c3c9639b29b171fb",

"name": "Switch on Timer",

"props": [

{

"p": "payload"

},

{

"p": "topic",

"vt": "str"

}

],

"repeat": "",

"crontab": "00 18 * * *",

"once": false,

"onceDelay": "",

"topic": "",

"payload": "Time",

"payloadType": "str",

"x": 310,

"y": 160,

"wires": [

[

"1ecb09b1a8e9c9f1"

]

]

},

{

"id": "211de484376b3b07",

"type": "shelly-gen2",

"z": "c3c9639b29b171fb",

"hostname": "",

"description": "",

"mode": "polling",

"verbose": false,

"server": "",

"outputmode": "event",

"uploadretryinterval": 5000,

"pollinginterval": 5000,

"pollstatus": false,

"getstatusoncommand": true,

"devicetype": "",

"devicetypemustmatchexactly": true,

"captureblutooth": false,

"outputs": 1,

"x": 890,

"y": 200,

"wires": [

[]

]

},

{

"id": "46d8129945cd99ec",

"type": "ui-switch",

"z": "c3c9639b29b171fb",

"name": "",

"label": "Its Christmas Time!",

"group": "",

"order": 0,

"width": 0,

"height": 0,

"passthru": false,

"decouple": false,

"topic": "topic",

"topicType": "msg",

"style": "",

"className": "",

"layout": "row-spread",

"clickableArea": "switch",

"onvalue": "true",

"onvalueType": "bool",

"onicon": "",

"oncolor": "",

"offvalue": "false",

"offvalueType": "bool",

"officon": "",

"offcolor": "",

"x": 690,

"y": 200,

"wires": [

[

"211de484376b3b07"

]

]

},

{

"id": "f13f10491e634e5b",

"type": "inject",

"z": "c3c9639b29b171fb",

"name": "Switch off Timer",

"props": [

{

"p": "payload"

},

{

"p": "topic",

"vt": "str"

}

],

"repeat": "",

"crontab": "00 00 * * *",

"once": false,

"onceDelay": "",

"topic": "",

"payload": "Time",

"payloadType": "str",

"x": 310,

"y": 240,

"wires": [

[

"9c07e75deb355aee"

]

]

}

]

7 Comments
2024/10/28
08:28 UTC

2

Fish already fed indication

Hello guys,

I need an advice from you. I think it will be easy to setup but I'm too bad with NodeRed to be able to build this.

Basically I need indication that my fish tank was fed in last 24 hours because my kids want to feed them too.

Flow will look like this:

When I press a button then diagram will check if this button was pressed in past 24 hours. If it was not pressed in past 24 hours then the light will blink once. If the button was pressed in past 24 hours then the light will blink twice.

So I will know if I can feed them or not.

Thank you for your help guys !!

5 Comments
2024/10/27
20:20 UTC

1

Nodered Homekit Switch

Hello, I use nodered to activate the nest thermostat based on the temperature of a sensor I have in the bedroom. Do you know if:

  1. Is there a way to create a virtual switch that shows in Homekit, by which I can turn on/off the flow?

  2. Is there a way to create a virtual "setting button" that shows in Homekit, where I can change the temperature threshold in the node in nodered that triggers nest to switch on?

Thank you.

24 Comments
2024/10/26
15:42 UTC

7

Connecting multiple PLCs

Hello,

I am looking into Nodered as a tool to collect data from several PLCs (mostly siemens S7 and allen bradley)

Here I have around 35 PLCs. this data would be then stored into a SQL database.

How well does nodered handle several PLCs? Do I need to create several flows/nodes, one for each plc?

8 Comments
2024/10/26
10:17 UTC

2

Secure Communication across the web and lan

Hi,
So I am going to need to have 2 Node red clients talk to eacher other across lan and across the web. the issue with that is i'd like to use wss (if that uses ssl) for over the web connections. I was told that wss would be easier to do then mqtt

Edit: sorry this didn't sound like a question I forgot to ask if It is possible to add ssl to the websockets in node red, I don't see an option for it

6 Comments
2024/10/26
05:47 UTC

0

Anyone has a tutorial on how to implement a template ?

i really need it to change ui design

4 Comments
2024/10/24
23:23 UTC

1

convert buffer to blob in node red

i get a buffer in read node of storage, i need to convert it to blob to make a post api call where key is "file" and blob is value in function. I got no solution. The file can be anything.

Actually, I need to make an POST API call with param "file" and "data". file should be "binary" and data should be "json". I need a flow for this. Can anyone help ?

2 Comments
2024/10/24
14:34 UTC

Back To Top