You need a broker that the remote Node-RED can connect to.
I’m guessing that the remote Node-RED can not connect to your local broker.
So you need to find one that it can attach to.
There are several internet MQTT brokers you can use that you should be able to find with an internet search.
@knolleary i don't have two device in same local network i have just my raspberry in my local network but the node red is in an other place so i should using the mqtt
Then either your broker isn’t installed properly or configured properly or your machine sending the data can’t see it properly.
Try looking to see if you can see the data using another MQTT tool. Look to see if there are any errors being sent back to the machine sending the data.
That seems to reference an issue that was subsequently fixed (unless I'm missing something)
But, the OP is really struggling to even get going - I think differences between security of one broker over another one comes later in the conversation
Hi @mirou_IoT - I'm trying hard to understand exactly what you have got, but I'm still slightly confused.
you have a raspberry pi on your local network
"node-red is in another place" - what do you mean? What is it running on? A different device on a different network? Can your local raspberrypi access the network your other device is running on?
If the machine running node-red is not on the public internet then your raspberry pi is not going to be able to connect to it.
As other people have said, you need an MQTT broker somewhere that both your local device and the machine running node-red can access. This is why it works with mqtt.eclipse.org - because that is on the public internet.