Gingerbread

BLE Gateway, Node-RED, and ESP8266

By ,

This project utilizes a BLE-MQTT gateway to collect bluetooth sensor data and pipe it to perform actions on a wifi connected ESP8266 gingerbread house, as well as utilize Node-RED for additional connectivity (text messages, tweets).  The code can be found on my Github.

 

 

 

Materials

Materials

System Diagram

 

  1. (Inputs) BLE Sensor This is a Bluetooth Low Energy (BLE) module from Silicon Labs (BGM111). I mounted a magnetic reed switch to sense if the door is opened or closed. When there’s door activity, this sensor sends the new door position to the gateway.  It’s also used as a water sensor.
  2. (Outputs) ESP8266-Powered Gingerbread House: I’m using an ESP8266 WiFi module to control the gingerbread house LEDs and front door servo motor. The ESP8266 gets door positions and LED colors by subscribing to MQTT topics.
  3. BLE-MQTT Gateway: A BLE module to capture the sensor data and a Raspberry Pi to publish the sensor data to MQTT.
Diagram

Diagram

 

range local

 

range remote

 

Magnetic Sensor

sensor Magnetic Sensor

water sensor

Water Sensor

 

Bluetooth Communications

Bluetooth Communications

 

Gateway

 

 

esp8266 breadboard

ESP8266 breadboard

ESP8266 Breadboard

ESP8266 Breadboard

inside

Inside Gingerbread House

 

Node-RED Flow

Node-RED Flow

 

app

Mobile App

 

twitter

Twitter Notification

 

text msg from water sensor

Water Sensor Text Message via Twilio