Incomplete data with MQTT node in Node-RED

Hi all,

I'm having an issue with the MQTT node in Node-RED. I'm not getting all of the data that I'm getting in a MQTT client application, so the data I'm receiving is incomplete. I'm wondering if anyone else has experienced this issue and how they might have resolved it?

I'm using the same broker and credentials in both the MQTT client and the Node-RED MQTT node, so I'm not sure why I'm getting different amounts of data.

Any help or advice would be greatly appreciated.



You will need to expand on that. How have you looked for it being incomplete? How big is the data and how is it structured? Do you mean that subscribed topics aren't being received or is it a large topic value?

If you are seeing this in a debug node, note that the debug node truncates data if it is too large.

Okay, so we have an end that is listening onqtt messages, formats it for an influx db, and pushes to it. There is a lot of data coming in, so we are using a switch node to differentiate the type of message before formating and sending to an influx db.
In the switch node (i also have an option othervise(as last one) which saves payload and topic in a local file (for debugging) . I also added a catch node to save all errors to file).
So there is absolutely no way thos error is on the node red part.

We used mqtt explorer and noticed topics that we don't have saved in the database, around 15, out of ~100

Same user , using HiveMQ broker.

Add directly to the MQTT-IN output port, a debug with the count option set or install a counter node.
Do the same for all outputs of the SWITCH and anywhere else in your flow - do the counts match what you see in MQTT Explorer?

What is more likely is a bug in your flow or an issue with something like the Influx node where 1 or more messages are dropped or not processed due to content.

Also, what QoS level are you using to subscribe in Node-RED and in MQTT Explorer?


Also add a switch node to select one of the topics that is missing and check whether it is being received by node-red.

Figured out where is was wrong.
Had a system in place to delete any payload that wasn't containing any numbers, thanks @Steve-Mcl to supply a good debug tutorial :slight_smile:

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