I am currently running a raspberry pi with a MQTT broker. But my problem is that I also want to use the raspberry pi to publish on the broker, for some microcontrollers to receive the message. I do not know how to utilise this. There's however a few ideas:
- Make Thonny open the terminal and make it paste this message: mosquitto_pub -d -t testTopic -m "Hello world!" Though I dont know whether that is possible, especially due to the "" that are required for it to work.
- Or a more direct method by using a mqtt library for Thonny. However there is only one library "mqtt 0.0.1", and the developer doesnt even have a github page for it. Also installing this library externally "micropython-umqtt.simple 1.3.4" didn't work either.