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.
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.
- Set Coloured Text for Dashboard widgets
- Split Message Payload and Display on Gauges
- Simple Keypad for Node-Red Flows
- Display last x Messages
- Republishing HTTP Data Over MQTT with Node-Red
- MQTT Data Logger -Node-Red
- Monitoring MQTT Brokers – Includes several flows for monitoring MQTT brokers
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. continued
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.
ok for this example
but with different length, different subjects.
but how can I SPLIT this data in separate data:
Assume that the data is a string. split on :
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.
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.
I have a series of tutorials on node-red and tasmota on my other site
If you are still stuck after reading those let me know and I will take a look.
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.
Is that when you try to access via a browser or when you start node-red
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 ?
You should address them on my other site
That should answer many of your questions