Mi Flora battery life

Yes pretty much any 3v3 regulator is fine, the consumption is very low.
About the voltage, the main chip is rated 2.35 to 3.3v, see projects:xiaomi-flora [Warszawski Hackerspace] 31

Since they seem to have a clue, I also want to run my sensors on electricity as the battery life is prohibitive. The batteries don’t last more than 12-48 hours, no idea why, I’ve had expensive, cheap attempts. It’s the same everywhere. Could my scene work with it? I would remove the AA batteries and solder the wire directly into the battery compartment. The use is outdoors with waterproof box on the terrace.

Kcibyvx 10in1 5AA+5AAA Battery Power Supply Adapter Replace AA AAA Battery Eliminator: AmazonSmile: Elektronik & Foto

Because 3V needed, i think i have to use 2 cables,on one item?

Or you have any idea how i can do that with Power Supply? I have 7 sensors, and the Socket Distance from Terrace 4 Meters. So i have to use an long cable.

Thanks

You can but is a bit of an overkill, I just use a simple 3v3 converter from 220V and i worked all the flora to it.

1 Like

Out of curiosity, is this the only plant sensor available?

Any thoughts on/experiences with this kind of thing? Or similar?

If I understand correctly you hook up some solar panels and a 3.7V lipo (which it charges) and it delivers 3.3V.

Maybe you could run a few nearby Mi Flora off of it Obviously it would complicate the set-up and potentially introduce cables, but could be worth it for some set-ups.

AU $29.88 | Sunflower micro power high efficiency Solar Power Manager, 3.3V 90mA output with 2V 160mA Solar Panel for IoT Wireless Sensor

1 Like

@BrianAker shared some useful battery life tips and experience’s over here.

1 Like

Just stumbled upon the thread after exploring my mifloras battery life :man_facepalming:t2:
One thing which isn’t mentioned here, but which made a difference in my case: quality batteries.

I had one charge of cheap batteries, which lasted just weeks. Since then I am actively shopping “big brand” batteries, which last ~9-14 months.

3 Likes

So I just picked up flora sensors and the firmware I have isn’t broadcasting out battery life (alas) - but not the end of the world.

Shouldn’t it be possible, however, in esphome to use ble_client to directly connect to the device and pull down the battery reading maybe once a day?

Anybody tried this?

How long did you wait for the battery life transmission? It seems to only happen once every 24 hours here.

Yes. You can pull the battery information using ble_client from this component:

github://myhomeiot/esphome-components

I am using it for all my Mi Flora devices to get battery and firmware information every 6 hours like this:

external_components:
  - source: github://myhomeiot/esphome-components

myhomeiot_ble_host:

myhomeiot_ble_client:
  - mac_address: !secret ampel1_mac
    service_uuid: '1204'
    characteristic_uuid: '1A02'
    update_interval: 6h
    on_value:
      then:
        homeassistant.service:
          service: ble_monitor.parse_data
          data:
            packet: !lambda |-
              if (x.size() < 2)
              {
                ESP_LOGE("myhomeiot_ble_client", "payload has wrong size (%d)", x.size());
                return "";
              };
              ESP_LOGI("myhomeiot_ble_client", "Battery (%d%%), firmware (%s)", x[0], std::string(x.begin(), x.end()).substr(2).c_str());
              char buffer[70 + 1];
              const uint8_t *remote_bda = xthis.remote_bda();
              snprintf(buffer, sizeof(buffer), "043E2002010000%02X%02X%02X%02X%02X%02X14020106030295FE0C1695FE41209800000A1001%02X00",
                remote_bda[5], remote_bda[4], remote_bda[3], remote_bda[2], remote_bda[1], remote_bda[0], x[0]);
              id(ampel1_firmware).publish_state(std::string(x.begin(), x.end()).substr(2).c_str());
              id(ampel1_battery).publish_state(x[0]);
              return std::string(buffer).c_str();

sensor:
  - platform: template
    id: ampel1_battery
    name: Ampel1 Battery
    unit_of_measurement: "%"
    device_class: "battery"
    state_class: "measurement"
    accuracy_decimals: 0
    update_interval: 1h
    icon: mdi:battery-bluetooth

text_sensor:
  - platform: template
    id: ampel1_firmware
    name: Ampel1 Firmware
    update_interval: 1h
    entity_category: "diagnostic"
    icon: mdi:new-box
7 Likes

I’ve had it running for 2 days - are you saying with the most up to date firmware it should still gets sent out over BLE Passive?

Ah, I’m not using the latest firmware. Apologies.

It would work if i solder the battery clamps to the ground and 3v3 pins of an esp32 wouldnt it?

Quick update:
The original batteries in my two HHCC Flower Cares both died during the last 3 weeks. So they lasted for about 15 months in my setup with an ESPHome BLE bridge.

1 Like

I’ve recently added my first three MiFlora sensors.
I do have the same issue - battery state of charge dropped rapidly within the last couple days… the sensors have been installed a week ago - and now showing 49% SoC…

I’ve heard from others, that their sensors reporting 0% for nearly three months now… so I GUESS, the sensors just reporting their SoC wrongly.
I don’t know, if it is possible to report a bug for these devices - or if it’s possible to fix this within a Firmware update at all… but for anyone who wants to update the firmware, I recommend the “Flower Care App” … the current available firmware seems to be 3.3.6

1 Like

OK, an update about the “strange” Battery behave for MiFlora Sensors…

Here is the history of my three plant-sensors and their battery state over the period of March…
I would not expect an increasing of their battery state - but again, I guess, there’s an issue in the firmware.

The Battery state will probably be calculated out of the voltage of the battery.
And I do think, that this value might increase when the sensor will be hit by sunlight and warming up.
Therefore, the resistance is changing and the voltage information changes → then, the sensor will report a higher battery state …

Why do I beleive this?
→ the light blue device (bogenhanf) is placed on the floor, while the others are near a window and therefore will be hit when the sun is shining through the window and warming the sensors up.

3 Likes

Let me ask the question, do you really need to know the battery state every 6 hours?

Pulling the battery state is an expensive operation for the miflora sensor. It requires an active connection be made to the sensor, that is accomplished over multiple operations.

A Miflora will passively beacon their state down to about ~20% of the battery, sometimes even lower. The active connection required to obtain battery status requires a battery which is closer to 40%; the act of requesting the battery status will sometimes cause the miflora device to go offline/do-a-hard-restart.

I currently check the battery state every two weeks; a miflora sensor will run for months, the battery declines along a graceful curve.

My Mi Flora’s previously had great battery life but in recent months I’ve noticed them getting drained extremely fast. I previously used the ESPhome component to manage them but swapped over to having the ESP’s act purely as Bluetooth Proxies and letting HA manage the Mi Flora’s… It seems that the battery life took a dive after making this change.

Anyone else have the same situation?

How fast is “extremely fast”? I track my battery changes with Grocy and using the same setup as you (ESP proxies) and I get around 8-10 months between changes.

I have one which died in about 2 months, another which is reporting 41% after a month.