Skip to content
anthonyrowe edited this page Nov 25, 2017 · 18 revisions

TODO: Populate this page with a description of the MQTT layout with some examples...

Observe Endpoint

Transducer Prefix

Subscribe Example

Below is an example of subscribing to a device using its own token with the following attributes:

  • user is set to Device ID: 5a19bb88f76abe01c57abfa6
  • password is set to Device Token: 0U3dAX3SBrSTc99yNLgeFF0AALq1Rez
  • subscribing to end all activity on its endpoint: 'openchirp/devices/5a19bb88f76abe01c57abfa6/#'
$ mosquitto_sub -v -i monitor2369 -h openchirp.andrew.cmu.edu --cafile /Users/user/anaconda/ssl/cacert.pem -u 5a19bb88f76abe01c57abfa6 -P 0U3dAX3SBrSTc99yNLgeFF0AALq1Rez -t 'openchirp/devices/5a19bb88f76abe01c57abfa6/#'
openchirp/devices/5a19bb88f76abe01c57abfa6/transducer/motor 10000
openchirp/devices/5a19bb88f76abe01c57abfa6/transducer/motor 5000
openchirp/devices/5a19bb88f76abe01c57abfa6/transducer/motor 60
openchirp/devices/5a19bb88f76abe01c57abfa6/transducer/motor 5000

Clone this wiki locally