basnijholt / miflora

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

Support for Xiaomi Ropot #110

Closed frittes closed 4 years ago

frittes commented 6 years ago

It would be nice to have support for Xiaomi Ropot.

ChristianKuehnel commented 6 years ago

Any case anyone wonders: This is a flower pot with integrated sensor: https://de.aliexpress.com/item/Original-Xiaomi-Mijia-Smart-Flower-Pot-Flora-Ropot-Monitor-Waterproof-Intelligent-Detection-Pots-Plants-Grass-Soil/32818376348.html

@frittes Did you find any reverse-engineering on the web for this? We need someone with such a device to figure how to read the data from it...

tpaulin commented 6 years ago

Hi,

According to this project:

https://github.com/WeeJeWel/com.mi.flora/blob/master/drivers/ropot/device.js https://github.com/WeeJeWel/com.mi.flora/blob/master/drivers/flora/device.js

the data is stored in almost the same way and in the same location (excluding light intensity ofc.)

Only problem is that the Ropot seems to return 24 bytes versus the Flora's 16, so the current implementation raises an exception when checking the length of _cache - line 138 in the poller - as well when unpacking the data during parsing. Trimming the cache seems to work fine, however, not sure if anything relevant is stored there.

chrostek commented 6 years ago

https://github.com/open-homeautomation/miflora/pull/111

ChristianKuehnel commented 4 years ago

implemented with #111