Metadata-Version: 2.1
Name: suta-ble-bed
Version: 0.3.3
Summary: Handle BLE communications for a SUTA bed frame such as the i500 or i800.
Home-page: https://github.com/sredman/suta_ble_bed
Author: Simon Redman
Author-email: simon@ergotech.com
License: MIT license
Keywords: SUTA,sleepmotion,i500,i900,i200
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Requires-Python: >=3.6
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: bleak (>=0.19.5)
Requires-Dist: bleak-retry-connector (>=3.0.0)

============
SUTA BLE Bed
============


.. image:: https://img.shields.io/pypi/v/suta_ble_bed.svg
        :target: https://pypi.python.org/pypi/suta_ble_bed

.. image:: https://img.shields.io/travis/sredman/suta_ble_bed.svg
        :target: https://travis-ci.com/sredman/suta_ble_bed

.. image:: https://readthedocs.org/projects/suta-ble-bed/badge/?version=latest
        :target: https://suta-ble-bed.readthedocs.io/en/latest/?version=latest
        :alt: Documentation Status

.. image:: https://pyup.io/repos/github/sredman/suta_ble_bed/shield.svg
     :target: https://pyup.io/repos/github/sredman/suta_ble_bed/
     :alt: Updates

BLE handling code for bed frames which use the SUTA app,
such as the such as the i500 or i800 (and others)

Supports control of the bed but not access to the current state.
Expected to be used as a module to build your own integration with some
control system, but ships with a rough CLI to play with directly.

Does device discovery by name because (as far as I could tell) the bed
does not support discovery by the typical manufacturer UUID.

Notionally, this should be fine unless your neighbor is actively trying
to intercept your bed control.


* Free software: MIT license
* Documentation: https://suta-ble-bed.readthedocs.io.


Features
--------

* TODO

Usage
--------

.. code-block:: python

    async with SutaBleBedController() as controller:
      async for bed in controller.devices():
        await bed.raise_feet()
        break

Note that the `async for` will return a result each time the advertising data changes,
which includes any time the signal strength changes.

or

.. code-block:: sh

   python -m suta_ble_bed --MAC=AA:BB:CC:DD:EE:FF head-down

Credits
-------

This module would not have been possible without the research done by stevendodd on Github:
https://github.com/stevendodd/sleepmotion-ble/blob/main/pi-zero/sleepmotion-ble.py

Inspired by:
https://github.com/sopelj/python-ember-mug/blob/main/ember_mug/mug.py

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage


=======
History
=======

0.3.3 (2023-07-24)
------------------
* Added release pipeline

0.3.2 (2023-04-10)
------------------
* Fix disconnect callback
* Correct comment on BLE characteristics

0.3.1 (2023-03-23)
------------------
* Fix connection handling with Controller interface
* Fix CLI in case MAC is not provided
* Pass correct parameter when constructing SutaBleBed under callback

0.3.0 (2023-03-23)
-------------------

* Change to Controller interface
* Fix copy-paste errors
* Add "is_connected" helper

0.2.0 (2023-03-21)
------------------

* Switch to Cookiecutter

0.1.4 (2023-03-20)
------------------

* Finally correctly packaged with description

0.1.3 (2023-03-08)
------------------

* Trying to get packaging correct

0.1.2 (2023-03-08)
------------------

* Trying to get packaging correct

0.1.1 (2023-03-05)
------------------

* Trying to get packaging correct

0.1 (2023-03-05)
----------------

* First release on PyPI.
