Node-RED working on Raspberri Pi but not on PC!

  1. I am reading data of a humidity sensor with Node-RED

  2. I am using Arduino Uno + Ethernet shield to publish data by using mqtt.

  3. I am publishing data after each 3 seconds. Data is just single value like 30

  4. I am using PubSubClient library

If i use mosquitto and Node-RED on my laptop. Then Node-RED stops taking sensor data after almost 40 seconds.

But

If i use mosquitto and Node-RED on my Raspberri pi. Then Node-RED keeps taking sensor data. Works every thing fine.

Really curious to know about this !!! Need your help

Thanks.

Use mosquitto_sub to see whether it is getting to mosquitto.

Hi @saeed1.

Something else to try:

On your laptop, create a small flow where you get an inject node and connect it to a mqtt out node and set it to publish to a channel test.

Then get a mqtt in node and subscribe it to test. Connect that node to a debug node and activate the node to display its data.

Deploy and press the inject node every 30 seconds.
See how long that works.

That will help determine if the problem is in the unit sending the data or the reception of the data.