Node red on win 10 / arduino


i am new to this area and would like to use node red on arduino to controll sensors connected to arduino - only locally (meaning create senarios between desktop on node-red and arduino board - no need for internet).

Question is, do i need to install Mosquitto mqtt broker?

Thank you in advance

IF you want to send messages between an Arduino and Node-red on another device
THEN MQTT is one very good way to manage the messages.

MQTT requires a broker, which should ideally be online 24/7.

Mosquitto is a very good broker. You can easily install it on a small computer such as a Raspberry Pi, but I believe you can install it on Windows.

If the broker is switched off, your Arduino won't be able to send any data.

There are other options including a cloud based broker such as hivemq or Aedes in Node-red

If really local then the arduino may well already connected to the PC via a USB/serial cable - so you can certainly use that if you like and just send data over serial. No need for MQTT.

If it is network connected (either ethernet or wifi) then yes MQTT is a great solution and yes you will need a broker somewhere - most probably on the PC.

Thank you for your reply.

Are you familiar with any instructions/ support forum to fully install mosquitto on win10? as i find it difficult to run it on the desktop together with node red.

And yes, via ethernet.


I don't use windows but a quick google finds How to Install The Mosquitto MQTT Broker- Windows and Linux etc

I've done that previously. Though you are right - it isn't as easy as it should be. Not any fault of Mosquitto though, that is down to Windows which is generally a much better user-OS than a server-OS :grin:

You will need to get your head around the Windows Scheduler and you need to decide whether you only ever want it working once you've logged in - which is fine for a dev PC in many cases and is rather easier - or running all the time like on a Linux server. That is a bit harder to set up and work out what happens to log files and the like. But not too hard.

Make life easy for yourself, buy a Pi Zero W (rev 1.1 works fine and is cheaper)
Install the lite version of Buster on it
install Mosquitto on it (I'm using v1.5.6)
Set it up so it can connect to your WiFi network

Mine has been running for a couple year now and has currently been up for 11 weeks, 1 day and 6 hours.

Pi OS Bullseye works fine too.

1 Like

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