2016/06/22

Install MQTT Broker Mosquitto on Raspberry Pi

I have installed the MQTT Broker Mosquitto on my Raspberry Pi Model B+ with Raspbian Jessie pre-installed following the procedure described below a few days ago. The version of Mosquitto installed is 1.4.9 supporting both MQTT protocol 3.1 and 3.1.1.

It is stated on module page of  NodeMCU documentation website ( https://nodemcu.readthedocs.io/en/master/en/modules/mqtt/ )that:

"The client adheres to version 3.1.1 of the MQTT protocol. Make sure that your broker supports and is correctly configured for version 3.1.1. The client is backwards incompatible with brokers running MQTT 3.1."

1. Update your packages:

sudo apt-get update
sudo apt-get upgrade

2. To use the new repository, import the repository package signing key:

wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key
sudo apt-key add mosquitto-repo.gpg.key
sudo rm mosquitto-repo.gpg.key

3. Make the repository available to apt:

cd /etc/apt/sources.list.d/

4. Install the packages list for your version of Raspbian.

For Wheezy (old version)

sudo wget http://repo.mosquitto.org/debian/mosquitto-wheezy.list

For Jessie (latest version)

sudo wget http://repo.mosquitto.org/debian/mosquitto-jessie.list

5. Update apt information and install Mosquitto:

sudo apt-get update
sudo apt-get install mosquitto mosquitto-clients

Additional Board Manager URLs For Arduino IDE


Here's my collection of additional board manager URLs for Arduino IDE version 1.6.4 or greater - don't use 1.6.2!


ESP8266

http://arduino.esp8266.com/stable/package_esp8266com_index.json

MediaTek LinkIt Smart 7688 DUO

http://download.labs.mediatek.com/package_mtk_linkit_smart_7688_test_index.json

MediaTek LinkIt One

http://download.labs.mediatek.com/package_mtk_linkitone_index.json

Realtek Ameba

https://github.com/Ameba8195/Arduino/raw/master/release/package_realtek.com_ameba_index.json