This commit is contained in:
Stuart Feichtinger 2016-01-31 19:32:56 -06:00
parent 899104a8ac
commit 002c1d272c

View File

@ -4,7 +4,7 @@ This example illustrates Publish an arbitrary data packet using the Adafruit MQT
## Installing and configuring Mosquitto (minimal working setup) ## Installing and configuring Mosquitto (minimal working setup)
####On Raspberry Pi/Linux: ####Installing on Raspberry Pi/Linux:
```bash ```bash
sudo apt-get install mosquitto sudo apt-get install mosquitto
@ -12,14 +12,14 @@ cd /etc/mosquitto/
#See "Both" Setup Instructions Below #See "Both" Setup Instructions Below
``` ```
####On a Mac: ####Installing On a Mac:
```bash ```bash
brew install mosquitto brew install mosquitto
cd /usr/local/etc/mosquitto cd /usr/local/etc/mosquitto
#See "Both" Setup Instructions Below #See "Both" Setup Instructions Below
``` ```
####Both ####Configuring Mosquitto
```bash ```bash
sudo nano mosquitto.conf sudo nano mosquitto.conf
``` ```
@ -55,14 +55,13 @@ You're almost done! We just have to create and populate the password file we jus
* Username: TestPy * Username: TestPy
* Password: TestPy * Password: TestPy
```bash ```bash
touch pwfile #create the password file touch pwfile #create the password file
mosquitto_passwd pwfile TestUser #Enter and confirm password when prompted mosquitto_passwd pwfile TestUser #Enter and confirm password when prompted
mosquitto_passwd pwfile TestPy #Enter and confirm password when prompted mosquitto_passwd pwfile TestPy #Enter and confirm password when prompted
``` ```
---
## Using Example Python Subscriber: ## Using Example Python Subscriber:
Install dependencies if haven't already Install dependencies if haven't already