What's this for?
This gist demonstrates feed + group context support for Adafruit IO's MQTT service.
Running this demo
- Create group: "Garage"
- Create group: "Office"
- Create a feed, "Signal" and add it to both groups
On your local machine
Get the code:
- Git clone this gist:
git clone https://gist.github.com/a04694748ad887d5aa7e644e3292fa81.git io-mqtt-demo
- Navigate to the new project.
- Install dependencies with
bundle install(installing bundler first, if you haven't yet)
Setup environment variables, run the following commands in your shell or add them to your
.profile. NOTE: this step requires MacOS or other linux-friendly shell.
export IO_USERNAME='yourusername' export IO_KEY='your-adafruit-io-key'
Run the code:
- In a new terminal, with the environment variables set, run
And watch the data fly!