본문 바로가기

Computer/Linux

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



'Computer > Linux' 카테고리의 다른 글

Samba  (0) 2019.05.12
Ubuntu instaillation  (0) 2019.05.12
PiVPN installation  (0) 2019.05.10
Agenti - web admin  (0) 2019.05.03
Wifi password setting/change  (0) 2019.02.07
라즈베리파이 블루투스 활용  (0) 2019.02.07
라즈베리파이 Servo motor SG90  (0) 2019.02.07
WAVESHARE e-paper display  (0) 2019.02.07