I just tested your code with my Xiaomi Temperature and Humidity sensor.
The first time I ran this script, I got the error "argument mac: The MAC address "58:2d:34:31:9a:b8" seems to be in the wrong format"
But when I uncomment this line, I just got the right data. I don't know why there is a check on the "4c:65:A8:...." range, but the "58:2d:34..." range works just fine too.
I changed the "raise exception..." to a regular "print ..." and got the following output:
./demo.py --backend bluepy poll 58:2d:34:31:9a:b8The MAC address "58:2d:34:31:9a:b8" seems to be in the wrong formatGetting data from Mi Temperature and Humidity SensorFW: 00.00.66Name: MJ_HT_V1Battery: 100Temperature: 20.0Humidity: 54.0
Hi,
I just tested your code with my Xiaomi Temperature and Humidity sensor. The first time I ran this script, I got the error "argument mac: The MAC address "58:2d:34:31:9a:b8" seems to be in the wrong format" But when I uncomment this line, I just got the right data. I don't know why there is a check on the "4c:65:A8:...." range, but the "58:2d:34..." range works just fine too.
I changed the "raise exception..." to a regular "print ..." and got the following output:
./demo.py --backend bluepy poll 58:2d:34:31:9a:b8
The MAC address "58:2d:34:31:9a:b8" seems to be in the wrong format
Getting data from Mi Temperature and Humidity Sensor
FW: 00.00.66
Name: MJ_HT_V1
Battery: 100
Temperature: 20.0
Humidity: 54.0