前言
install Bluepy ubuntu 20.04 with mijia temperature sensor 2 Step by step
安裝藍牙元件~

/boot/firmware/syscfg.txt
enable_uart=1
dtparam=audio=on
dtparam=i2c_arm=on
dtparam=spi=on
cmdline=cmdline.txt
#include no
include btcfg.txt
install bluetooth from ubuntu
sudo apt install pi-bluetooth
install bluepy libs
sudo apt-get install python-pip libglib2.0-dev
install pip3 by pip
sudo pip3 install bluepy
Find device From hcitools
sudo hcitool lescan –duplicate
Find LYWSD03MMC

安裝小米溫度計2代的Python 取值元件
在這裡下載到 Python For 二代:
https://github.com/JsBergbau/MiTemperature2
然後執行:

就可以抓到溫度了