Xiaomi Mijia Hygrothermo V2 read data from Python3 샤오미 온습도계V2 파이썬으로 읽기
Reference : https://zsiti.eu/xiaomi-mijia-hygrothermo-v2-sensor-data-on-raspberry-pi/
#Bluetooth backend program install -
$sudo apt-get install python3-pip libglib2.0-dev
$sudo pip3 install bluepy
$sudo git clone https://github.com/ratcashdev/mitemp.git
$git clone https://github.com/ChristianKuehnel/btlewrap.git
$sudo git clone https://github.com/ChristianKuehnel/btlewrap.git btlewrap-git
$mv ./btlewrap/btlewrap/ ./mitemp/
$sudo mv ./btlewrap-git/btlewrap/ ./mitemp/
$sudo rm -rf btlewrap-git
$cd mitemp
#Mac address find (NAME IS MJ_HT_V1 )
$sudo blescan
Device (new): 4c:65:a8:d7:62:be (public), -67 dBm
Flags: <06>
Complete 16b Services: <0000180f-0000-1000-8000-00805f9b34fb,0000180a-0000-1000-8000-00805f9b34fb>
16b Service Data: <ffffe6a7f8ca14a2>
Complete Local Name: 'MJ_HT_V1'
$python3 /home/pi/mitemp/demo.py --backend bluepy poll 4c:65:a8:d7:62:be
Output
Getting data from Mi Temperature and Humidity Sensor
FW: 00.00.66
Name: MJ_HT_V1
Battery: 80
Temperature: 25.3
Humidity: 40.0