BTHome discussion topic

feature requests can always be submitted on github.

Sure, I can contact them, but please forward me the details who to contact, etc.

Iā€™ve DMā€™ed you the contact details for InPlay

Just saw that my user.log is filled up with this message. What does this mean? Nothing on Google:

WARNING (MainThread) [bthome_ble.parser] BTHome device is not sending object ids in numerical order (from low to high object id). This can cause issues with your BTHome receiver, payload: 3d8d6c0296084a0069

It means that the BTHome device is sending data in the wrong order, it should send data with object_ids sorted from low to high. Object_id is the byte that defines the measurement type, like temperature, humidity, etc.

1 Like

We have fixed the issue that previous events were repeated when sending an sensor update without event (e.g. the Shelly BLU button showed this behavior in beacon mode). This will be fixed in 2023.7.2.

bdraco also added support for events being reported in the logbook. This has been added in 2023.8.0

image

1 Like

In 2023.9 bdraco has fixed the problem that sleepy sensors (sensors that dont update regularly) are unavailable after a restart.

I see this error in my logs, how do I solve this?

BTHome data contains bytes that can't be decoded to a string (use UTF-8 encoding)

I use data type 53 (text) and the payload (hex values) comes from a BLE sht31 sensor. The data arrives in HA as UTF8, so donā€™t really understand what the error means.

It normally means that one of the bytes canā€™t be converted to text, can you show me the BLE advertisement?

[23:01:59][VV][esp32_ble_tracker:395]: Parse Result:
[23:01:59][VV][esp32_ble_tracker:412]:   Address: FF:FF:FF:FF:00:01 (RANDOM)
[23:01:59][VV][esp32_ble_tracker:414]:   RSSI: -41
[23:01:59][VV][esp32_ble_tracker:415]:   Name: ''
[23:01:59][VV][esp32_ble_tracker:423]:   Ad Flag: 6
[23:01:59][VV][esp32_ble_tracker:440]:   Service data:
[23:01:59][VV][esp32_ble_tracker:441]:     UUID: 0xFCD2
[23:01:59][VV][esp32_ble_tracker:442]:     Data: 40.09.6A.53.06.6D.61.1E.9E.A4.00 (11)
[23:01:59][VV][esp32_ble_tracker:445]: Adv data: 02.01.06.0E.16.D2.FC.40.09.6A.53.06.6D.61.1E.9E.A4.00 (18)
[23:01:59][D][ble_adv:038]: New BLE device
[23:01:59][D][ble_adv:039]:   address: FF:FF:FF:FF:00:01
[23:01:59][D][ble_adv:040]:   name: 
[23:01:59][D][ble_adv:041]:   Advertised service UUIDs:
[23:01:59][D][ble_adv:045]:   Advertised service data:
[23:01:59][D][ble_adv:047]:     - 0xFCD2: (length 11)
[23:01:59][D][ble_adv:049]:   Advertised manufacturer data:
[23:01:59][W][component:204]: Component esp32_ble_tracker took a long time for an operation (0.09 s).
[23:01:59][W][component:205]: Components should block for at most 20-30ms.
[23:01:59][V][esp32_ble:178]: (BLE) gap_event_handler - 3
[23:01:59][V][bluetooth_proxy:058]: Proxying 1 packets
[23:01:59][VV][api.service:345]: send_bluetooth_le_raw_advertisements_response: BluetoothLERawAdvertisementsResponse {
  advertisements: BluetoothLERawAdvertisement {
  address: 87202054127079
  rssi: -69
  address_type: 1
  data: '\x9f\xfe\x9f\xfe

So, your byte string is 066D611E9EA400. Try to convert that on a website, and you will see that it isnā€™t correct.

http://www.unit-conversion.info/texttools/hexadecimal/

What text did you try to send?

I have an issue where some devices are not being detected by the BT Home integration.

I have 4 of the LYWSD03MMC thermometers all flashed with ATC V4.3 firmware and configured at BT Home and all BT stuff is setup for passive. 3 of these devices are lass than 2 meters from the HA hardware and one is about 5 meters away.

On my main HA system on an old NUC I see all the devices in BT Home and Passive BLE Monitor.
ble-nonitor-main bt-home-main

On my test2 system I only see 3 devices in BT Home but still see all on them with Passive BLE Monitor.
ble-nonitor-test2 bt-home-test2

And on the new box that will be my new HA system I only see 2 devices in BT Home but again see all in Passive BLE Monitor.
ble-nonitor-test1 bt-home-test1

Any ideas how to get BT Home to recognize the missing devices ??

Did you enable the option to ā€œsend flagsā€ in the pvvx firmware settings? You can change this with in the online Telink flasher website.

Have just checked and all are set like this:

ATC V4.3
No smiley, show bat & clock
BTHome v1, AdFlags, 7500ms, 16 (=2Min)

@Patrick010 The text sensor is converting bytes to text in UTF8. So, it can convert 6d 76 ca 9f 6d to mvŹŸm, but it canā€™t convert 06 6D 61 1E 9E A4 00 (using a convertor gives me maļæ½ļæ½, where is a byte that canā€™t be converted).

The current implementation is a text sensor, not a raw sensor.

I guess you are looking for a real raw sensor, that converts 0x6d 0x76 0xca 0x9f 0x6d to 6d76ca9f6d? We can implement a raw sensor. It that what you are looking for?

@gaz99 I have no idea why they arenā€™t found, perhaps try to decrease the interval

Thats exactly what Iā€™m looking for :slight_smile:

Strange that the convertor gives you that result, because I also used Convert UTF8 to Hexadecimal ā€“ Online UTF8 Tools

Shall I do a feature request voor the Raw sensor?

This message is causing the errors in HA, not the mvŹŸm message.

But yes, please make an issue on github and I will add a raw sensor. It might take a little longer, as Iā€™m out to a conference next few days.

Got it.
Made the request on Github. Thanks!

Will try that but that doesnā€™t explain why it works on one box and not the others.

I think Iā€™ll just stick to the HACS BLE Monitor as that seems to work fine.

One other possibility, BLE monitor and the Bluetooth integration sometimes donā€™t work together, especially when one is using active scanning, while the other is using passive scanning. Are the two sensors that are recognized working properly?