I'm a beginner with Node Red and MQTT, but I've made some good strides. I have two raspberry pis that I downloaded MQTT and Node Red on.
I have simple Nodes that are currently sending the recurring outputs from my only Python code from my first Raspberry Pi to the debug tab. That's how far I've gotten so far because I didn't want to mess up anything else after so many attempts.
What I want to do is wirelessly send that data to my other Raspberry Pi via MQTT for it to receive the values. There's a final step of using that information for serial communication, but I can attempt this later.
Can I ask for some steps that I should do to accomplish this or a link to reference? I've researched and I can't find anything for two Raspberry Pis.
If your router allows this, reserve the IP address for this Pi so it never changes.
Use this IP address in the configuration of Node-red's MQTT nodes.
For testing, use topic "test" in MQTT-out on one Pi and MQTT-in on the other.
Inject some data to MQTT-out ("publish" it) and it will arrive at any MQTT-in ("subscribed" to the topic) node on the other Pi.
The only complication is if the Pies are connected to different networks. In that case you probably need to use a cloud based MQTT broker such as Hivemq.
Probably because MQTT doesn't care what devices are using it. It makes no difference if you are exchanging data between PCs, Linux, microcontrollers or mainframes.
There are a couple of deficiencies in that tutorial.
First, in item 2 it should be sudo apt update && sudo apt full-upgrade
Secondly in the section on allowing remote access (which @Ceowens will need to do) note that at the top of the file /etc/mosquitto/mosquitto.conf it states # Place your local configuration in /etc/mosquitto/conf.d/
One should not modify mosquitto.conf itself otherwise a future update may overwrite it. One should instead create a file in the conf.d directory. I make a file /etc/mosquitto/conf.d/mossy.conf and in that put
as suggested in the tutorial. In addition I put there