mosquitto.chem.wisc.edu


This server hosts an MQTT broker for "internet of things" applications within the Department of Chemistry at the University of Wisconsin-Madison.
In particular, this server hosts:

This server is purposefully isolated to the campus network.
If you are reading this, congrats---you're on the network.

This server is maintained by Blaise Thompson and Alan Silver.
Please contact them with any questions or concerns.

mosquitto

This server runs mosquitto, an MQTT broker. Briefly, MQTT is a lightweight publish-subscribe protocol that allows many devices to communicate. The broker provides structured topics, e.g. "sensor42/temperature" and "instrument9/opa2/wavelength". Clients can publish topic updates. Other clients can subscribe to be notified each time a topic is updated. Refer to mqtt.org for more information.

Anyone on the campus network can subscribe to the topics served here. There are lots of great MQTT clients you can use. We recommend:

You'll need a password to publish to this broker. Talk to Blaise Thompson or Alan Silver if you want to start publishing.

influxdb

The Chemistry Department has standardized on the homie convention. This convention imposes a well-defined structure on top of the basic MQTT communication layer. This structure introduces a "device" topology.

This server stores all homie device history to an influx time-series database. Anyone on the campus network can query this database. Importantly, only homie-convention compliant MQTT topics are stored---other published topics are not recorded in any permanent way.

While we make every attempt to prevent data loss, please do not treat this database as an archive. You are responsible for saving data that you care about in a more permanent way. Device history older than two years will automatically be deleted.

Homie data is written to the database with each node corresponding to one field. All of the additional information that is represented within the homie hierarchy is stored as tags.

The following example will return all of the recorded "temperature" measurements within the last one day using curl.


curl -G 'mosquitto.chem.wisc.edu:8086/query?pretty=true' --data-urlencode "db=homie" --data-urlencode "q=SELECT \"value\" FROM \"temperature\" WHERE time > now() - 1d"

The following example will return all of the recorded "temperature" measurements within the last one day using Python. You will need the influxdb Python package.


import influxdb

client = influxdb.InfluxDBClient(host="mosquitto.chem.wisc.edu",
                                 database="homie")

result = c.query("SELECT value FROM temperature WHERE time > now() - 1d")

We have also set-up a grafana appliance with this database as a source. Check it out at grafana.chem.wisc.edu.


source                                                         CC0: no copyright