A little flow for the new `vcgencmd` node

In the thread Ras Pi voltage - new node.

I wrote a little flow to play with it and show you what it can do.

For me, I don't mind data, but I don't like getting the same data over and over.

So I want to differentiate it to only show changes.

I've played with the RBE node, but not had desirable results.

Anyway, here is the flow. I uploaded it to the library I hope.

But here it is just to show you all the functions it (the new node) can do.

This is a new tab/flow.

[{"id":"1e209ff7.121d78","type":"tab","label":"Flow 3","disabled":false,"info":""},{"id":"b10f3fb4.3f023","type":"vcgencmd","z":"1e209ff7.121d78","name":"Other stuff","command":"get_throttled","codec":"H264","clock":"core","voltage":"core","memory":"arm","videoOutput":"0","separateMsg":false,"x":240,"y":300,"wires":[["3207c5ea.9fea4a"]]},{"id":"78c209ca.24c3e","type":"split","z":"1e209ff7.121d78","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":510,"y":300,"wires":[["ff1eb464.4163c8"]]},{"id":"ff1eb464.4163c8","type":"change","z":"1e209ff7.121d78","name":"set","rules":[{"t":"set","p":"state","pt":"msg","to":"payload","tot":"msg"},{"t":"move","p":"parts.key","pt":"msg","to":"topic","tot":"msg"},{"t":"delete","p":"delay","pt":"msg"},{"t":"delete","p":"_event","pt":"msg"},{"t":"delete","p":"parts","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":300,"wires":[["a315ae34.ed839"]]},{"id":"a315ae34.ed839","type":"switch","z":"1e209ff7.121d78","name":"","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":220,"y":360,"wires":[["4ffaa1e8.b8424"],["4ffaa1e8.b8424"]]},{"id":"94384e10.fd5bf8","type":"inject","z":"1e209ff7.121d78","name":"Pulse","topic":"","payload":"","payloadType":"date","repeat":"20","crontab":"","once":false,"onceDelay":0.1,"x":80,"y":300,"wires":[["b10f3fb4.3f023"]]},{"id":"4ffaa1e8.b8424","type":"function","z":"1e209ff7.121d78","name":"TimeStamp","func":"var time = new Date().toLocaleString();\nvar WIFI_DEVICE = msg.payload.WIFI_DEVICE;\nvar IP_ = msg.payload.IP_Address;\nmsg.WIFI_DEVICE = WIFI_DEVICE;\nmsg.IP_Address = IP_;\nmsg.time = time;\nreturn msg;","outputs":1,"noerr":0,"x":390,"y":360,"wires":[["2861501f.baa698"]]},{"id":"2861501f.baa698","type":"string","z":"1e209ff7.121d78","name":"- to /","methods":[{"name":"replaceAll","params":[{"type":"str","value":"-"},{"type":"str","value":"/"}]}],"prop":"time","propout":"time","object":"msg","objectout":"msg","x":560,"y":360,"wires":[["d2a06ed3.739f28"]]},{"id":"d2a06ed3.739f28","type":"function","z":"1e209ff7.121d78","name":"Make message","func":"if (msg.topic == \"NEWDAY\")\n{\n    return msg;\n}\nif (msg.topic == \"TIMESTAMP\")\n{\n    return msg;\n}\n\nmsg.payload = msg.time + \" \" + msg.topic + \" > \" + msg.payload + \" <\";\nreturn msg;","outputs":1,"noerr":0,"x":720,"y":360,"wires":[["8c24f008.34d208"]]},{"id":"8c24f008.34d208","type":"debug","z":"1e209ff7.121d78","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":900,"y":360,"wires":[]},{"id":"3207c5ea.9fea4a","type":"function","z":"1e209ff7.121d78","name":"RBE","func":"var newval = msg.state;\nvar last = context.get(\"last\");\nif (msg.topic == \"CONTROL\")\n{\n    //\n    //  Set how node works.\n    //\n    context.set(\"PASS\",msg.payload);\n    node.status({fill:\"yellow\",shape:\"dot\",text:\"Changed\"});\n    return;\n}\nvar pass = context.get(\"PASS\") || 0;\nif (pass === 0)\n{\n    if (newval != last)\n    {\n       context.set(\"last\", newval);\n       node.status({fill:\"green\",shape:\"dot\",text:\"Passed\"});\n       return msg;\n    }\n    node.status({fill:\"red\",shape:\"dot\",text:\"Blocked\"});\n    return;\n}\nelse\n{\n    node.status({fill:\"green\",shape:\"dot\",text:\"All\"});\n    return msg;\n}\n","outputs":1,"noerr":0,"x":380,"y":300,"wires":[["78c209ca.24c3e"]]},{"id":"3df94b24.f0687c","type":"inject","z":"1e209ff7.121d78","name":"ALL","topic":"CONTROL","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":250,"y":200,"wires":[["3207c5ea.9fea4a"]]},{"id":"26191e32.7d5122","type":"inject","z":"1e209ff7.121d78","name":"Change only","topic":"CONTROL","payload":"0","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":270,"y":160,"wires":[["3207c5ea.9fea4a"]]}]

The source node pulse provides a . . . . clock to run the flow. Though you can use what ever you want.

The next two inject nodes select how the rest of the flow works.
1 - ALL
This sends all messages through.
2 - CHANGE ONLY
This only passes a message if there is a change from the previous one.

the output is for now a debug node.

I would inject that into a list of some sorts. Up to you.
This simply shows you the output of the node and gives you a list of sorts.

Enjoy.

1 Like

Hi Andrew,

I have imported your flow and I see that the below checkbox is unselected:

image

So the msg.payload contains a Javascript object which contains in turn all the data. And further on in the flow a Split-node is used to create separate messages. Isn't it easier to select the checkbox and use the RBE node (which can operate topic-based) to skip unchanged data?

1 Like

I've tried using it in the past with that understanding.

But things weren't always happening as I wanted. After a lot of time I realised it is/was the RBE node.

Say it is in a flow and gets a message: 0000.
It passes the message.
The message changes in the next pass to 0001
Again: It is passed.
Next time it is unchanged and is blocked. Good.
It changes again to 0010, and is passed.

THEN!

It goes back to 0000

It is blocked because it was 0000 the first time.

That was driving me crazy for weeks. So now I just don't use it because if the topic is not also changing it blocks messages I want to pass.

Maybe I am mistaken, but that is how I remember the problem.

The RBE node only holds one previous value for each topic so unless you were using multiple topics the situation you describe won’t happen.

1 Like

Ok. Thanks. I really liked using the RBE node but one day something happened and it was not doing what I wanted, which was simply blocking consecutive same messages.

The only thing I like with my RBE node, is that it can be turned on and off. :wink:

Here is a nicer looking flow.

It shows the results with "lights" on the dashboard.

Ok, one of them doesn't work. Not sure why.

But I am sure someone can work it out.

[{"id":"b03f43f2.b25658","type":"link in","z":"cf708fbd.070c78","name":"Heart Beat","links":["ba769d38.a08f28"],"x":145,"y":150,"wires":[["9bca9c33.229e18"]]},{"id":"54e688dc.00fef","type":"vcgencmd","z":"cf708fbd.070c78","name":"Other stuff","command":"get_throttled","codec":"H264","clock":"core","voltage":"core","memory":"arm","videoOutput":"0","separateMsg":false,"x":435,"y":150,"wires":[["898b5c13.98311","b7e049d3.630808"]]},{"id":"9bca9c33.229e18","type":"traffic","z":"cf708fbd.070c78","name":"Test","property_allow":"payload","filter_allow":"Go","ignore_case_allow":false,"negate_allow":false,"send_allow":false,"property_stop":"payload","filter_stop":"Stop","ignore_case_stop":false,"negate_stop":false,"send_stop":false,"default_start":false,"differ":false,"x":255,"y":150,"wires":[["54e688dc.00fef"]]},{"id":"d1807b40.83a6d8","type":"inject","z":"cf708fbd.070c78","name":"","topic":"","payload":"Stop","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":255,"y":60,"wires":[["9bca9c33.229e18"]]},{"id":"fa95d11a.20f038","type":"inject","z":"cf708fbd.070c78","name":"","topic":"","payload":"Go","payloadType":"str","repeat":"","crontab":"","once":true,"onceDelay":"2","x":255,"y":100,"wires":[["9bca9c33.229e18"]]},{"id":"898b5c13.98311","type":"debug","z":"cf708fbd.070c78","name":"Other stuff","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":435,"y":110,"wires":[]},{"id":"b7e049d3.630808","type":"switch","z":"cf708fbd.070c78","name":"","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"underVoltage","vt":"str"},{"t":"eq","v":"frequencyCapped","vt":"str"},{"t":"eq","v":"throttled","vt":"str"},{"t":"eq","v":"softTempLimit","vt":"str"},{"t":"eq","v":"underVoltageOccurred","vt":"str"},{"t":"eq","v":"frequencyCappedOccurred","vt":"str"},{"t":"eq","v":"throttledOccurred","vt":"str"},{"t":"eq","v":"softTempLimitOccurred","vt":"str"}],"checkall":"true","repair":false,"outputs":8,"x":730,"y":150,"wires":[["8233b4d6.6c8ce8"],["a7211d31.5717c"],["264fafa1.55b988"],["fb32d8a5.a9d398"],["2b90d5ff.00002a"],["265570b2.d35808"],["cb1a9cf.3bdbd6"],["3257768a.988542"]]},{"id":"8233b4d6.6c8ce8","type":"function","z":"cf708fbd.070c78","name":"","func":"msg.color = (msg.payload === true)?\"red\":\"lime\";\nvar colour = (msg.payload === true)?\"green\":\"red\";\nnode.status({fill:colour,shape:\"dot\",text:\"Log\"});\nreturn msg;","outputs":1,"noerr":0,"x":940,"y":30,"wires":[["e208d49d.0ed4"]]},{"id":"e208d49d.0ed4","type":"ui_text","z":"cf708fbd.070c78","group":"e53f59db.f595f","order":13,"width":0,"height":0,"name":"","label":"{{msg.topic}}","format":"<font color={{msg.color}} ><i class=\"fa fa-circle fa-2x\" style=\"font-size:8px;\"></i></font>","layout":"row-spread","x":1080,"y":30,"wires":[]},{"id":"3c970ea6.bb53ea","type":"ui_text","z":"cf708fbd.070c78","group":"e53f59db.f595f","order":13,"width":0,"height":0,"name":"","label":"{{msg.topic}}","format":"<font color={{msg.color}} ><i class=\"fa fa-circle fa-2x\" style=\"font-size:8px;\"></i></font>","layout":"row-spread","x":1080,"y":70,"wires":[]},{"id":"a7211d31.5717c","type":"function","z":"cf708fbd.070c78","name":"","func":"msg.color = (msg.payload === true)?\"red\":\"lime\";\nvar colour = (msg.payload === true)?\"green\":\"red\";\nnode.status({fill:colour,shape:\"dot\",text:\"Log\"});\nreturn msg;","outputs":1,"noerr":0,"x":940,"y":70,"wires":[["3c970ea6.bb53ea"]]},{"id":"264fafa1.55b988","type":"function","z":"cf708fbd.070c78","name":"","func":"msg.color = (msg.payload === true)?\"red\":\"lime\";\nvar colour = (msg.payload === true)?\"green\":\"red\";\nnode.status({fill:colour,shape:\"dot\",text:\"Log\"});\nreturn msg;","outputs":1,"noerr":0,"x":940,"y":110,"wires":[["f66867d4.4ff53"]]},{"id":"f66867d4.4ff53","type":"ui_text","z":"cf708fbd.070c78","group":"e53f59db.f595f","order":13,"width":0,"height":0,"name":"","label":"{{msg.topic}}","format":"<font color={{msg.color}} ><i class=\"fa fa-circle fa-2x\" style=\"font-size:8px;\"></i></font>","layout":"row-spread","x":1080,"y":110,"wires":[]},{"id":"1c9d5761.2d1f79","type":"ui_text","z":"cf708fbd.070c78","group":"e53f59db.f595f","order":13,"width":0,"height":0,"name":"","label":"{{msg.topic}}","format":"<font color={{msg.color}} ><i class=\"fa fa-circle fa-2x\" style=\"font-size:8px;\"></i></font>","layout":"row-spread","x":1080,"y":150,"wires":[]},{"id":"fb32d8a5.a9d398","type":"function","z":"cf708fbd.070c78","name":"","func":"msg.color = (msg.payload === true)?\"red\":\"lime\";\nvar colour = (msg.payload === true)?\"green\":\"red\";\nnode.status({fill:colour,shape:\"dot\",text:\"Log\"});\nreturn msg;","outputs":1,"noerr":0,"x":940,"y":150,"wires":[["1c9d5761.2d1f79"]]},{"id":"2b90d5ff.00002a","type":"function","z":"cf708fbd.070c78","name":"","func":"msg.color = (msg.payload === true)?\"red\":\"lime\";\nvar colour = (msg.payload === true)?\"green\":\"red\";\nnode.status({fill:colour,shape:\"dot\",text:\"Log\"});\nreturn msg;","outputs":1,"noerr":0,"x":940,"y":190,"wires":[["7ea72921.91e21"]]},{"id":"7ea72921.91e21","type":"ui_text","z":"cf708fbd.070c78","group":"e53f59db.f595f","order":13,"width":0,"height":0,"name":"","label":"{{msg.topic}}","format":"<font color={{msg.color}} ><i class=\"fa fa-circle fa-2x\" style=\"font-size:8px;\"></i></font>","layout":"row-spread","x":1080,"y":190,"wires":[]},{"id":"55fa9a89.c663dc","type":"ui_text","z":"cf708fbd.070c78","group":"e53f59db.f595f","order":13,"width":0,"height":0,"name":"","label":"{{msg.topic}}","format":"<font color={{msg.color}} ><i class=\"fa fa-circle fa-2x\" style=\"font-size:8px;\"></i></font>","layout":"row-spread","x":1080,"y":230,"wires":[]},{"id":"265570b2.d35808","type":"function","z":"cf708fbd.070c78","name":"","func":"msg.color = (msg.payload === true)?\"red\":\"lime\";\nvar colour = (msg.payload === true)?\"green\":\"red\";\nnode.status({fill:colour,shape:\"dot\",text:\"Log\"});\nreturn msg;","outputs":1,"noerr":0,"x":940,"y":230,"wires":[["55fa9a89.c663dc"]]},{"id":"cb1a9cf.3bdbd6","type":"function","z":"cf708fbd.070c78","name":"","func":"msg.color = (msg.payload === true)?\"red\":\"lime\";\nvar colour = (msg.payload === true)?\"green\":\"red\";\nnode.status({fill:colour,shape:\"dot\",text:\"Log\"});\nreturn msg;","outputs":1,"noerr":0,"x":940,"y":270,"wires":[["4b2d331b.1ad7fc"]]},{"id":"4b2d331b.1ad7fc","type":"ui_text","z":"cf708fbd.070c78","group":"e53f59db.f595f","order":13,"width":0,"height":0,"name":"","label":"{{msg.topic}}","format":"<font color={{msg.color}} ><i class=\"fa fa-circle fa-2x\" style=\"font-size:8px;\"></i></font>","layout":"row-spread","x":1080,"y":270,"wires":[]},{"id":"38a55bc5.465114","type":"ui_text","z":"cf708fbd.070c78","group":"e53f59db.f595f","order":13,"width":0,"height":0,"name":"","label":"{{msg.topic}}","format":"<font color={{msg.color}} ><i class=\"fa fa-circle fa-2x\" style=\"font-size:8px;\"></i></font>","layout":"row-spread","x":1080,"y":310,"wires":[]},{"id":"3257768a.988542","type":"function","z":"cf708fbd.070c78","name":"","func":"msg.color = (msg.payload === true)?\"red\":\"lime\";\nvar colour = (msg.payload === true)?\"green\":\"red\";\nnode.status({fill:colour,shape:\"dot\",text:\"Log\"});\nreturn msg;","outputs":1,"noerr":0,"x":940,"y":310,"wires":[["38a55bc5.465114"]]},{"id":"e53f59db.f595f","type":"ui_group","z":"","name":"Status","tab":"50f4e688.7d4b7","order":2,"disp":true,"width":"5","collapse":false},{"id":"50f4e688.7d4b7","type":"ui_tab","z":"","name":"Machine health","icon":"dashboard","order":4,"disabled":false,"hidden":false}]

Ok, oops.

It did work. Now it isn't.

The switch node is set to look at the topic and split per that.

But looking at it now, it is more the msg.payload.x.

But how do I split that?

I have tried this:

[{"id":"8b5df135.2053b8","type":"switch","z":"2555a6cd.48e7ca","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"underVoltage","vt":"str"},{"t":"cont","v":"frequencyCapped","vt":"str"},{"t":"cont","v":"throttled","vt":"str"},{"t":"cont","v":"softTempLimit","vt":"str"},{"t":"cont","v":"underVoltageOccurred","vt":"str"},{"t":"cont","v":"frequencyCappedOccurred","vt":"str"},{"t":"cont","v":"throttledOccurred","vt":"str"},{"t":"cont","v":"softTempLimitOccurred","vt":"str"}],"checkall":"true","repair":false,"outputs":8,"x":370,"y":1490,"wires":[["62f7c81e.fa7bb","ce7492d0.f052f"],["d1687677.615bc"],["b534cb28.33b3d8"],["85adae52.70c018"],["efff0b79.51b09"],["a7b5e6d6.139a4"],["b5ac0d87.bcdea"],["3b09340c.3f726c"]]}]

But it isn't working because . . . . . ?

I don't know.

Sorry folk for saying it was a nice flow.
(stuff happens.)

Ok, got it working.

New flow:

You will need an input signal.

** If the "light" is green, all is good. **

If it is red, then there is a problem.

[{"id":"475bced0.7c21c","type":"switch","z":"aa48e352.9ad2f8","name":"","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":"underVoltage","vt":"str"},{"t":"eq","v":"frequencyCapped","vt":"str"},{"t":"eq","v":"throttled","vt":"str"},{"t":"eq","v":"softTempLimit","vt":"str"},{"t":"eq","v":"underVoltageOccurred","vt":"str"},{"t":"eq","v":"frequencyCappedOccurred","vt":"str"},{"t":"eq","v":"throttledOccurred","vt":"str"},{"t":"eq","v":"softTempLimitOccurred","vt":"str"}],"checkall":"true","repair":false,"outputs":8,"x":920,"y":1800,"wires":[["8f3b63fc.7b9e5"],["4a47b867.76d24"],["e06016eb.6f3598"],["dae6ff78.975ca"],["994b681d.7239a8"],["adca9cbc.ccae6"],["fa0a1089.5b3ee8"],["63124cb8.aa859c"]]},{"id":"8f3b63fc.7b9e5","type":"function","z":"aa48e352.9ad2f8","name":"","func":"msg.color = (msg.payload === true)?\"red\":\"lime\";\nvar colour = (msg.payload === true)?\"green\":\"red\";\nnode.status({fill:colour,shape:\"dot\",text:\"Log\"});\nreturn msg;","outputs":1,"noerr":0,"x":1130,"y":1660,"wires":[["d37a3b4e.8ada18"]]},{"id":"d37a3b4e.8ada18","type":"ui_text","z":"aa48e352.9ad2f8","group":"e53f59db.f595f","order":13,"width":0,"height":0,"name":"","label":"{{msg.topic}}","format":"<font color={{msg.color}} ><i class=\"fa fa-circle fa-2x\" style=\"font-size:8px;\"></i></font>","layout":"row-spread","x":1270,"y":1660,"wires":[]},{"id":"4a47b867.76d24","type":"function","z":"aa48e352.9ad2f8","name":"","func":"msg.color = (msg.payload === true)?\"red\":\"lime\";\nvar colour = (msg.payload === true)?\"green\":\"red\";\nnode.status({fill:colour,shape:\"dot\",text:\"Log\"});\nreturn msg;","outputs":1,"noerr":0,"x":1130,"y":1700,"wires":[["2674676c.14cfc8"]]},{"id":"2674676c.14cfc8","type":"ui_text","z":"aa48e352.9ad2f8","group":"e53f59db.f595f","order":13,"width":0,"height":0,"name":"","label":"{{msg.topic}}","format":"<font color={{msg.color}} ><i class=\"fa fa-circle fa-2x\" style=\"font-size:8px;\"></i></font>","layout":"row-spread","x":1270,"y":1700,"wires":[]},{"id":"e06016eb.6f3598","type":"function","z":"aa48e352.9ad2f8","name":"","func":"msg.color = (msg.payload === true)?\"red\":\"lime\";\nvar colour = (msg.payload === true)?\"green\":\"red\";\nnode.status({fill:colour,shape:\"dot\",text:\"Log\"});\nreturn msg;","outputs":1,"noerr":0,"x":1130,"y":1740,"wires":[["42a79689.b70ac"]]},{"id":"42a79689.b70ac","type":"ui_text","z":"aa48e352.9ad2f8","group":"e53f59db.f595f","order":13,"width":0,"height":0,"name":"","label":"{{msg.topic}}","format":"<font color={{msg.color}} ><i class=\"fa fa-circle fa-2x\" style=\"font-size:8px;\"></i></font>","layout":"row-spread","x":1270,"y":1740,"wires":[]},{"id":"dae6ff78.975ca","type":"function","z":"aa48e352.9ad2f8","name":"","func":"msg.color = (msg.payload === true)?\"red\":\"lime\";\nvar colour = (msg.payload === true)?\"green\":\"red\";\nnode.status({fill:colour,shape:\"dot\",text:\"Log\"});\nreturn msg;","outputs":1,"noerr":0,"x":1130,"y":1780,"wires":[["ce9a7e6c.0b155"]]},{"id":"ce9a7e6c.0b155","type":"ui_text","z":"aa48e352.9ad2f8","group":"e53f59db.f595f","order":13,"width":0,"height":0,"name":"","label":"{{msg.topic}}","format":"<font color={{msg.color}} ><i class=\"fa fa-circle fa-2x\" style=\"font-size:8px;\"></i></font>","layout":"row-spread","x":1270,"y":1780,"wires":[]},{"id":"994b681d.7239a8","type":"function","z":"aa48e352.9ad2f8","name":"","func":"msg.color = (msg.payload === true)?\"red\":\"lime\";\nvar colour = (msg.payload === true)?\"green\":\"red\";\nnode.status({fill:colour,shape:\"dot\",text:\"Log\"});\nreturn msg;","outputs":1,"noerr":0,"x":1130,"y":1820,"wires":[["165e32d3.19a12d"]]},{"id":"165e32d3.19a12d","type":"ui_text","z":"aa48e352.9ad2f8","group":"e53f59db.f595f","order":13,"width":0,"height":0,"name":"","label":"{{msg.topic}}","format":"<font color={{msg.color}} ><i class=\"fa fa-circle fa-2x\" style=\"font-size:8px;\"></i></font>","layout":"row-spread","x":1270,"y":1820,"wires":[]},{"id":"adca9cbc.ccae6","type":"function","z":"aa48e352.9ad2f8","name":"","func":"msg.color = (msg.payload === true)?\"red\":\"lime\";\nvar colour = (msg.payload === true)?\"green\":\"red\";\nnode.status({fill:colour,shape:\"dot\",text:\"Log\"});\nreturn msg;","outputs":1,"noerr":0,"x":1130,"y":1860,"wires":[["617f3e4.206c34"]]},{"id":"617f3e4.206c34","type":"ui_text","z":"aa48e352.9ad2f8","group":"e53f59db.f595f","order":13,"width":0,"height":0,"name":"","label":"{{msg.topic}}","format":"<font color={{msg.color}} ><i class=\"fa fa-circle fa-2x\" style=\"font-size:8px;\"></i></font>","layout":"row-spread","x":1270,"y":1860,"wires":[]},{"id":"fa0a1089.5b3ee8","type":"function","z":"aa48e352.9ad2f8","name":"","func":"msg.color = (msg.payload === true)?\"red\":\"lime\";\nvar colour = (msg.payload === true)?\"green\":\"red\";\nnode.status({fill:colour,shape:\"dot\",text:\"Log\"});\nreturn msg;","outputs":1,"noerr":0,"x":1130,"y":1900,"wires":[["25f5c473.216784"]]},{"id":"25f5c473.216784","type":"ui_text","z":"aa48e352.9ad2f8","group":"e53f59db.f595f","order":13,"width":0,"height":0,"name":"","label":"{{msg.topic}}","format":"<font color={{msg.color}} ><i class=\"fa fa-circle fa-2x\" style=\"font-size:8px;\"></i></font>","layout":"row-spread","x":1270,"y":1900,"wires":[]},{"id":"63124cb8.aa859c","type":"function","z":"aa48e352.9ad2f8","name":"","func":"msg.color = (msg.payload === true)?\"red\":\"lime\";\nvar colour = (msg.payload === true)?\"green\":\"red\";\nnode.status({fill:colour,shape:\"dot\",text:\"Log\"});\nreturn msg;","outputs":1,"noerr":0,"x":1130,"y":1940,"wires":[["30d35a7.8aa44a6"]]},{"id":"30d35a7.8aa44a6","type":"ui_text","z":"aa48e352.9ad2f8","group":"e53f59db.f595f","order":13,"width":0,"height":0,"name":"","label":"{{msg.topic}}","format":"<font color={{msg.color}} ><i class=\"fa fa-circle fa-2x\" style=\"font-size:8px;\"></i></font>","layout":"row-spread","x":1270,"y":1940,"wires":[]},{"id":"f2380032.335f1","type":"split","z":"aa48e352.9ad2f8","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":780,"y":1760,"wires":[["45227f07.64d4d8"]]},{"id":"45227f07.64d4d8","type":"change","z":"aa48e352.9ad2f8","name":"set","rules":[{"t":"set","p":"state","pt":"msg","to":"payload","tot":"msg"},{"t":"move","p":"parts.key","pt":"msg","to":"topic","tot":"msg"},{"t":"delete","p":"delay","pt":"msg"},{"t":"delete","p":"_event","pt":"msg"},{"t":"delete","p":"parts","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":1800,"wires":[["475bced0.7c21c"]]},{"id":"a816afdd.78f898","type":"vcgencmd","z":"aa48e352.9ad2f8","name":"Other stuff","command":"get_throttled","codec":"H264","clock":"core","voltage":"core","memory":"arm","videoOutput":"0","separateMsg":false,"x":600,"y":1760,"wires":[["f2380032.335f1"]]},{"id":"bb33bc80.fa4038","type":"comment","z":"aa48e352.9ad2f8","name":"Input","info":"","x":360,"y":1760,"wires":[]},{"id":"e53f59db.f595f","type":"ui_group","z":"","name":"Status","tab":"50f4e688.7d4b7","order":2,"disp":true,"width":"5","collapse":false},{"id":"50f4e688.7d4b7","type":"ui_tab","z":"","name":"Machine health","icon":"dashboard","order":4,"disabled":false,"hidden":false}]

If your are colour blind (approx 8%) it can be difficult to differentiate between red and green. It would be better to also change the shape (eg filled or outline) as well.

Granted.

This is only to show people what they can do.

I shall leave it to individuals how they actually show things.