开云体育

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Sticky Getting started with Node Red


 

Hi All,

For anyone getting started with Node Red, first check out the WiKi to get your Pi loaded with an OS and Node Red.

Next, check out these videos that Andy, VA3CW found on YouTube. The videos will help you to start using Node Red.


In the files section in this group there are plenty of flows to get you started. If you use a Flex 6000 series radio you can load my VITA49 and FlexRadio flows. I am modifying the FlexRadio flow shortly to automatically detect the model number of your radio and set the meter subscriptions accordingly. Please look for a read.me file in each file folder which describes any node dependencies and any other info required for those flows.

A note to people who have uploaded flows - Create a folder with your callsign then upload your flows to that folder. Create a read.me file with Notepad or other text editor listing any extra nodes that you have installed for your flows. This will help new users to get up and running. I can assist in moving previously uploaded flows from the main file folder to your callsign folder.

If there is anything else you can think of to help please let me know.

73
Dave wo2x


 

Dave,? I have added a readme.md in my directory.??

Mick


 

开云体育

Thanks!?

Dave

Sent from my waxed string and tin cans.?

On Jan 11, 2021, at 6:51 PM, Mick <w8bea2b2c2@...> wrote:

?Dave,? I have added a readme.md in my directory.??

Mick


 

Dave is there any way to get the markdown file to open in a browser instead of downloading it.? ?I coded it using markdown but I can only download.? Would be nice if you click on the link and have it open in a browser like the wiki pages.

Mick


 

Sure. It's easy to start writing flows similar to BLINK and turn an LED on from an input. But once I get past that point it's like drinking from a fire hose.

I've been trying to figure out how to do a simple task like multiply two numbers together. I have a data stream coming in through a Serial port that is working and using a CALCULATOR node I can divide that by a constant. But I need to multiply it by a number from an INJECT node. I haven't found any tutorial that tells me how to do that that doesn't assume I'm an expert in NODE RED and JAVA.

Can anyone point me in the right direction? It's obvious I'm missing something very fundamental here. This should be easy.

Fred
K9SO


 

开云体育

Many ways to get there.?

From the Inject, take that msg.payload and you can use a Change node to set the msg.payload to flow.x (or any other name).

Feed the msg.payload to a function node.

var y = flow.get(“x”);

msg.payload = (msg.payload * y);

return msg;

You could probably condense into single function node.?

73
Dave wo2x

Sent from my waxed string and tin cans.?

On Jan 25, 2021, at 12:38 PM, wa9mvz via groups.io <wa9mvz@...> wrote:

?Sure. It's easy to start writing flows similar to BLINK and turn an LED on from an input. But once I get past that point it's like drinking from a fire hose.

I've been trying to figure out how to do a simple task like multiply two numbers together. I have a data stream coming in through a Serial port that is working and using a CALCULATOR node I can divide that by a constant. But I need to multiply it by a number from an INJECT node. I haven't found any tutorial that tells me how to do that that doesn't assume I'm an expert in NODE RED and JAVA.

Can anyone point me in the right direction? It's obvious I'm missing something very fundamental here. This should be easy.

Fred
K9SO


 

Fred

Read up on variable types.? There are very good tutorials on the Node-Red.org web site:



In your case, you want to do the math on two variables.? The problem is getting both variables into the same node at the same time.

-Messages "flow" through?the nodes.? They only exist in the node in one instant of time, then pass to the next node.

- Context variables are stored in Node-Red memory and can be called into a function for doing the math.? As Dave points out, you must first get your variables stored in "context", then pull each into a function to do the math.

There are lots of ways to get a message to a context variable.? A common way is to use the change node.? Say you want to put the payload into a context location called ""

Screen Shot 2021-01-25 at 12.55.13 PM.png

Then to add "xyz" to "abc" in a function node and output the result to "msg.payload"

Screen Shot 2021-01-25 at 12.57.06 PM.png

Alan

On Mon, Jan 25, 2021 at 12:38 PM wa9mvz via <wa9mvz=[email protected]> wrote:
Sure. It's easy to start writing flows similar to BLINK and turn an LED on from an input. But once I get past that point it's like drinking from a fire hose.

I've been trying to figure out how to do a simple task like multiply two numbers together. I have a data stream coming in through a Serial port that is working and using a CALCULATOR node I can divide that by a constant. But I need to multiply it by a number from an INJECT node. I haven't found any tutorial that tells me how to do that that doesn't assume I'm an expert in NODE RED and JAVA.

Can anyone point me in the right direction? It's obvious I'm missing something very fundamental here. This should be easy.

Fred
K9SO


 

开云体育

That was for addition.

?

In Alan’s example it would be msg.payload = xyz * abc;

Return msg:

?

?

From: [email protected] <[email protected]> On Behalf Of Alan Blind, WA9WUD
Sent: Monday, January 25, 2021 1:00 PM
To: [email protected] Group Moderators <[email protected]>
Subject: Re: [nodered-hamradio] Getting started with Node Red

?

Fred

?

Read up on variable types.? There are very good tutorials on the Node-Red.org web site:

?

?

In your case, you want to do the math on two variables.? The problem is getting both variables into the same node at the same time.

?

-Messages "flow" through?the nodes.? They only exist in the node in one instant of time, then pass to the next node.

?

- Context variables are stored in Node-Red memory and can be called into a function for doing the math.? As Dave points out, you must first get your variables stored in "context", then pull each into a function to do the math.

?

There are lots of ways to get a message to a context variable.? A common way is to use the change node.? Say you want to put the payload into a context location called ""

?

?

Then to add "xyz" to "abc" in a function node and output the result to "msg.payload"

?

?

Alan

?

On Mon, Jan 25, 2021 at 12:38 PM wa9mvz via <wa9mvz=[email protected]> wrote:

Sure. It's easy to start writing flows similar to BLINK and turn an LED on from an input. But once I get past that point it's like drinking from a fire hose.

I've been trying to figure out how to do a simple task like multiply two numbers together. I have a data stream coming in through a Serial port that is working and using a CALCULATOR node I can divide that by a constant. But I need to multiply it by a number from an INJECT node. I haven't found any tutorial that tells me how to do that that doesn't assume I'm an expert in NODE RED and JAVA.

Can anyone point me in the right direction? It's obvious I'm missing something very fundamental here. This should be easy.

Fred
K9SO


 

Thanks. Very helpful. I have graduated to 4th grade arithmetic and can now multiply numbers (LOL)!?
I'll move my future questions to a different thread

Fred?
K9SO


 

Alan, Dave ... thanks for the Zoom meeting last night. I appreciate your taking the time to host that.?
I have a very extensive? multi-state remote radio system in place and have been remoting since the 1990's. As automated as I am, I often have to bring up multiple systems. There is an appealing elegance to the Node Red dashboards I'd seen.? I was attracted to Node-Red for the control simplicity it offered.

I had a steep learning curve over the past few days to get where I am on Node-Red. I have done a lot of work with Arduino and C++, but I've never played with an OS, the RPi or JavaScript. In future lessons, you might help others along by realizing that there are really 4 steps to mastering this for someone like me (an RF engineer):

1. Learn how to run the Rasberry Pi itself. How to interface to a terminal, etc.?
2. How to load and run the OS.?
3. Learn how to load simple flows in Node-Red using GPIO interfaces.?
4. Learn programming in JavaScript and building the dashboard.

Most Node-Red "beginner" tutorials assume you already know steps 1,2, and 4. That was not the case for me. I felt there was a lack of mid-level tutorials out there. For example, I could find little about how to build and arrange a dashboard. Your meeting last night filled that gap and got me heading in the right direction.?

That said, sometimes the only way to drink from a fire hose is to start drinking.

Thanks for making yourselves available to true beginners and for your patience.?

Fred
K9SO


 

开云体育

Thanks for the feedback Fred.

?

I have to admit, I do not know JS. Everything I have done in Node Red I have been able to figure out or learn from Google searches and loading example flows from different sites I found using Google.

?

It is really a 3 step process in creating a flow:

  • Getting the data into Node Red
  • Manipulating the data into format for viewing
  • Laying out the dashboard to display data

?

There are tutorials on using the Raspberry OS via telnet (terminal) and/or VNC or local desktop to Pi (monitor keyboard and mouse connected to Pi). I’ll try to ferret out a good video and provide a link.

?

I think the next Zoom session we could work on building a couple of flows. One for getting and sending info to a device and another for controlling simple relays. I actually saw a video online the other day where the author used 3 relays to create a traffic light system. It was very good in explaining how to wire things up.

?

73

Dave wo2x

?

?

From: [email protected] <[email protected]> On Behalf Of wa9mvz via groups.io
Sent: Thursday, January 28, 2021 8:51 AM
To: [email protected]
Subject: Re: [nodered-hamradio] Getting started with Node Red

?

Alan, Dave ... thanks for the Zoom meeting last night. I appreciate your taking the time to host that.?
I have a very extensive? multi-state remote radio system in place and have been remoting since the 1990's. As automated as I am, I often have to bring up multiple systems. There is an appealing elegance to the Node Red dashboards I'd seen.? I was attracted to Node-Red for the control simplicity it offered.

I had a steep learning curve over the past few days to get where I am on Node-Red. I have done a lot of work with Arduino and C++, but I've never played with an OS, the RPi or JavaScript. In future lessons, you might help others along by realizing that there are really 4 steps to mastering this for someone like me (an RF engineer):

1. Learn how to run the Rasberry Pi itself. How to interface to a terminal, etc.?
2. How to load and run the OS.?
3. Learn how to load simple flows in Node-Red using GPIO interfaces.?
4. Learn programming in JavaScript and building the dashboard.

Most Node-Red "beginner" tutorials assume you already know steps 1,2, and 4. That was not the case for me. I felt there was a lack of mid-level tutorials out there. For example, I could find little about how to build and arrange a dashboard. Your meeting last night filled that gap and got me heading in the right direction.?

That said, sometimes the only way to drink from a fire hose is to start drinking.

Thanks for making yourselves available to true beginners and for your patience.?

Fred
K9SO


 

Hey there?
Great group here
I am taking the advice and starting small before i get onto bigger things
So i have started with taking the weather data from an sdr dongle
I can get it to display no problem but it mixes the values
i have been trying to use RTL-433 as the inject to display weather on my shack display.
The problem i have is the temperature value coming from the SDR is mixing multiple sensors.
So the same display rotates the different temps from the different sensors .
the sensors have different channels and different ID's. if i try and block the ID it seems to block everything
one sensor is?id:?339746605 the other id:?-2139593976
i thought the obvious way would be to block the alternate ID
maybe its too late in the night but i just cant seem to divert one sensor?
i have attached the map?
any tips would be good
I have been trying everything but my json knowledge is poor.
I tried functions/gates/seperate switches/filters but cant think of the correct way to do it?
Glenn VK2HTV

Gl


 

Glenn

An easy method is to use the "Switch" node.

I see the the "id" comes thru as "msg.payload.id". ? FYI, if you expand the JSON by clicking the small arrow next to the object in the debug window, you can see a more straightforward path to the desired variable. ?Click on the "copy path" to move that into the switch node, "Property" box.

The switch node can use "msg.payload.id" property, to only allow the full object to flow, only if the value meets the value set in the selection. ?Here is an example using your data. ?Each sensor's variable will flow to the respective output of the switch as msg.payload, or whatever you have set up in the source nodes.

Alan. WA9WUD


 

Also, and to correct my first response. ?I just noticed the id text were blue in the debug window. ?This means they are a "number" variable type. ?If they were red text, they would be a variable type of "string".

In the switch node, you must specify the type of variable you are using. ?Here is a corrected screenshot using a variable type of "number". ?My first response showed a variable type of "string".

Alan


 

Glenn,

I don't have an answer to your question as I have not looked at the flow.?

I am going to offer a different solution that you can feel free to ignore. I elected to get my WX data from an online service and use Node Red to display the data on my dashboard. It eliminates the need for local sensors and, in my case, since I'm sheltered, wind data would be very inaccurate.

You can check out the data for Sydney at the link below.



Use requires registering to get an API key (no cost). This would also allow you to pull data from different locations which might be useful based on your QRZ page. If you'd like, I'll share the flow.

73, Ron WB2WGH?
PS: never flew rotary wing but for many years I flew gliders and single engine (both ends of the rope). Instructed in gliders and towed in the single engine.

On Thu, Jun 9, 2022, 11:39 AM <vk2htv@...> wrote:
Hey there?
Great group here
I am taking the advice and starting small before i get onto bigger things
So i have started with taking the weather data from an sdr dongle
I can get it to display no problem but it mixes the values
i have been trying to use RTL-433 as the inject to display weather on my shack display.
The problem i have is the temperature value coming from the SDR is mixing multiple sensors.
So the same display rotates the different temps from the different sensors .
the sensors have different channels and different ID's. if i try and block the ID it seems to block everything
one sensor is?id:?339746605 the other id:?-2139593976
i thought the obvious way would be to block the alternate ID
maybe its too late in the night but i just cant seem to divert one sensor?
i have attached the map?
any tips would be good
I have been trying everything but my json knowledge is poor.
I tried functions/gates/seperate switches/filters but cant think of the correct way to do it?
Glenn VK2HTV

Gl


 

Wow - Thank you Alan that payload.id worked in seconds - such an easy fix
It fixed up all my hours of attempts at failed patches.
Thanks?
- and Ron yes I could get an online weather service ( actually my sensors feed into those online services ) but as a true Ham I wanted to extract the radio version direct from my sensors. More of a learning first project for myself to tackle bigger Ham projects, I thought start simple with the temperature extraction. I actually might extract it and do a side by side comparison on the side of my display to see how far my sensors are from the online data.

I was struggling because Now I know those sensors have a lot of data and i wrote a function script to test the extraction of the data that worked but i couldn't extract the numbers. Thanks again Alan I wouldn't have ever gone down that payload.id path.

Now that I have that as my first dip my toe in the water experiment.
The next project is integrating an elgato stream deck and an Icom IC-7300. Alan I think it was your video i was looking at that has integration for the Flex radio
I noticed there was an Icom CIV and i thing a 7100 control so i might give those a go and see if I can adapt that to the 7300

This is the script i did in the function to extract the temp/humid/etc
(var o = msg.payload
msg.payload = o.temperature_C;
return msg;)


 

Dave,

Is there a place to download your setup specifically??
I have similar hardware and the streamdeck, but was having trouble piecing together the files to get it in one place.

Thanks

Andrew?


 

开云体育

Here’s a zip file witl my flows from a few months ago and necessary files for Stream Deck integration

/g/nodered-hamradio/files/%211%21%20Flows%20by%20Type/MISCELLANEOUS/StreamDeckTo%20NodeRedIntegrationFiles.zip

?

Also a companion video which may help

?

?

Read the ReadMe file for information on using the flows and other files. Some have generic passwords set.

?

73

Dave wo2x

?

From: [email protected] <[email protected]> On Behalf Of utarctnradio
Sent: Wednesday, June 29, 2022 12:35 PM
To: [email protected]
Subject: Re: [nodered-hamradio] Getting started with Node Red

?

Dave,

Is there a place to download your setup specifically??
I have similar hardware and the streamdeck, but was having trouble piecing together the files to get it in one place.

Thanks

Andrew?


 

Thanks Dave! Was the powerline noise video the one you meant to include?


 

开云体育

No, but I copied the link from the description in the files area. I’ll find the right video

?

Dave

?

?

From: [email protected] <[email protected]> On Behalf Of utarctnradio
Sent: Thursday, June 30, 2022 1:13 PM
To: [email protected]
Subject: Re: [nodered-hamradio] Getting started with Node Red

?

Thanks Dave! Was the powerline noise video the one you meant to include?