Feature request: Access to parsed BTHome packets in scripts

  • I have a gen3 gateway. I have configured a couple of different BTHome devices, by providing the mac, their type and the encryption key.

    On the diagnostics screen I can see that from those devices, BTHome packets are received and parsed, I see logs like:

    Code
      [...]
    shelly_bthome_devic:824 BTHomeData(7c:c6:b6:76:58:ce): v 2 enc 1 '000301642E253A0145F600' [packet_id:0=3 battery:0=100.000000 humidity:0=37.000000 button:0=1 temperature:0=24.600000]
      [...]
    shelly_bthome_devic:824 BTHomeData(f8:44:77:2d:e1:5d): v 2 enc 0 '0020016445A00045FF00540116' [packet_id:0=32 battery:0=100.000000 temperature:0=16.000000 temperature:1=25.500000 raw:0=16]
      [...]

    I would like to be able to react on those events in scripts and receive the whole parsed BTHome packet. I want to forward all those parsed BTHome packets to a different system as they come in. From what I gathered, there is no way to do this -- yet.

    ----

    I know I could spawn my own BLE scanner to receive those packets, but then I'd need to

    • parse the package myself
    • handle encryption myself (not sure if the AES APIs are even capable of doing so)

    I also know, that I could use a status handler. However there I get only "partial" updates, and would need to cache other parts of the same bthome device and its bthome sensors, use the BTHomeDevice/BTHomeSensor APIs to "reconstruct" the full BTHome packet again, and then send it out to the external system.

    Considering the package has been parsed already and all the info is there, I wonder if it'd be possible to expose that information to scripts.

    Einmal editiert, zuletzt von hoegaarden (12. Mai 2025 um 17:51)