Publish to IBM Bluemix via Mosquitto from Intel Edison
Here is how to publish to IBM Bluemix via ‘mosquittopub’ (comes already installed on Intel Edison).
Tags
- intel-edison
Originally published at rexstjohn.com on August 14, 2015. Recovered from the Internet Archive.
Here is how to publish to IBM Bluemix via ‘mosquitto_pub’ (comes already installed on Intel Edison).
$ mosquitto_pub -h 'your_org.messaging.internetofthings.ibmcloud.com'
-i 'd:your_org:your_type:your_mac' -m '{"d":{"Volts":5}}'
-t 'iot-2/evt/status/fmt/json' -q 1 -p 1883
-u 'use-token-auth' -P 'YOUR_TOKEN_HERE'
These are the required inputs, replace the variable bits with your own authentication info:
-i client_id aka d:[YOUR_ORG]:[YOUR_TYPE]:[YOUR_MAC]
-h host [YOUR_ORG].messaging.internetofthings.ibmcloud.com
-t topic iot-2/evt/status/fmt/json
-q quality 1
-m value e.g. ‘{“d”:{“Volts”:5}}’
-p port 1883
-u username use-token-auth
-P password ‘YOUR_TOKEN’