/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,710 Subscribers

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!

4 Comments
2024/11/10
01:01 UTC

2

Teensy 4.0 with NodeRED

Does NodeRED support the teensy 4.0? I have got it partially working, with pin 13 (LED pin) working, however any time I change to use another pin (like 16), nodered stops running and I have to restart it.

0 Comments
2024/11/08
14:05 UTC

2

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

3 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

6

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

2

Node-RED flows editor loads incorrectly

Hi, I was just rearranging some nodes and when I deployed the changes, the page refreshed and looked like something gone wrong loading the page... It loads just fine using other browsers. Anyone has any ideas, what might cause it, or how to fix it? Thanks in advance!

The view after looking up Node-RED

Edit: Using the Network and Application tabs in the Inspect element option I was able to locate the remains of a Http node's WebSocket mode that caused an error even after removal because Brave didn't clear the cache on its own. Clearing it manually fixed the problem.

4 Comments
2024/10/20
10:42 UTC

4

What's a project you've successfully implemented using Node-RED, and what challenges did you overcome ?

24 Comments
2024/10/18
17:43 UTC

3

Cheerio works great! HTML parsing like a charm but the node that cheerio comes with throws syntax errors, how do I get rid of the error messages?

2 Comments
2024/10/18
05:56 UTC

0

What’s the Most Complex Node-RED Flow You’ve Built? ⚙️

Let’s see who’s created the most intricate flows! Share your projects and teach others how to get started.
Curious about cast iron benefits? Read more here.

1 Comment
2024/10/15
20:00 UTC

1

Date Switch

Hey all-

Is there a date switch, similar to this time switch: https://flows.nodered.org/node/node-red-contrib-time-range-switch ?

I'm looking for a way to run a set of commands October 15th through March 15th, that differ from the commands that need to be run March 15th through October 15th (peak energy usage stuff).

Thanks so much!

5 Comments
2024/10/14
20:39 UTC

11

New Tutorial: Data Visualisation in FlowFuse Dashboard (Dashboard 2.0)

Hi Everyone, quickly following on from Part I, we now have Part II available, this time focussing on how to do data visualisation in FlowFuse Dashboard (a.k.a. Node-RED Dashboard 2.0)

You can watch the full video here: Thank you to the many of you that commented on my forum post and GitHub issue with ideas/requests.

0 Comments
2024/10/14
15:49 UTC

18

New Tutorial: Getting Started with Node-RED & Dashboard 2.0

https://preview.redd.it/fh3d5jv7mqud1.png?width=2560&format=png&auto=webp&s=3e36ba91431ba956e5d3a173a0454eee4bf8e7c4

We're publishing a new series of tutorials to help you get up and running with FlowFuse Dashboard (a.k.aa Node-RED Dashboard 2.0).

Video: https://www.youtube.com/watch?v=DFNv91TTt68

The first in the series focusses on getting up to scratch with the basics of Node-RED, and adding your first interactive elements of a Dashboard. We'll be publishing many more over the next couple of weeks.

0 Comments
2024/10/14
15:09 UTC

1

current state node

is it possible to compare two different sensor state in a state node?

i would like to have something like that: sensor_living_temp > sensor_out_temp

https://preview.redd.it/c48xh6uz8pud1.png?width=495&format=png&auto=webp&s=98790b9c4dc21c48faa39b5edbbc8d7b6740b2b8

2 Comments
2024/10/14
10:32 UTC

1

dfrobot Gravity I2C GP8403 DAC node?

I'm currently trying to find a way to control a 0-10v fan and Thread Gravity DAC was recommended by online forums.

https://thepihut.com/products/gravity-2-channel-i2c-dac-module?srsltid=AfmBOooEab_QjgU_Fvdh3Y7qKco0BqBJmYLzsJuW2PyMUgs2bMuBQuXc

I'm using NodeRed with a Raspberry Pi for my project (MEV controller) and struggling to find a node or example flow for this DAC module. Is anyone able to help me please?

Many thanks

2 Comments
2024/10/13
08:21 UTC

11

node-red-spreadsheet-template v1

I wrote a node with nrg to render spreadsheets using a spreadsheet template.

https://github.com/AllanOricil/node-red-spreadsheet-template

In this next link you can find all nodes that adheres to the nrg standards

https://github.com/AllanOricil/nrg-cli?tab=readme-ov-file#-examples

0 Comments
2024/10/12
16:53 UTC

2

Trouble Converting a HA script to Node Red

I'm really digging Node Red with Home Assistant and have been learning a lot through trial and error, but I've been stymied for days on converting a simple script to Node Red.

Basically, I created the simplest of scripts - no triggers - just a command sent to an Inovelli light switch. The data is:

alias: OfficeLEDColorTest
sequence:
  - type: issue_all_led_effect
    domain: zha
    device_id: 6eea347f6c65d38a1ef65d01dc269d15
    effect_type: Fast_Blink
    level: 100
    duration: 10
    color: 9
description: >-
  This will blink the office light switch a specified color.
icon: mdi:led-on
fields: {} 

All the references I see is to use the call service node, but to my understanding, that has been replaced with the Action node. I don't see any place to set the domain (which appears to be present on the Call Service node), and issue_all_led_effects is not present in the selectable actions on the Action node. I'd appreciate anyone sharing their ideas.

7 Comments
2024/10/11
17:07 UTC

1

MQTT Connectivity Issues

I'm really struggling trying to get a node-red to connect to an MQTT broker on my network. I have an MQTT broker installed on my Home Assistant Server, along with Node-Red. I've been using examples on the internet, but it will not connect. To verify the broker is listening to external traffic, I can telnet from a different machine on my network to port 1883 on the MQTT broker server. On the Node-Red side, it never shows the "connecting" or "connected" indicator. In Node-Red, I have the server set to MQTT v3.1.1, using port 1883. I've tried with and without credentials. All of the traffic is on my own private network, so I don't have any need for security. If I use an MQTT explorer, I don't see any traffic from the Node-Red side. Any suggestions on where I could look to get some more details on what might be going on? Thanks

12 Comments
2024/10/11
13:03 UTC

Back To Top