bridge
Last updated
Last updated
A Raspberry PI 3 Model B was used as gateway.
Hotspot for the Raspberry PI
A hotspot has to be configured so that no other networks are involved and the gateway is the MQTT-broker at the same time. The broker is receiving the data of the sensor.
The following picture is showing the instruction for the Raspberry PI's configuration of the hotspot:
MQTT for the Raspberry PI
A MQTT-broker is a good tool to collect the sensor's data and forward it to other applications. MQTT is very suitable for these tasks because it is a simple protocol which was designed for sensor-applications.
In our case we decided to use Mosquitto. The installation is just one command on the terminal of the Raspberry PI:
The Mosquitto-server should already be running and can be tested like this:
Now the subscriber should display the message "Hello Word, Mosquitto" on the display.
MQTT for the ESP8266
WIFI-Manager for the ESP 8266
Throughout the Wifi-Manager you can create an own hotspot and configure each WLAN, so that this module can also be configured by the user himself.
Installation of the Wifi-Manager for Arduino DIE
is a client based on Arduino, which gives us the possibility to send and retrieve messages to a specific topic.
Download the folder under and include the library in Arduino. Then you will get the possibility to install it in the Librarymanager.
The library for the Wifi-Manager can be found under . Download this folder and include it in the Arduino libraries just like the installation of MQTT: Sketch -> Include library -> Manage libraries... .