Concatenate Strings from a Payload

I'm working on a project where I need to send images from an ESP32-CAM to Node-Red via MQTT. As the image can be very heavy, I chose to split the string (Base64) into chunks and reassemble it in Node-Red. To reassemble I'm trying to use the Join node, it works, but it adds each chunk as a new line, breaking the final payload result. Is there any way to concatenate strings without adding new lines?

My flow:

[{"id":"aaa2f6a8.167508","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"ae2e7a65.89c638","type":"mqtt in","z":"aaa2f6a8.167508","name":"","topic":"PICTURE","qos":"2","datatype":"auto","broker":"fb44c7e.d7ff038","x":360,"y":260,"wires":[["13fbc609.551cca","6e7f02b7.8d7f8c"]]},{"id":"313660dc.b0e4e","type":"image","z":"aaa2f6a8.167508","name":"","width":"200","data":"payload","dataType":"msg","thumbnail":false,"active":true,"pass":true,"outputs":1,"x":720,"y":280,"wires":[[]]},{"id":"26f92174.9bef6e","type":"debug","z":"aaa2f6a8.167508","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":690,"y":340,"wires":[]},{"id":"13fbc609.551cca","type":"debug","z":"aaa2f6a8.167508","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":370,"y":360,"wires":[]},{"id":"6e7f02b7.8d7f8c","type":"join","z":"aaa2f6a8.167508","name":"","mode":"custom","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"","joinerType":"str","accumulate":false,"timeout":"5","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":530,"y":260,"wires":[["810b0ec.20845f","313660dc.b0e4e","26f92174.9bef6e"]]},{"id":"810b0ec.20845f","type":"mqtt out","z":"aaa2f6a8.167508","name":"","topic":"RETURN","qos":"","retain":"","broker":"fb44c7e.d7ff038","x":700,"y":220,"wires":[]},{"id":"fb44c7e.d7ff038","type":"mqtt-broker","z":"","name":"ESP32CAM_MQTT_01","broker":"192.168.0.102","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"5","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

There may be a way with the join node but to get you Moving...

If you set the join node to return an array you can use a function node and the array join function...

msg.payload = msg.payload.join("");
return msg;

[{"id":"e4c8f37e.e68bf","type":"mqtt in","z":"83586cc2.a740b","name":"","topic":"PICTURE","qos":"2","datatype":"auto","broker":"d8f5182d.3296f8","x":680,"y":260,"wires":[["8f9355f.de3b6a8","ab2fae17.d62bc"]]},{"id":"8f9355f.de3b6a8","type":"debug","z":"83586cc2.a740b","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":690,"y":320,"wires":[]},{"id":"ab2fae17.d62bc","type":"join","z":"83586cc2.a740b","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"","joinerType":"str","accumulate":false,"timeout":"5","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":910,"y":260,"wires":[["eac5aa92.3bfa88","1a8e17de.257778","34cfbe74.8a22a2"]]},{"id":"eac5aa92.3bfa88","type":"mqtt out","z":"83586cc2.a740b","name":"","topic":"RETURN","qos":"","retain":"","broker":"d8f5182d.3296f8","x":1080,"y":200,"wires":[]},{"id":"1a8e17de.257778","type":"function","z":"83586cc2.a740b","name":"","func":"msg.payload = msg.payload.join(\"\");\nreturn msg;","outputs":1,"noerr":0,"x":1090,"y":260,"wires":[["bb42a927.ae2ee8"]]},{"id":"f9235532.ebf288","type":"inject","z":"83586cc2.a740b","name":"","topic":"","payload":"abc","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":690,"y":100,"wires":[["9f60da6a.6aad28"]]},{"id":"ccc06cfb.87e3a","type":"inject","z":"83586cc2.a740b","name":"","topic":"","payload":"123","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":690,"y":140,"wires":[["9f60da6a.6aad28"]]},{"id":"bcfa9365.1497","type":"inject","z":"83586cc2.a740b","name":"","topic":"","payload":"xyz","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":690,"y":180,"wires":[["9f60da6a.6aad28"]]},{"id":"9f60da6a.6aad28","type":"mqtt out","z":"83586cc2.a740b","name":"","topic":"PICTURE","qos":"","retain":"","broker":"d8f5182d.3296f8","x":920,"y":100,"wires":[]},{"id":"bb42a927.ae2ee8","type":"debug","z":"83586cc2.a740b","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","x":1250,"y":260,"wires":[]},{"id":"34cfbe74.8a22a2","type":"debug","z":"83586cc2.a740b","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","x":930,"y":320,"wires":[]},{"id":"d8f5182d.3296f8","type":"mqtt-broker","z":"","name":"ESP32CAM_MQTT_01","broker":"192.168.0.102","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"5","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
1 Like

Thank's @Steve-Mcl for u fast response.
Your example works very well, but when I send the chunks to the topic PICTURE it apparently works if you just look at the debugger.
See the print below:

So, if I monitor the topic RETURN through the mosquitto in cmd I get a result that seems to be the same as the debugger.

It seems to be all right, but if you copy the data to the clipboard and paste it into Office Word using show everything, you can see that between each chunk there is a line break.

It looks as if the incoming message from MQTT must have a newline on the end. You can't see that in the debug as the string is too long, so feed the MQTT into a function node that extracts the last 10 characters from the string and feed that to a debug to see what is there.

1 Like

I think the node-red-node-base64 node ignores whitespace so should handle that case just fine and convert it back to a buffer for you.

1 Like

Hi @dceejay, tanks for your help.

Putting base64 node I get this:

odd - can you share the full output from the debug node just before the base64 node - you may need to set debug to send to console to see the full value and copy/paste it from there.

1 Like
/9j/4AAQSkZJRgABAQEAAAAAAAD/2wBDAAoHCAkIBgoJCAkLCwoMDxkQDw4ODx8WFxIZJCAmJiQgIyIoLToxKCs2KyIjMkQzNjs9QEFAJzBHTEY/Szo/QD7/2wBDAQsLCw8NDx0QEB0+KSMpPj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj7/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/wAARCADwAUADASEAAhEBAxEB/9oADAMBAAIRAxEAPwDyhtuehox8vetNtxcnYTABzTsflWcuW49Rqqp7cU4AelGiB6CfL6UcU4lBikIGab0JFNG0Z6Uh8ugnGeKWgAwvpSYp9Rb7htHaihsbXQSlpabhYTgmjaM02ITbzRSVgFAzywo49KJdx3G4GOlHfpS3ATbjpS8U2gtoJSYoWhNm...

I can't configure debug to get all.

But if I take the payload data via cmd in the mosquitto and paste it into Office Word showing everything, pilcrow sign appears.

You need to set it to send to console. Then copy/paste from the console log .

1 Like

Got it! I'll do it soon.

Microsoft Windows [versĂŁo 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Todos os direitos reservados.

C:\Users\aieser.santos>node-red
18 Sep 11:46:47 - [info]

Welcome to Node-RED
===================

18 Sep 11:46:47 - [info] Node-RED version: v1.1.3
18 Sep 11:46:47 - [info] Node.js  version: v12.18.3
18 Sep 11:46:47 - [info] Windows_NT 6.1.7601 x64 LE
18 Sep 11:46:50 - [info] Loading palette nodes
18 Sep 11:47:07 - [info] Dashboard version 2.23.2 started at /ui
18 Sep 11:47:07 - [info] Settings file  : \Users\aieser.santos\.node-red\setting
s.js
18 Sep 11:47:07 - [info] Context store  : 'default' [module=memory]
18 Sep 11:47:07 - [info] User directory : \Users\aieser.santos\.node-red
18 Sep 11:47:07 - [warn] Projects disabled : editorTheme.projects.enabled=false
18 Sep 11:47:07 - [info] Flows file     : \Users\aieser.santos\.node-red\flows_A
COM201.json
18 Sep 11:47:07 - [info] Server now running at http://127.0.0.1:1880/
18 Sep 11:47:07 - [warn]

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

18 Sep 11:47:07 - [info] Starting flows
18 Sep 11:47:07 - [info] Started flows
18 Sep 11:47:07 - [info] [mqtt-broker:ESP32CAM_MQTT_01] Connected to broker: mqt
t://192.168.0.102:1883
18 Sep 11:47:07 - [info] [mqtt-broker:ESP32CAM_MQTT_01] Connected to broker: mqt
t://192.168.0.102:1883
18 Sep 11:47:18 - [error] [base64:35f80a71.2e27b6] Invalid Base64 string
18 Sep 11:47:18 - [info] [debug:d34326f2.7cada8] /9j/4AAQSkZJRgABAQEAAAAAAAD/2wB
DAAoHCAkIBgoJCAkLCwoMDxkQDw4ODx8WFxIZJCAmJiQgIyIoLToxKCs2KyIjMkQzNjs9QEFAJzBHTEY
/Szo/Q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Bi02mIjNRGkB
GTUZNADKTNACZpM0CImqImgRGaiNMZETUTUCG0ZqmITdUytSA9JkNUpmrAsozPVJmzWiEIKeKYySjNAg
pRTGSquasxx1LAnEVO8moGQPFVdlxTuAzNOzVCFzTqYBUZNAEZNRsaoRCxqMmpAbupuaAEJpM0CImamE
0wIyaiagZCxqMmmIZnmkJ5piCnA0hnpbvVKY1gMozVVrRAhwFPpjFpM0xBViNKQFuKOrscdRIZaSKnGO
swK8kdUZkpoCm4pma1QDxTxVCA1E1AEbGoWNAELGmZoAjJpuaAEzRmkBCxqPNUSIaiY80DImNRGgQ3NJ
miwCZpwNMZ6JI1VnNY2GVZOahIqhi06qEFNpDJo1q7EtJiL0SVcjWsmMsqKcRUAVpRWfNQgM+Wq3et0B
KKeKoQGonpgVmaoiaAI2NRE0AMJpuaYgoJ4pCK7HmmZoAaWqImqAiLUzNADc03NAxacKAPQWaojWQyJh
UDUANp1UMSkFMC3EKvRCpkIvRCra1iwH5p26pGV5mrOnNNAZ8xqt3reIidBmnmqEMNV5GpgVWaoy1IZG
WqMtTEJmm5oENzQTSAgeot3NMYwmoy1MCImkJoENzSUhhmlBpgf/2Q==

Hi thanks for that... for some reason that string has more than one thing in it...
The first part goes up to Bpgf/2Q==
If I split into 2 then they do both decode ok as
image
so you need to ensure only one arrive at a time

1 Like

I didn't really realize it, I will analyze my code better. Thank you!

It worked! The problem was my code on ESP32-CAM that was not passing the chunks correctly.
The flow sent by @Steve-Mcl works very well.

Thanks @Steve-Mcl, @Colin and @dceejay :clap: :raised_hands: :pray:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.