bt

bluetooth scripts

How BLE works

http://www.blesstags.eu/2018/08/services-characteristics-descriptors.html

A BLE device has services, characteristics, and descriptors in the following tree structure:

    graph LR 
    A[BLE Device] --> S1[Service]
    A --> S2[Service]

    S1 --> C1[Characteristic]
    C1 --> D1[Descriptor]
    C1 --> D2[Descriptor]


    S1 --> C2[Characteristic]

    S2 --> C3[Characteristic]
    C3 --> D3[Descriptor]

    S2 --> C4[Characteristic]

The behavior of a BLE device is given by the different Services that encapsulate different parts of this behavior

Mainly, a service is a container for different data items – these data items are called are called Characteristics.

A Characteristic is a data item that can be either: * read (e.g. a sensor value, battery level, etc.) * or written (e.g. a configuration value, etc.).

Descriptor - ?

Aranet4 BLE services


source

AranetScanner

 AranetScanner ()

Initialize self. See help(type(self)) for accurate signature.


source

AranetDevice

 AranetDevice (address:str, name:str)

Publishing Aranet4 data to mqtt

    graph LR 
    PY[Python] --> MQTT[MQTT]
    MQTT --> HA[Home Assistant]
    MQTT --> G[Grafana]