Thanks so much for your work reverse engineering the database AnderssonPeter …
I managed to rip and dump the database and its images using a quick python script. It’s up on GitHub now, hopefully it’s of some use to this community and helps see that sensor really achieve its potential
I would like to try and do something with this. I don’t really know how it would be best implemented. Anyone have any ideas? I was thinking maybe adding a config option for the plant sensor that would be “plant type” and if used it would automatically get all the info on max and min moisture etc from the db. But I don’t know how to best present the different plants to choose from… Would one also like to add an entity image from the images in the db?
I recon it would be best in the plant sensor and then an attribute in the sensor would be plant type (as a drop down) with a catch for for plants that don’t exist or for customised options. You should then be able to to customise image (default being from db), plant name (for UI) etc
I will be happy to help test from a use case basis but no idea how to integrate into HA
Awesome! Some plant names are off tho, like Aeschynanthus pulcher but that’s a data issue which displays wrong image and wrong plant. I guess the database file/images I used was wrong but I found the right parameters
It looks so good that I wanna go and grab more of these Mi Flora sensors!
Nice to see you’re looking into this . Some thoughts on this topic:
I don’t think its a good idea to use Xiaomi API directly because this might break in the future. On the other hand it’s not suitable to ship 4500 plant images (~450MB) with the default homeassistant installation. The data.js file is rather small in size and could be shipped with the default installation. So maybe we should look at the min/max data without the images and provide the images ourselves?
The scraped data and Images are lacking many plants. I for example am a passionate chili grower with 10+ types of chili at home but not a single chili plant is in the Xiaomi database.
I’d like to see the database growing for everybody not just for each individual adding their plants, pictures and corresponding min/max values but without an editable open database like my initial idea of a collaborative google doc this is not possible. Anyone has an idea how this could be solved?
My two cents, let people get the picture on their own and put it on the www folder.
They can get exactly the picture they like or even the real picture of their plant and you save yourself the hassle of dealing with the pictures, getting the right ones and having 450MB of useless data for people to only use a like 3-5 pictures out of 4500…
I use a custom component called “Average Temperature” With this, you are able to add multiple sensors to create a single sensor which averages out the values of all of the defined sensors… I use this for thermostats where it is better to get the reading from multiple temp points to get a better ave room temperature… There is however no reason why you cannot do this for other sensors, as long as the units that are being measured are the same… Ave Temp Custom Component