basnijholt / miflora

☘️🌡🌼🥀🏡 Mi Flora Plant sensor Python package
MIT License
362 stars 99 forks source link

Returned light value is different from what is shown in the official app #130

Open jakkik opened 5 years ago

jakkik commented 5 years ago

It seems that the light value that is returned by the sensor is lower than the value that is shown in the official app provided by the sensor's manufacturer. The problem is particularly evident in lower light conditions (< 2000 lx).

For example, the value returned by miflora could be ~200 lx, while the official app shows ~500 lx in the same lighting conditions.

At least this seems to be the case in my current setup. I have 13 sensors, both Chinese and international versions, and the issue applies to all of these sensors.

What i've found out while playing with these gadgets is that the light sensor seems to need a short while (have to do more tests find out the specific time) to give a stable reading, that corresponds to the one shown in the official app.

I've done some tests with this library as well as reading the data with Espressif's ESP32 μC. Both methods give (similar) values that are lower from the official app, if I just read the value straight after writing the magic bytes (0xa01f) to change the mode.

However, if I wait for a while (3 seconds seems to be enough, though lower values may work) between the mode change and reading the data, the value is similar to the value returned by the official app.

Has anyone else experienced this problem?

Issue #128 might be related to this.

ChristianKuehnel commented 4 years ago

To be honest, I do not really care about the exact numbers for the brightness. What I'm using is the maximum brightness during the day to judge if the plant is inthe right spot.

Why is this important to you?

What do you mean with "mode change"? Can you create a PR with the changes that work better?