Ok, so if I want to put the msg.error in the payload part it would be the other way around.
The "ERROR" part has a few sub-things.
Source and Stack.
Will they be moved too?
Because when I had it the other way around (as I shall try again now) it didn't seem to send all the sub-structures.
(To "clarify"?) The message has a structure with the error, source and stack sub-entries.
Looking at the debug window they are nicely structured to work out WHAT the error is, WHERE the error is, and HOW the error happened.
After me CHANGING the message, I am finding a lot of that structure missing at the other end of the MQTT link.
This is a poor effort at the big picture:
I can't simulate (easily for you or myself) that there are two tabs/flows on the first machine.
I put the CHANGE node at the end of the flow at the last point before MQTT gets a hold of it.
The message is good there.
I see the structure as is should be.
When it goes through the MQTT a lot of the formatting/structure of the message is gone.
[{"id":"d2d575b.e713308","type":"catch","z":"b27802e.27fed","name":"","scope":null,"x":100,"y":880,"wires":[["1de4123f.2e9726","fb72809b.cb21c8"]]},{"id":"1de4123f.2e9726","type":"debug","z":"b27802e.27fed","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":230,"y":880,"wires":[]},{"id":"24a711b3.5ab3be","type":"fs-ops-size","z":"b27802e.27fed","name":"","path":"","pathType":"str","filename":"filename","filenameType":"msg","size":"filesize","sizeType":"msg","x":540,"y":690,"wires":[["271de747.6b378","572e7ff.0d10a"]]},{"id":"6c57eaa8.269b1c","type":"function","z":"b27802e.27fed","name":"Name of database + timestamp","func":"msg.filename = \"/home/me/.node-red/public/databases/machines/timepi_temp.db\";\nvar time = Date.now();\nvar x = msg.payload;\nmsg.payload = time + ' - ' + x;\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":690,"wires":[["24a711b3.5ab3be"]]},{"id":"5f0bd719.f132a","type":"inject","z":"b27802e.27fed","name":"","topic":"","payload":"clock","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":690,"wires":[["6c57eaa8.269b1c"]]},{"id":"271de747.6b378","type":"debug","z":"b27802e.27fed","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":700,"y":690,"wires":[]},{"id":"572e7ff.0d10a","type":"debug","z":"b27802e.27fed","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"filesize","x":700,"y":730,"wires":[]},{"id":"1871fd96.0e312a","type":"mqtt out","z":"b27802e.27fed","name":"","topic":"TEST","qos":"","retain":"","broker":"6ccf853d.6f8004","x":370,"y":930,"wires":[]},{"id":"9f989b81.a7ae68","type":"mqtt in","z":"b27802e.27fed","name":"","topic":"TEST","qos":"2","broker":"6ccf853d.6f8004","x":90,"y":1020,"wires":[["9295a769.63156"]]},{"id":"ebfd7d25.e9a658","type":"comment","z":"b27802e.27fed","name":"Part 1","info":"","x":380,"y":650,"wires":[]},{"id":"4ae5d697.d053d8","type":"comment","z":"b27802e.27fed","name":"Part 2 (New FLOW/Page)","info":"","x":370,"y":830,"wires":[]},{"id":"b22788c4.e9b9","type":"comment","z":"b27802e.27fed","name":"Part 2 (New FLOW/Page)","info":"","x":360,"y":730,"wires":[]},{"id":"93862085.35d9c","type":"catch","z":"b27802e.27fed","name":"","scope":null,"x":90,"y":770,"wires":[["3dfab9ec.b4196e"]]},{"id":"3dfab9ec.b4196e","type":"link out","z":"b27802e.27fed","name":"T1","links":["ea004038.c72ca8"],"x":185,"y":770,"wires":[]},{"id":"ea004038.c72ca8","type":"link in","z":"b27802e.27fed","name":"T2","links":["3dfab9ec.b4196e"],"x":135,"y":930,"wires":[["fb72809b.cb21c8"]]},{"id":"ed55fa65.1147d8","type":"comment","z":"b27802e.27fed","name":"Part 3 (New machine)","info":"","x":290,"y":970,"wires":[]},{"id":"9295a769.63156","type":"debug","z":"b27802e.27fed","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":230,"y":1020,"wires":[]},{"id":"fb72809b.cb21c8","type":"change","z":"b27802e.27fed","name":"Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"error","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":240,"y":930,"wires":[["1871fd96.0e312a"]]},{"id":"13d447f2.9fc538","type":"comment","z":"b27802e.27fed","name":"Message good here","info":"","x":300,"y":770,"wires":[]},{"id":"99c448cf.bf2b98","type":"comment","z":"b27802e.27fed","name":"Message good here","info":"","x":410,"y":880,"wires":[]},{"id":"ecca1f4d.7c46","type":"comment","z":"b27802e.27fed","name":"Message NOT good here","info":"","x":430,"y":1020,"wires":[]},{"id":"6ccf853d.6f8004","type":"mqtt-broker","z":"","name":"192.168.0.99:1883","broker":"TimePi","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]