basnijholt / miflora

☘️🌑🌼πŸ₯€πŸ‘ Mi Flora Plant sensor Python package
MIT License
366 stars 98 forks source link

I'm thinking if you can write another one supporting for the Mi BLE Temperature and Humidity Sensor #82

Closed datoutie closed 6 years ago

datoutie commented 6 years ago

website: https://www.mi.com/mj-humiture/ Thanks.

ChristianKuehnel commented 6 years ago

I haven't seen one of those sensors, yet. But I guess if there is an app, we can probably also reverse engineer the protocol. If you can send me such a sensor I'll give it a try.

fanthos commented 6 years ago

I had some research on the sensor. Using OpenMQTTGateway on my ESP32, and found that the new sensor using the same tech with flora sensor, but different data format.

5020aa01a4c5f0d0a8654c0d10040001b900
5020aa01b4c5f0d0a8654c0d10040301ba00
--------+s+++++++++++m+x--+l+++t+++h
s: Serial
m: BT Address
x: 0d
l: Length, 04
t: Temprature
h: Humidity

Temprature and Humidity are big endian.

I also have some x = 04 and 06, don't know what it meaning.

ChristianKuehnel commented 6 years ago

I think it does not make sense to add this to the miflora library, as it's a different protocol and a different device.

What might make sense is to share the BluetoothBackend wrappers, as you might also need that for this sensor...

sandrisj commented 6 years ago

You can use esp32 for this particular device. See here: https://www.youtube.com/watch?v=gyZjGOgDIRU