Message Payload Limitations

I'm trying to pass a message from a mobile using 'SMS Receiver'-->--'String'-->--'Serial Output' nodes, but Node red seems to truncate the message after 153 Characters..

The below message is what I'm trying to pass, but Node Red isn't happy with everything past 'BOX_L='..

Can anyone help with this? Am I missing something?

EGXX 03111200 05 5/5/2 75/75/50 NR/NR/4 WET/WET/SLUSH : BOX_H="40" BOX_I="RWY 05 REDUCED TO 2800" BOX_J="DRIFTING SNOW" BOX_K="RWY 05 LOOSE SAND" BOX_L="RWY 05 CHEMICALLY TREATED" BOX_M="RWY 05 SNOW BANK L12 FM CL" BOX_N="TWY B SNOW BANK" BOX_O="RWY 05 ADJ SNOW BANKS" BOX_P="TWY C POOR" BOX_R="APRON 1 POOR" BOX_T="DONT DELAY DIVERT TODAY"

Welcome to the forum!
Is this from the debug panel?

1 Like

No, I don't appear to get anything in the Debug Window.. I do get a snapshot in the Context tab that seems to show characters being added to the start of the string.

I'm also prepending the message with a * and ending it with a # so my software can recognise the start and end of the string..

Try outputting the payload to a debug node and see what you get.

Could you walk me through that? I'm a proper noob on NodeRed..? :slight_smile:

Can you post your flow here. Payload should not be in Global context, unless you created a global context variable called "payload". If you export your flow from the editor menu, then press
the "</>" button in the post dialogue and insert the exported flow.
where it tells you to.

Ok. I've added a debug node directly after the SMS Receiver node and it appears that the SMS Node is limiting the output to 160 characters..

[{"id":"6da2a39b.2ca16c","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"e47c75a8.b06d08","type":"sms_receiver","z":"6da2a39b.2ca16c","filter":"+447710678310","name":"SMS1(SMU)","x":130,"y":120,"wires":[["3d633216.6f141e","7180301c.45ba","ef70fc12.a5587"]]},{"id":"396bb7e9.cafc48","type":"serial out","z":"6da2a39b.2ca16c","name":"Serial Out","serial":"935696bb.966468","x":800,"y":120,"wires":[]},{"id":"1037b10d.84135f","type":"sms_sender","z":"6da2a39b.2ca16c","number":"+44","prepend":"","name":"SMS1(SMU)","x":590,"y":360,"wires":[]},{"id":"3d633216.6f141e","type":"trigger","z":"6da2a39b.2ca16c","op1":"","op2":"SMU Report has been received","op1type":"nul","op2type":"str","duration":"250","extend":false,"units":"ms","reset":"","bytopic":"all","name":"SMU RX Message","x":370,"y":360,"wires":[["1037b10d.84135f"]]},{"id":"7180301c.45ba","type":"debug","z":"6da2a39b.2ca16c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":460,"y":200,"wires":[]},{"id":"ef70fc12.a5587","type":"string","z":"6da2a39b.2ca16c","name":"Prepend Message","methods":[{"name":"prepend","params":[{"type":"str","value":"*"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":490,"y":120,"wires":[["396bb7e9.cafc48"]]},{"id":"935696bb.966468","type":"serial-port","z":"","serialport":"/dev/ttyS0","serialbaud":"9600","databits":"8","parity":"none","stopbits":"1","waitfor":"","newline":"","bin":"false","out":"char","addchar":"#","responsetimeout":"10000"}]

Which is the normal limit for an SMS message.

But if I send the full message directly to my colleagues mobile, they get the full 362 Characters... I guess it could be down to the ASDA Sim I'm using in the modem...

I cannot try anything here as I don't have SMS nodes installed.

Possible!

BOO!... Thanks very much for your assistance with this @ghayne. :slight_smile:

Is there a function that you know of within NodeRed that could take the split messages and reconstitute them into a single message prior to sending them out as a serial string?

Have a look at the Join node!

Like this:

[
    {
        "id": "2f55b30644be1197",
        "type": "tab",
        "label": "Flow 2",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "10b71daa4f1b1bb0",
        "type": "inject",
        "z": "2f55b30644be1197",
        "name": "",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "Message1",
        "payloadType": "str",
        "x": 100,
        "y": 100,
        "wires": [
            [
                "9e773d118fa24bdc"
            ]
        ]
    },
    {
        "id": "9e773d118fa24bdc",
        "type": "join",
        "z": "2f55b30644be1197",
        "name": "",
        "mode": "custom",
        "build": "string",
        "property": "payload",
        "propertyType": "msg",
        "key": "topic",
        "joiner": "",
        "joinerType": "str",
        "accumulate": false,
        "timeout": "",
        "count": "2",
        "reduceRight": false,
        "reduceExp": "",
        "reduceInit": "",
        "reduceInitType": "",
        "reduceFixup": "",
        "x": 330,
        "y": 100,
        "wires": [
            [
                "521b3db1a5d220e2"
            ]
        ]
    },
    {
        "id": "fbe2a05264d45f1f",
        "type": "inject",
        "z": "2f55b30644be1197",
        "name": "",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "Message2",
        "payloadType": "str",
        "x": 100,
        "y": 140,
        "wires": [
            [
                "9e773d118fa24bdc"
            ]
        ]
    },
    {
        "id": "521b3db1a5d220e2",
        "type": "debug",
        "z": "2f55b30644be1197",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 610,
        "y": 100,
        "wires": []
    }
]

Will do. Thank you very much for your help with this. :clap: :slight_smile:

No problem!

Hi Garry, would you know of a method to remove the User Data Header from the individual SMS strings prior to them being reconstituted into a single message? I thought there may be a function where I can remove 'x' number of characters from the start of the string, thereby removing the header..? The length of the header is explained here: