Node-Red Example Flows and Projects

The idea of this page is to present simple example flows or sub flows that solve a particular problem, and that can be used as part of larger projects.

If you have any suggestions then I would be glad to hear them just use the comment form at the bottom of the page.

If you would like to be notified when I add a new flow/project then please sign up for the newsletter

In addition there are much larger and more complex flows that I have create to solve a particular problem which are contained in the projects category and that you may also find useful.

Example Flows


Set Text Colour Of Text Dashboard Widget

The goal here is to change the text colour in a dashboard text widget but can also be applied to other widgets.

The flow consists of an inject node that send a simple text string and a change node to set payload properties for the colours. continuedset-colored text

Splitting a Message Payload

In this simple project we will look at splitting a simple message payload, and then display the data in a text box and on gauges on a dashboard.

The payload consists of a simple string containing temperature and humidity readings separated by a ampersand (&). continued

Simple Keypad for Node-Red Flows



Display last x Messages

Will display the last x messages. x is 10 by default and can be changed in the code.

Flow Diagram



Click to rate this post!
[Total: 2 Average: 5]


  1. Hi Steve, I have already read a lot of information from you and given my thanks very detailed.

    what I would like to do is to convert data via API locally or from the internet to modbus registers which I can then read out in a PLC, I can use modbus IP for this, what I can manage is that I can connect between NodeRed and my PLC via modbus, however, I can’t manage to set up the right registers mainly they are analogue values, temperature, humidity, wind direction, but also generation data from my solar panels. do you have one or more examples 16 and 32 bit how i can make a good modbus register from API data?

  2. ok for this example
    but with different length, different subjects.
    but how can I SPLIT this data in separate data:


    1. Assume that the data is a string. split on :
      let data=payload.split(“;”)

      you now have an array of elements. You could split each one on = so you finish up with two elements temp and the value for example. then you need to do a string search to get temp,bat etc.
      Does that make sense.

  3. Hi Steve. I’m having difficulty getting a PIR sensor to switch on a light. Both are flashed with Tasmota.
    I can see the correct topic for the motion sensor being ON or OFF (stat/porch/PIR1).
    In Node-Red I have the MQTT Node which subscribes to that topic and debug successfully shows ON or OFF.
    I have an MQTT publish Node which is for sending an on or off command to the light switch.

    But then I’m really stuck as to what goes in between.
    I’m really stumped. Every thing I search for always mentions Home Assistant, and never just Node-Red like I want.
    Any advice much appreciated. Thanks.

  4. Hello Mr.steve I am currently doing my college project I have an deployment error unauthorized due to invalid credentials.Please help to sort out.

  5. Hello Mr. Your blog is good. So i have many question about MQTT. because now i’m making a exam project about mqtt. Could I get have your contact email ?

Leave a Reply

Your email address will not be published. Required fields are marked *