Miflora broken after upgrading to 0.97

On Hassio, where on earth can I find these two files?!

Hi!
go to shell:

updatedb
locate miflora/manifest.json

Regards,
Heinrich

Do I need access to the host? I am on Hassio and seeing this error:

core-ssh:~# updatedb

-bash: updatedb: command not found

core-ssh:~# locate miflora/manifest.json

-bash: locate: command not found

core-ssh:~#

I have the same problem. Where do I find the file? I am running Hassio on a normal Pi.

For example I see the following path (from a different error):

  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 292, in _async_add_entity
    await entity.async_device_update(warning=False)

But get no result if I search in the shell for:


find / -name "entity_platform.py"

So, got myself a generic ESP32 board (no case, but such is lifeā€¦maybe the LCD and case were contributing to the antenna issues mentioned above) and it works great!

For some reason itā€™s not getting the battery info from the Miflora, but otherwise there are no issues, the updates for all the other sensors are frequent and Iā€™ve even added a couple of Xiaomi Mijia humidity+temperature sensors and they report everything fine, including the battery.

The conclusion for me at the moment (especially given similar complaints that Iā€™ve seen about BT with the Xiaomi Mijia HA component) is that BT (or at least BLE) is pretty much broken in HA, but that as long as the BT info is forwarded by something else, it works perfectly.

Glad youā€™ve had some success with this. Would you mind sharing which ESP32 board you opted for?

I think Iā€™ve read in a few other places that the battery sensor using this setup is unreliable, but Iā€™d be prepared to deal with having one sensor partially-broken than not be able to read from them at all!

I agree with your comments around BLE on HA. BT has been rock-solid for me, and using the MiFlora component on its own was OK for the most part, but adding in BLE trackers just seem to break everything. Itā€™s a shame, as itā€™s the only part of my whole setup that is causing me issues.

In which release will this fix be included? or where can i find this information?

It was basically this one, so I guess a NodeMCU clone: https://www.amazon.com/HiLetgo-ESP-WROOM-32-Development-Microcontroller-Integrated/dp/B0718T232Z

So yeah, 36 hours later and (battery-sensor aside) all is great , this will be my long-term solution for getting BT sensor info :slight_smile:

The Mijia temperature & humidity sensors are actually pretty great versus the ZWave sensors I replaced, because I can see the info physically on the wall at all times, they have a bloody MAC address and they will never become ā€œunpairedā€ or some other such ridiculous ZWave stuff.

Sounds good. Thanks for the link; Iā€™ll give that a try. Hopefully you get some battery levels soon!

Donā€™t think you ever gonna get battery infoā€¦ When running miflora plugin on nuc/rasberry you are setting up a connection to the miflora sensor and ask for the values.
When you are using a ESP trough esphome, you are only listening to ble broadcasts from the miflora sensor. It does not broadcast any battery information.
If battery status are important it is possible to make a custom firmware for your ESP that connects to the miflora sensor at a set interval, then sends it out to a mqtt broker. I donā€™t have the source for my ESP anymore but i used something I found online with only som light tweaking.

I did some testing and the issue seems to be related to the bluepy library. It needs a helper to get access to the Bluetooth devices (bluepy-helper) and eventually it will do a popen() to that binary that will just hang. The miflora module will get stuck until you restart hass.

Iā€™m not very good at Python but I looked for a timeout option for popen() and it doesnā€™t seem to be one. The best option would be to use a better Bluetooth library, but I donā€™t know if thereā€™s any. Another option would be to write a standalone poller that writes to MQTT or something. Iā€™ll try to work on that this week.

Iā€™m using this for now: https://github.com/ThomDietrich/miflora-mqtt-daemon

Hey @hadeshimself, how is using miflora-mqtt-daemon working out for you? Is it still working flawlessly?

Hey. I wasnā€™t using it anymore. I had to switch to an ESPhome setup because my RPi was too far away from the MiFlora device. ESPhome works perfectly!

2 Likes

Thanks! :slight_smile: Will check it out.