Boron: publish subscribe using mqtt from a python script?

I am planning to create a Python script that will publish messages to multiple Borons.

I am looking at the API here. https://docs.particle.io/reference/device-os/firmware/boron/ It seems Particle.function and Particle.variable can be accessed via REST API. I can easily use Python with that using requests module, however I need the publish subscribe mechanism.

I am planning to run this python script on digitalOcean. I hope there is a way to publish messages to the Borons like for example using mqtt? Any help is highly appreciated.

Why then not using the Particle.publish() and Particle.subscribe() features?

From Python you can look here
https://docs.particle.io/reference/device-cloud/api/#publish-an-event
https://docs.particle.io/reference/device-cloud/api/#get-a-stream-of-events

2 Likes

thank you!!!