A BLE scanner for Govee H5074 temperature sensors.
The Govee BLE scanner uses a HCI connection to scan for packets of type HCI_EVENT_PKT (04) with event types of EVT_LE_META_EVENT and extracts all advertising data from them. It then looks for AD type identifiers of 0xFF (manufacturer data), and within those for the company identifier 0x88EC, which contain the encoded temperature and humidity. For more detail please refer to the wiki and the Bluetooth Core Specification at https://www.bluetooth.com/specifications/bluetooth-core-specification/.
The Govee BLE scanner is written in C++ and tested on Raspberry Pis. Besides the standard libraries, it requires libbluetooth.
It has two main classes: a BLEPacket, which stores all packet information and BLEScan, the scanner that looks for HCI_EVENT packets.
To run the scanner, do the following:
sudo apt-get install bluetooth bluez libbluetooth-dev
make release
sudo ./build/release/goveeBLE
Optionally the doxygen documentation can be created with
make doc
This project served as a proof of concept and is probably finished in its current stage. The next steps are to send the data to InfluxDB and an MQTT broker, but that will be a separate project.