Skip to content

Instantly share code, notes, and snippets.

@Ollie-Boyd
Last active November 29, 2023 18:08
Show Gist options
  • Select an option

  • Save Ollie-Boyd/6daf62cc43d645d8504a0bf2556a2f08 to your computer and use it in GitHub Desktop.

Select an option

Save Ollie-Boyd/6daf62cc43d645d8504a0bf2556a2f08 to your computer and use it in GitHub Desktop.
Xiaomi bluetooth sensor gateway

This has four parts,

  • Flash and configure the Xiaomi LYWSD03MMC device with custom firmware [complete]
  • Write Python script to capture BTLE advertisement packets and POST the detalis to Google apps endpoint.
  • Write and publish the simple Google apps script to create endpoint which adds lines to Sheet from data in POST request.
  • Configure Google Looker Studio to display time series data from GSheets.

Notes:

Firmware docs and flasher: https://github.com/pvvx/ATC_MiThermometer

This is a guide to some of the configuration settings: https://community.home-assistant.io/t/home-asssistant-xiaomi-mijia-lywsd03mmc-temperature-and-humidity-sensor-tutorial-september-2022/456403

Create simple GApps endpoint: https://www.youtube.com/watch?v=JFp_HFtDPHs

Example Python script to run on Pi Zero W 2: https://hackaday.com/2020/12/08/exploring-custom-firmware-on-xiaomi-thermometers/ https://github.com/colin-guyon/py-bluetooth-utils https://github.com/frawau/aioblescan

Configure headless Pi Zero W 2 out of box: https://desertbot.io/blog/headless-raspberry-pi-zero-w-2-ssh-wifi-setup-mac-windows-10-steps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment