Switching to AT&T M2X

Around August of last year, the time-series database I was using, TempoIQ, announced that they were not offering their data ingestion and storage plans any more. During the 2 week grace period until their server-shutdown, I looked through other alternatives to TempoIQ, such as Influx Data, RethinkDB, and finally AT&T M2X. I eventually picked AT&T M2X because I was able to write to the database via http as well as https, which is useful for low powered microcontroller platforms. Furthermore, it was the most economical solution offered.

I use the Python client library found here to interact with the AT&T M2X API for my data analysis (pulling from M2X and pushing to plot.ly), and the Arduino client library found here in order to push my data from the Particle Photon to the cloud. It took some time to familiarize myself with the new API, but I found it to be quite intuitive and useful!

The latest version of the PICKLE is comprised of a Plantower PMS5003 laser air quality detection sensor module (14$) and a Particle Photon (the microcontroller with built-in Wifi and a cloud service). As the data (LPO) is fed into the Photon, the microcontroller pushes the data to the M2X database as well as the Particle cloud. The Particle cloud plays an integral role in this setup because it makes it very trivial to manage multiple monitors simultaneously. For example, if I have 20 of these modules deployed in the field and I want to make a change to the program on each of the microcontrollers, rather than painstakingly tracking down each monitor and updating it, the Particle cloud allows you to manage all of the nodes—all through the cloud.

AT&T M2X console: Screen Shot 2017-06-13 at 3.18.53 PM

Particle console: Screen Shot 2017-06-13 at 3.15.40 PM
Another neat feature of AT&T M2X is that you can opt to make your databases public; that is, anyone can view your data without having explicit permission. For example, to view live updates from the monitors in your console (terminal), simply run

curl https://api.particle.io/v1/devices/events?access_token=e31c562d43dd3dd36b71297a0d22ccc579901829

Here is a live stream from one of the monitors in my house (averaged over 10 minutes for the past 24 hours). Note that the time is in GMT.

I am currently interning at the Bay Area Air Quality Management District (BAAQMD) for the summer of 2017; more to come on that later!

This entry was posted in Uncategorized. Bookmark the permalink.

1 Response to Switching to AT&T M2X

  1. hammillbr says:

    I am also trying to get a photon and a pms 5003 to work together. I am currently struggling to get the code to work. Would you mind sharing your code? Thanks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s