Subscribe to Receive Latest Posts
I do not publish a regular newsletter but If you want to to be notified when there are new posts on the site, new scripts to try and new videos on line then sign up below.
Best Regards
Steve
Newsletter – March 2025
Debugging Flows
The debug node is commonly used to help debug node-red flows.
It is the equivalent to a console print in other programming languages.
My pet peeve with this node is that it defaults to msg.payload only and not the complete message.
You should also be aware that you can pause output from this node using the button on the right.
There is no need to deploy the flow for this change to take effect although the deploy option will be indicated.
Stopping and Starting Flows
In node-red version 3 the ability to stop and start flows has been added to the editor.
Currently it is not enabled by default. To enable it you need to edit the settings.js file and add the following
runtimeState: {
enabled: true,
ui: true
}
A new option appears on the deploy options drop down.
Note: All flows are stopped and not individual flows
Safe Mode for Flow Errors
If you are having problems starting node-red due to a mistake in a flow then you can start node-red using the safe mode.
node-red –safe
This starts node-red but doesn’t run the flows. You can now edit the flows and then deploy to run.
Deleting Flows,modules etc
This I copied from the node-red forum which may be of Interest
If you want to delete node modules
That is, something you have installed from the palette menu, you can go to the palette menu again and remove.
If you want to delete a single flow
double click the flow and choose delete
If you want to delete a subflow
double click the subflow and choose delete (along the top)
If you want to nuke all flows/subflows
Stop Node red
Delete the flows file usually ~/.node-red/flows.json
If you want to start fresh – I.e no flows/modules installed (a clean state)
Just note: this will remove everything – it will be a clean state in Node RED
Stop Node red
Delete everything in ~/.node-red/
Related tutorials
Decoding MQTT Payloads and data Conversion
I get quite a few questions and requests for help on how to decode MQTT payloads.
I have covered this in a tutorial online which you can find here.
There is also a video here
I have also written a Kindle book that contains many more worked examples.
Another common requirement when dealing with data is converting between different data formats i.e JSON to CSV.
Smart Quotes
On the subject of JSON data I come across smart quotes by accident when coping a flow file.
Smart Quotes are found in Windows Word documents and also on some web pages. They can cause trouble if you have them mixed in with JSON data and so you will need to replace them. The problem is that it is not always obvious as the error message you get is invalid JSON data.See this online tool
The reason I mention it is that I had a problem with them myself when pasting a command from one on my web pages.
Take a look at this command (with smart quotes)
Zbsend {“device”:”0xD027″,”Send”:{“AddGroup”:100}}
and This command (normal quotes
Zbsend {“device”:”0xD027″,”Send”:{“AddGroup”:100}}
The first command will result in a JSON error.
My Other Sites
You may or may note be aware that I have two other related sites that you may find useful. They are:
Rgds
Steve