Following some questions recently posted on a forum, I thought it would be helpful to clarify how devices using Bluetooth Low Energy (BLE) technology can be integrated into an Home Automation controller through the Theengs ecosystem.
Introduction: Types of Bluetooth CommunicationBluetooth allows for several types of communication:
For a deeper understanding of these communication types, check out this article here.
Theengs mainly focuses on reading devices that broadcast information, although point-to-point communication is also possible in certain cases.
Core Functions Explained:
The scanner reads Bluetooth packets broadcasted by devices. It relies on hardware components such as a USB dongle, or the Bluetooth part of an ESP32 or Raspberry Pi.
The decoder processes raw information from the scanner to convert it into data understandable by other programs. It produces two types of information:
- Environmental data and the device's brand/model
- Properties data
This is the transmission of the above information using the MQTT protocol to a broker, either over a network layer or directly.
MQTT discovery automatically creates the device shell in the controller that will receive the data, based on static device information. For example, if it's a LYWSD03MMC model with temperature, humidity, and battery.
The home automation controller
The controller receives the MQTT information, creates the device via discovery, and then populates it with data. The controller can be Home-Assistant, OpenHAB, Jeedom, Domoticz, ioBroker and any MQTT compatible software.
How to have your BLE devices with your favorite Home Automation controller and Theengs
OpenMQTTGateway: Using an ESP32 OMG, you can scan, decode, and publish to an MQTT broker.
Theengs Gateway: On a server or PC, Theengs Gateway can scan using onboard Bluetooth or a USB dongle, decode, and publish to an MQTT broker.
Theengs App: On an Android or iOS smartphone/tablet, the Theengs app can scan, decode, and publish to an MQTT broker. The app also allows for local reading of sensor information.
Theengs Gateway as a decoder for OpenMQTTGateway or other antennas: In this case, you can use OpenMQTTGateway for scanning and MQTT publishing only, and ask Theengs Gateway to perform the decoding.
There are several plugins, methods or integration addon available to facilitate the installation and configuration depending on the controller you use:
* For Home Assistant and Theengs Gateway we maintain an addon
* For Jeedom and Theengs Gateway there is a plugin