/MeshTemp

Custom firmware for Xiaomi Mi Tempuerature and Humidity Monitor (LYWSDCGQ/01ZM)

Primary LanguageC

MeshTemp

Bringing Bluetooth mesh to Xiaomi's Bluetooth Temperature Sensors

Notes

  • This project is still in development. The Xiaomi Bluetooth temperature sensor has been modified to have a nRF51822-QFAC for the extra RAM (32K) and Flash (256K)
    • Builds or this board only need to apply the boards/xiaomi_bt_sensor_dev.overlay file during build.
  • The end goal is to build firmware that will work on unmodified board.

Requirements

  • Zephyr's West tool
    python3 -m pip install west
  • Zephyr SDK

    TODO: Add instructions for downloading Zephyr SDK to match current zephyr version.

Building

# Use west to clone our repository and set up appropriate project structure
west init -m https://github.com/NZSmartie/MeshTemp && cd MeshTemp
# Checkout all required modules as per MeshTemp/west.yml
west update
# Build the firmware
cd MeshTemp && west build

Building for development

The modded board used for development reasons uses an overlay file that targets the nRF51822 QFAC. Building for this target is done by

west build -- -DUSE_DEV_BOARD=1

Progress

  • Display driver for Zephyr is implemented
    • Display is mapped out
    • Display sensor values
  • Mapped GPIO
    • Single button on back
    • Battery measure through ADC 4
  • Measure battery voltage through ADC
  • Read sensor data (Zephyr has built in support for SHT3Xd)
  • Bluetooth support
    • Implement Bluetooth Environmental Sensing Service (ESS)
    • Require bonded device before allowing read/write to ESS characteristics
    • Bluetooth Mesh Support
  • Power Management (power saving)