Duplicate/Replicate Sensor Data Received in Node Red?

Hi,

I am seeing an issue on two of the edge computers (running Node Red) we are using to receive sensor data.

I am seeing duplicate sensor data message coming into the gateway, which is then being duplicated on Ubidots. Sometimes the data comes more than twice (I’ve seen up to 6+ identical messages!).

This issue has been going on for a while, and has happened again with the new edge computer and sensors we have just received.

For example, I have a 1-channel current sensor that’s setup to report every minute (higher frequency for testing purposes right now). Here is what I am seeing in the debug window of node red:

As you can see, there are multiple identical messages being delivered to the edge computer, which in turn upload to Ubidots. The only difference is the _msgid.

Have you seen this happen before, and do you know what the cause of this could be? Would I need to filter out the duplicates before sending to Ubidots?

I have ruled out Ubidots or any functions for processing the data to send to ubidots. This is occuring directly at the gateway reciever.

Thank You!

Hi,

Yes, that’s a known bug. Do you have multiple flows with Wireless Gateway Nodes connected? If so you can just power cycle the Gateway and it should resolve replication of messages.

Thank You, Travis! Power cycling seems to have worked! I only had 1 flow setup, so that was likely not it.

Is this a big with Node Red, or the NCD library (out of curioisty)?

Can I anticipate this bug showing up at some point in the future if I set up the system and make no changes, and it is working as expected initially? Or once I see it is working and there are no duplicate messages coming in, the system should be stable?

Thanks again!

Hmmm, spoke to soon… I am already seeing duplicate messages on both sensors (but right now it’s only in duplicate, and not 3-6+ as before power cycle).

Do you have any suggestions to filter this data out on Node Red?

Thanks again.

Hi,

This is an issue with Node-Red on the Edge Computer. It appears that sometimes when deploying that the memory does not clean-up on deploy so multiple instances of the message creator are present.

Are you seeing duplicate messages without deploying changes to Node-Red on the edge computer?

Yes, so I restarted the edge computer again after a final deploy, and it seems to be holding for the last few minutes.

Seems like the trick may be to restart the edge computer once all changes are made on node red and deployed, and don’t touch anything in node red.

I will continue to monitor with the current state (without making any changes) and provide an update if it continues to send duplicate data.

Thanks!

This issue has been fixed. Update node red on the edge computer.
by using these commands
opkg update

opkg upgrade onion-node-red

I have performed the update, and will let you know if issues persist, but it seems to be working so far.

Thanks everyone! :slight_smile: