Passive BLE Monitor integration (Xiaomi Mijia BLE MiBeacon monitor)

not working for me

Describe your problem, what have you tried? Errors, configuration, versions, firmware, iOS/Android, hardware running…

This isn’t helping you or us to help you at all.

I MADE every step from the pdf… last hassio firmware, last LYWSD03MMC sensor firmare, zone china. Android phone, pi3b+

  • platform: mitemp_bt
    rounding: True
    decimals: 2
    period: 60
    log_spikes: False
    use_median: False
    active_scan: False
    hci_interface: 0
    batt_entities: False
    encryptors:
    “XX:XX:XX:XX:XX:XX”: “XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX”Preformatted text
    report_unknown: False

How long have you waited before expecting results? Any errors in the logs?

i was waiting about an hour, no errors in the log

You installed HACS? Did you grab the custom compentent beta version 0.7.1-beta?

I think you should try slimming down your config entry

sensor:
  - platform: mitemp_bt
    encryptors:
        'A4:C1:38:XX:XX:XX': 'fe6f196888eXXXXXXXXX1562f7820fc5'

Double check you got the bindkey from the pairings.txt and confirm you have not readded the device since getting that key, it changes when you add it again.

i have HACS instaled and beta version of mitemp_bt, the bindkey is correct. i will slim my config and wait a little bit

Alright. Let’s hope that works then, I personally only use this slimmed down version of the configuration. I am just sharing what worked for me and the things I discovered whilst being in the Russian Telegram group and from the different threads.

i understand you perfectly

How did it work it out for you?

in my case is still not working

@TychoWerner Nicely done, in-fact, very nicely done - my compliments :smiley:

Thanks Seth @amitseth , did you follow my guide with actual hardware? If so, any hickups you had whilst doing it? Thanks for the kind words.

1 Like

Getting an exception on upgrading to 112.3

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/mitemp_bt/sensor.py", line 775, in update_ble
    discover_ble_devices(config, aeskeys, whitelist)
  File "/config/custom_components/mitemp_bt/sensor.py", line 683, in discover_ble_devices
    sensors[t_i], mac, config, temp_m_data[mac]
  File "/config/custom_components/mitemp_bt/sensor.py", line 499, in calc_update_state
    entity_to_update.schedule_update_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 416, in schedule_update_ha_state
    assert self.hass is not None
AssertionError

Only getting one of the sensors reporting (not always the same one)

image

Issue https://github.com/custom-components/sensor.mitemp_bt/issues/93

[edit]
I have dropped some temporary code into the Issue that has fixed it for me. No guarantees of course!

Maybe you should have taken five minutes time to actually read in this thread and in the github issues… :wink:

That would have shown, the error is already noted (here and here), and there is already a fix in the development version (here):

And the issue on github is double as well…

So, yeah, good work in finding an already known and solved error. :slight_smile:

Well a bit more than that. I do monitor both thread and GitHub and hadn’t seen anything.

Might have found it but it isn’t solved else I wouldn’t have had the issue.

[edit] No reference to a PR or commit anywhere that I can see that fixes it - probably an obscure reference to the cause.

It’s not an “obscure reference” to advise the use of a development or beta-version… :laughing: :laughing:

If you would take a closer look to the thread at github, this one (linked above), you could read in this post, that the issue is solved in the beta version of the component, you can find here. :wink:

If installed with HACS, remove the component, restart HA and install the component back, this time checking the button for beta version. :slight_smile:

See also the post of @Magalex. He is on a business trip, so we have to be a little patient till he is back. In the meantime, you can use the beta version by reinstalling the component and selecting the beta 0.7.1.

1 Like

I did, there is no reference to a commit that will fix it AFAICS other than ‘use beta’ and looking at that it is hardly a patch rather a refactoring of the code. The Issue subject does not immediately draw me to it as being the issue I had seen. I’m also not one to run ‘Beta’ code - I’d rather a quick patch to fix the issue on the existing release even if it is suboptimal.

I do appreciate the component - it works really well, appreciate it is done as a hobby and appreciate the effort put into it and so I do not have any real expectations other than once it is working, I’d like it not to break. I also realise that the manner of the HA development makes that difficult for the component maintainers.

I still maintain it isn’t clear the problem has been identified and fixed, I’ve had ‘thanks’ on the issue I raised which sort of demonstrates that. Still, it is working now with my patch and I’ll wait for the new release, wait for the first patch release, then think about updating it. YMMV.

Exception has been fixed in 0.6.9 - many thanks :slight_smile: