Integrate Bluetooth battery monitoring devices (cars, motorbikes etc.)

No, all fine, and it looks like it really is only the name which differentiates your BM2 version from all the others. That is if your battery is at 100% :wink:

Will you be able to still try out a test build in about 90 minutes tonight?

Just asking as all potential test builds would be overwritten again by the nightly development builds later tonight, so if you cannot install a test build later tonight it might be better to build one for you tomorrow during the day.

The test build will also include the voltage, which is fetched by connection.

Great to hear :slight_smile:

  1. No, I won’t manage to test it today. Probably tomorrow (Friday), very likely on Saturday. Hope that helps to avoid unnecessarily redundant work.
  2. Great to have the voltage. Looking for percentage + voltage :slight_smile:
  3. Few other questions based on first experiences with OMG (needless to say: awesome platform, will probably solve a few other use-cases for me):
    3.a) My MiBand (Xiaomi Smart Band) was discovered (somehow, suddenly, even it should not expose itself and even BT proxy could not find it - plus 1 for OMG :+1: ), so I have tracker, activity/bpm and steps sensors. While all of them are unknown or not_home currently, I noticed that for the device_tracker entity the source_type attribute in HA is set wrong: it is gps while it should be bluetooth_le. Unfortunately it seems you need to fix that somehow in OMG, I can’t “overwrite” this using customize.yaml :frowning:
    3.b) When I disable and re-enable the BT: Publish HASS presence switch, the entities BT: Interval between active scans, BT: Interval between scans and BT: Presence detection timer always return to a default value (my custom set values are overwritten/forgotten). E. g. if I got right how this presence detection works, I don’t want to constantly search (equals the default 0 seconds) so I set it to 60 seconds.

No major work, and I started a test build anyway, which would be available in about 60 minutes now. But if you can’t install it then best to give us a shout here if you can do it Friday or Saturday, so we can start another test build then.

Your Mi Band (which version may I ask?) is being discovered, but the activity heart rate and steps will only have values if these options are activated in the settings for the Mi Band in the Zepp life app.

image

I’ll have to refer this one to a colleague …

Could you try and set Adaptive Scanning to false in the OpenMQTTGateway settings and see if the behaviour is then still the same, as Adaptive Scanning sets some defaults depending on the devices discovered in your vicinity, but for manually setting the the values Adaptive Scanning should be turned off - something which we could possibly automate when these settings are touched :wink:

I’ll do so (likely on Saturday).

It’s a Xiaomi Smart Band 7 series. Not discoverable and activity heart rate not shared. That’s why I’m a bit confused how OMG could see and catch it at all :slight_smile: But that’s one of my use-cases: I want to use it for presence detection, if no negative impact on battery life and privacy (no continual exposure).
Update: steps are never received. There’s also no setting in the Xiaomi app, only for discovery and bpm.

:+1:

That happens automatically once I enable the HASS presence switch. Now I have the HASS presence switch activated and re-activated the adaptive scan switch. This way I only get the presence detection timer entity and it seems I don’t need to care about the scan intervals. Will check how frequently it will be. Anyway I’d expect to have my custom set values stored and restored once I re-enable the HASS presence switch.

Last question: what does the BT: Publish only sensors switch do? :slight_smile:

Perfect then, that’s why it is still being discovered, even if activity heart rate and steps are not shared and being kept private, but presence detection is still wanted. There is only a very slight impact on the battery life, as the Mi Band requires active scanning, this can be further reduced by setting BT: Interval between active scans to a higher interval, which is still fine for your presence detection though. Privacy wise it is with any other device/tracker with a static Bluetooth MAC address - anyone else can track your MAC id just the same as you use for your own presence detection, and yes, some shops do this to log returning customers. This is also one of the reason why these days modern mobile phone OSs have the phones only transmit a random MAC ID.

1 Like

Let me correct myself here. Active scanning is only required for getting the steps off the Mi Band, which for the Mi Band 7 is not even currently possible from other users’ testing so far.

As the BM2 Battery Monitor will also require active scanning you can set BT: Interval between active scans to any even higher interval which is still fine for the BM2 but will affect the battery of the Mi Band even less.

Only the passive scanning BT: Interval between scans will affect the presence detection.

@e-raser

FYI, the test build has finished and will be available for a few more hours at

https://docs.openmqttgateway.com/dev/upload/web-install.html

with SHA:d73e3c, in case you still want to give it a try with the esp32dev-ble build.

But either tonight or on Saturday, you want to unselect Erase Flash soo that you don’t have to go through the initial WiFi and MQTT setup again.

And you also should double check in Auto-Discovery is still enabled in the OpenMQTTGateway HA settings, to now discover your rebranded BM2, as this usually turns itself off after the initial 30 minutes to avoid auto-discovering unwanted devices just passing by or in the neighbourhood.

Could we take this into a separate topic or maybe in OMG forum:

1 Like

Yes of course, let’s continue focusing on the BM2 in this topic. I also actively stopped answering (your) questions regarding the Theengs app and the Mi scale (back in April I think). I want to use stationary sensor detectors, not my smartphone. But buying the app was a little support at least.

It’s just that today I finally discovered how capable and huge OMG is. Pretty amazing so far. Of course having it in ESPHome would be great but seeing where it comes from, the supported hardware and automation platforms etc. … it simply has a much broader approach.

@DigiH: I‘m away from the ESP/OMG already so as expected can’t manage to test this today. Just to make sure, reading your instructions: I need the web installer (so plug the ESP to my computer once again), the firmware update feature right from OMGs web interface won‘t work?

1 Like

No worries, just let us know when will be good to start another run of the BM2 test build.

And yes, the test build firmware update should also be possible through the WebUI, by specifying the URL, but I have never actually done or tested it before myself, as I always run my custom environment builds. I suppose we will know for sure on Saturday :wink:

Until then.

Just as an update for all.

I have worked with @e-raser privately to include the German, and one other rebranded, version of the BM2 battery Monitor to be correctly registered and decoded.

These changes will be available in the next OpenMQTTGateway release.

2 Likes

I just checked again after a few weeks and now I am not getting voltage, just the battery level. We should still be able to get voltage from the BM2 right?
Did something change in the recent builds, mostly I can see ibeacons entries in MQTT Explorer?

Thanks for pointing this out @leewil1, there was a small model naming change with a recent decoder generalisation which prevented correct connections for the voltage in OpenMQTTGateway with the last development build. This has been fixed and should work again nicely with the development branch and subsequent dev binaries from in about 2 hours from now.

1 Like

Sadly the BM2’s range is not that great. I can’t get it working when the car is like 4-5 meter away.

1 Like

On my far too long ‘todo’ list is to have a look at this, bit spendy as you have to buy the receiver as well. However the 433Mhz range is intriguing if decodable .

https://www.amazon.com/dp/B0BZCK7L1H

Brilliant, updated to the latest and it’s now working again. Thank you for the quick response!!! :pray:t2:

2 Likes

Hello! I use esp32-m5atom-lite omg firmware for m5stack atom lite but it doesn’t support bm6
https://a.aliexpress.com/_EwNjlIf . Is it possible to implement bm6 support?

Android App BM6 working correctly, but home assistant with OMG don’t found this ble device.

home

▼OMG_ATOM_L

LWT = online

version = v1.6.0

▼BTtoMQTT

50547B24F7B0 = {“id”:“50:54:7B:24:F7:B0”,“mac_type”:0,“adv_type”:0,“name”:“BM6”,“manufacturerdata”:“ee017627cd6db2df636b4f31f0fe5d0f”,“rssi”:-49,“txpower”:0}

383B26BF1E50 = {“id”:“38:3B:26:BF:1E:50”,“mac_type”:0,“adv_type”:0,“name”:“BM6”,“manufacturerdata”:“3b31ca6051c41765e634c15d3f29c564”,“rssi”:-54,“txpower”:0}

50547B243010 = {“id”:“50:54:7B:24:30:10”,“mac_type”:0,“adv_type”:0,“name”:“BM6”,“manufacturerdata”:“4c0002153ba29cd9a42c894856badaf2606ef777114d0000cd”,“rssi”:-60,“txpower”:-51,“brand”:“GENERIC”,“model”:“iBeacon”,“model_id”:“IBEACON”,“type”:“BCON”,“mfid”:“4c00”,“uuid”:“3ba29cd9a42c894856badaf2606ef777”,“major”:4429,“minor”:0}

Hi @legion.ck

We’re not sure yet about the BM6, but it’s good to have some more data to see if and which encoded information might be included in the BM6 advertising broadcasts.

You have given plain manufacturerdata messages for two of your BM6 and one iBeacon format manufacturerdata.

All three BM6 should give both formats. It would be good to get these two formats for all three BM6, along with a battery level screenshot as you have given below.

Best to continue this discussion with additional data in this already closed issue thread, with already existing BM6/Battery Guard data