Skip to main content

miblepy · PyPI Docker Image Size (latest by date) DeepSource

miblepy fetches data from various (Xiaomi/Mijia/Mi) Bluetooth LE devices and push it to a MQTT broker. For every device supported, there are already libraries or anything else to fetch the data from - and they work perfectly. But as they are separated and often run as distinct (cron)jobs, which are not aware of each other, or even as daemons... the fight for the BLE interface starts...

miblepy solves this by acting as a "coordinator" to fetch the data in a controlled, sequential way.

Currently this is a private project tailored to my needs - but open for PRs

Usage

miblepy is available as pip package and Docker image.

Install

via pip

pip install miblepy

manual

  • clone this repo & cd to it

    git clone https://github.com/benleb/miblepy.git && cd miblepy
    
  • install via

    • poetry

      poetry install
      
    • pip

      pip install .
      

Configuration

Copy mible.toml to ~/.mible.toml and adjust settings to your needs. ~/.mible.toml is the default location where mible expects your configuration. You can change this via --config.

Run

Start a single round of fetching from your configured sensors in ~/.mible.toml

mible fetch

try mible --help to get more info.

To continously fetch data from your sensors check out the systemd timer and service. You can also use a classic cronjob or even an automation provided by your smart home system (home assistant for example)

Docker

The :latest tag is built from master, other tags can be found on Docker Hub

Mount your miblepy config to /miblepy/mible.toml

docker run --privileged --volume "mible.toml:/miblepy/mible.toml:ro" benleb/miblepy

Supported devices

  • VegTrug / Mi Flora plant sensors (Flower Care)
  • (Xiaomi?) Mijia Bluetooth Temperature Humidity sensors with LCD (LYWSD03MMC)
  • (Xiaomi?) Mi Body Composition Scale 2 (XMTZC05HM / XMTZC02HM)

Support a new device

  • TODO

Check the already available plugins to see some examples.

Thanks to

Metadata

Release files for miblepy 0.4.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for miblepy 0.4.6
File Size Uploaded Provenance Actions
miblepy-0.4.6.tar.gz 17.1 kB Without provenance Details for miblepy-0.4.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for miblepy 0.4.6
File Interpreter ABI Platform Actions
miblepy-0.4.6-py3-none-any.whl Python 3 none any Details for miblepy-0.4.6-py3-none-any.whl

Total release size: 34.9 kB

Release files / miblepy-0.4.6.tar.gz

Download URL miblepy-0.4.6.tar.gz
Size 17.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6e0f5841cab2338523b0018d1816f1447ee7cbfcfee9f679538e666b2b1e04ec
BLAKE2b-256 checksum
How to use checksums
fb8c1d54261364d5b3bb50dc059ab44e4a229e45e53afe7425714ff51e56e0e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via DepHell/0.8.3

Release files / miblepy-0.4.6-py3-none-any.whl

Download URL miblepy-0.4.6-py3-none-any.whl
Size 17.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c56edcc43f345325cfdb1be38b99890f3ce851d7c4e853c344af4ed09ecf7da5
BLAKE2b-256 checksum
How to use checksums
732fd1ff9bb8d50a90bb00651f836b4fc8a8dc0d515373351caec9c58dc65a9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via DepHell/0.8.3

Security for miblepy 0.4.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page