suta-ble-bed


Namesuta-ble-bed JSON
Version 0.3.3 PyPI version JSON
download
home_pagehttps://github.com/sredman/suta_ble_bed
SummaryHandle BLE communications for a SUTA bed frame such as the i500 or i800.
upload_time2023-07-25 02:21:39
maintainer
docs_urlNone
authorSimon Redman
requires_python>=3.6
licenseMIT license
keywords suta sleepmotion i500 i900 i200
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ============
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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/sredman/suta_ble_bed",
    "name": "suta-ble-bed",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "SUTA,sleepmotion,i500,i900,i200",
    "author": "Simon Redman",
    "author_email": "simon@ergotech.com",
    "download_url": "https://files.pythonhosted.org/packages/b9/5a/6869a2e3bf394fca2b21ff287de96c70bd0ab9be2dfcad9cdfbb4e956e45/suta_ble_bed-0.3.3.tar.gz",
    "platform": null,
    "description": "============\nSUTA BLE Bed\n============\n\n\n.. image:: https://img.shields.io/pypi/v/suta_ble_bed.svg\n        :target: https://pypi.python.org/pypi/suta_ble_bed\n\n.. image:: https://img.shields.io/travis/sredman/suta_ble_bed.svg\n        :target: https://travis-ci.com/sredman/suta_ble_bed\n\n.. image:: https://readthedocs.org/projects/suta-ble-bed/badge/?version=latest\n        :target: https://suta-ble-bed.readthedocs.io/en/latest/?version=latest\n        :alt: Documentation Status\n\n.. image:: https://pyup.io/repos/github/sredman/suta_ble_bed/shield.svg\n     :target: https://pyup.io/repos/github/sredman/suta_ble_bed/\n     :alt: Updates\n\nBLE handling code for bed frames which use the SUTA app,\nsuch as the such as the i500 or i800 (and others)\n\nSupports control of the bed but not access to the current state.\nExpected to be used as a module to build your own integration with some\ncontrol system, but ships with a rough CLI to play with directly.\n\nDoes device discovery by name because (as far as I could tell) the bed\ndoes not support discovery by the typical manufacturer UUID.\n\nNotionally, this should be fine unless your neighbor is actively trying\nto intercept your bed control.\n\n\n* Free software: MIT license\n* Documentation: https://suta-ble-bed.readthedocs.io.\n\n\nFeatures\n--------\n\n* TODO\n\nUsage\n--------\n\n.. code-block:: python\n\n    async with SutaBleBedController() as controller:\n      async for bed in controller.devices():\n        await bed.raise_feet()\n        break\n\nNote that the `async for` will return a result each time the advertising data changes,\nwhich includes any time the signal strength changes.\n\nor\n\n.. code-block:: sh\n\n   python -m suta_ble_bed --MAC=AA:BB:CC:DD:EE:FF head-down\n\nCredits\n-------\n\nThis module would not have been possible without the research done by stevendodd on Github:\nhttps://github.com/stevendodd/sleepmotion-ble/blob/main/pi-zero/sleepmotion-ble.py\n\nInspired by:\nhttps://github.com/sopelj/python-ember-mug/blob/main/ember_mug/mug.py\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n\n=======\nHistory\n=======\n\n0.3.3 (2023-07-24)\n------------------\n* Added release pipeline\n\n0.3.2 (2023-04-10)\n------------------\n* Fix disconnect callback\n* Correct comment on BLE characteristics\n\n0.3.1 (2023-03-23)\n------------------\n* Fix connection handling with Controller interface\n* Fix CLI in case MAC is not provided\n* Pass correct parameter when constructing SutaBleBed under callback\n\n0.3.0 (2023-03-23)\n-------------------\n\n* Change to Controller interface\n* Fix copy-paste errors\n* Add \"is_connected\" helper\n\n0.2.0 (2023-03-21)\n------------------\n\n* Switch to Cookiecutter\n\n0.1.4 (2023-03-20)\n------------------\n\n* Finally correctly packaged with description\n\n0.1.3 (2023-03-08)\n------------------\n\n* Trying to get packaging correct\n\n0.1.2 (2023-03-08)\n------------------\n\n* Trying to get packaging correct\n\n0.1.1 (2023-03-05)\n------------------\n\n* Trying to get packaging correct\n\n0.1 (2023-03-05)\n----------------\n\n* First release on PyPI.\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "Handle BLE communications for a SUTA bed frame such as the i500 or i800.",
    "version": "0.3.3",
    "project_urls": {
        "Homepage": "https://github.com/sredman/suta_ble_bed"
    },
    "split_keywords": [
        "suta",
        "sleepmotion",
        "i500",
        "i900",
        "i200"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fa4ed8d2b0e54cdcbb59a1cd76094616ebdc041d2eada7556c2545e6b39f4d38",
                "md5": "f77d15a9dd9427521d6f15b35f8d5f5b",
                "sha256": "918c5342f91f3da424243bd2e3c7b55fc317b0637e73709c2d642664e017df31"
            },
            "downloads": -1,
            "filename": "suta_ble_bed-0.3.3-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f77d15a9dd9427521d6f15b35f8d5f5b",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.6",
            "size": 10139,
            "upload_time": "2023-07-25T02:21:38",
            "upload_time_iso_8601": "2023-07-25T02:21:38.041984Z",
            "url": "https://files.pythonhosted.org/packages/fa/4e/d8d2b0e54cdcbb59a1cd76094616ebdc041d2eada7556c2545e6b39f4d38/suta_ble_bed-0.3.3-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b95a6869a2e3bf394fca2b21ff287de96c70bd0ab9be2dfcad9cdfbb4e956e45",
                "md5": "d9e27c03bf2b6eb198afb374d9b19867",
                "sha256": "658bd3e78c4fb9505f211c47c5ed2b8dc96fca88e80d00bbca439fbbb217f481"
            },
            "downloads": -1,
            "filename": "suta_ble_bed-0.3.3.tar.gz",
            "has_sig": false,
            "md5_digest": "d9e27c03bf2b6eb198afb374d9b19867",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 14429,
            "upload_time": "2023-07-25T02:21:39",
            "upload_time_iso_8601": "2023-07-25T02:21:39.397449Z",
            "url": "https://files.pythonhosted.org/packages/b9/5a/6869a2e3bf394fca2b21ff287de96c70bd0ab9be2dfcad9cdfbb4e956e45/suta_ble_bed-0.3.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-25 02:21:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sredman",
    "github_project": "suta_ble_bed",
    "github_not_found": true,
    "lcname": "suta-ble-bed"
}
        
Elapsed time: 0.09406s