Hello,
Can I send and receive data from my MQTT mosquitto Broker installed on my Raspberry or do I also have to install Node-Red. In the Python cource in de beginning chapter MQTT is mentioned that allows to send commands to control outputs, read and publish.
Hello! Yes, you can have a Raspberry Pi running Mosquitto MQTT broker. Then, you can only have ESPs in your network talking to each other with publish and subscribe messages. You don’t need Node-RED installed. I hope that helps!
Hello your anser I aso thought. But why in the next chapter U use node red to swith a led and read the temperture on a sensor. I’d like to know how you switch a gpio on ESP with only Mosquito broker installeld on a Raspberry pi.
Mosquitto only distributes the MQTT messages in your network to all connected devices. In order for Mosquitto to send a message, there needs to be a client sending an MQTT message.
For example:
- ESP is client #1
- Node-RED is client #2
Those two clients can exchange MQTT messages through the Mosquitto broker. Instead of having Node-RED, you can use the following setup:
- ESP is client #1
- Another ESP as client #2
Regards,
Rui