Can MQTT be used to handle data and management instead of Particle.Publish?

Is it possible to handle data to/from a particle argon via MQTT rather than Particles pub/sub; as well as managing the device binary updates?

Scenario:
The particle argon lives on a network that does NOT have access to the cloud, but can pivot data to the cloud via MQTT. Can the Particle.io cloud accept data via MQTT? Can the code updates (binaries) be pushed via MQTT from particle.io to particle devices? specifically the Argon.

@fvfrenzy, unfortunately, the Particle Cloud does not support MQTT whatsoever.

That’s what I suspected and unfortunate. If only they offered an on-prem version of their cloud system.

Early on they offered an open source version, but abandoned it years ago to keep it proprietary. @Brewskey maintains a version of Spark-Server that is compatible with Photon and possibly Electron devices, but not Argon or Boron.

2 Likes

That’s interesting. Maybe they will open it back up or package it for people who need an on-prem solution.

I wouldn’t count on it.

2 Likes

Argon and Boron should work with our fork as long as you use TCP. I haven’t tested this though.
UDP isn’t supported as it wasn’t something I needed.

What the cloud doesn’t support is all the new APIs around organizations, product groups, or basically any new API that Particle is charging for.

Unfortunately all Gen3 devices use UDP for the cloud communication.

Ahh… so they can’t switch between TCP/UDP like the Electron?

Maybe I’ll get motivated one of these weekends and add UDP support.

3 Likes

I’m a novice in this space. What does your spark-server do for the particle boards? Is it essentially doing all the same functions; receiving the data and pushing binaries out to the boards?

Unfortunately no. I looked into it a while back and there’s no option for TCP on Gen3. I’d love to use your server, but not possible at the moment. If you decide to add UDP I’d be happy to contribute either in testing or cash or both to see it happen.

1 Like

What do you get from this server that draws you to it? I’m a novice with these boards and IoT development in general. We are looking at these at work and the area they will go prohibits internet access. So if there is a way to get the data and push binaries from an on-prem server I’m intrigued.

Yes, that’s one thing it will do. Essentially you can run an older version of the Particle cloud locally or in your own cloud. As @Brewskey said newer features are not available (primarily the Enterprise features) but for just doing OTA updates and getting data published to local services it’s useful. For my purposes that’s all I need.

That sounds intriguing, if it becomes available on the Argon I will have to take a look. Thanks for all the information!

@Brewskey If I wanted to test this with a Photon, how would I go about that? Is there a guide somewhere that I can read through? (Keeping in mind I’m a novice lol)

Setup is pretty easy as long as you can navigate a command line

For local testing the database is fine but if you want to go to a production environment, you should set up a mongodb instance.

You do not have to have a private particle cloud to do stuff on your own lan. I have several wifi devices up and running. Some things I use the particle cloud. I also have boards inject stuff directly into a influxdb. I also have a couple that are using mqtt.

@darkstar2002 how do you mass update the binaries on your boards?

That part is still done from the cloud. My boards are all on a separate vlan with high restrictions to the internet.

Btw there is nothing to stop you from using MQTT with your own server or service. I use AWS IoT with great success. I still do firmware management via Particle Cloud but all data is passed via AWS over MQTT