ble_mqtt_gateway

This is an old revision of the document!


BLE MQTT Gateway

the idea here is to have an esp32 based gateway which detects BLE Beacons and reports them to an MQTT server for presence detection to open doors, turn on lighs etc.

On the software side i decided to go with the OpenMQTTGateway

After Reading some git hub issues and blog posts I decided to trop the esp32 and go for an esp8266 combined with an HM10 module. for the esp8266 i will be using a wemos d1 mini. the nice thing is, that the HM10 module, if purchased on an SZ-040 (or AT-09) board fits right underneath the esp8266. combine some of the sockets that come with the wemos d1 mini and bend some pins on the ZS-040 board and you won't have to use a single wire.

here is how it connects:

pin on ZS-040 pin on D1 mini
RX D6
TX D7
VCC 5V
GND G

with the hardware in place let's get the software side done: first I setup_arduino_ide_for_esp8266. Now download the latest release of OpenMQTTGateway and extract it. Rename the folder to OpenMQTTGateway (remove the version) so that you can open it in the arduino IDE.

open the OpenMQTTGateway.ino file in your prepared arduino gateway and go through the User_config.h settings for your wifi, passwords and mqtt settings. In the module selecton comment out all the modules and remove the comment from the ZgatewayBT module. Next go through the settings in config_BT.h.

now Copy the contents of OpenMQTTGateway/lib to <sketchbook folder>/libraries in your arduino ide folder

  • ble_mqtt_gateway.1546893358.txt.gz
  • Last modified: 07.01.2019 21:35
  • by Pascal Suter