suta-ble-bed


Namesuta-ble-bed JSON
Version 0.3.6 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_time2024-09-22 15:56:42
maintainerNone
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

Release Process
---------------

To tag and release the latest code:

.. code-block:: sh

   # Write release notes
   vim HISTORY.rst
   git add HISTORY.rst
   git commit -m "Release notes for vx.y.z"
   # Bump
   bump2version [patch,minor,major]
   # Assuming no errors ...
   git push --tags

Go to this repository in Github, make a new release using the UI.

The Github Action should then take care of publishing the release on Pypi.

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.6 (2024-09-22)
------------------
* Correct syntax of release notes

0.3.5 (2024-09-22)
------------------
* Correct silly typo in release process

0.3.4 (2024-09-22)
------------------
* Add more supported commands

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": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "SUTA, sleepmotion, i500, i900, i200",
    "author": "Simon Redman",
    "author_email": "simon@ergotech.com",
    "download_url": "https://files.pythonhosted.org/packages/20/2f/a0f102b7592acbe0c175bca3e6de36ed480ecbcdae59bdc5a3de82c8f33d/suta_ble_bed-0.3.6.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\nRelease Process\n---------------\n\nTo tag and release the latest code:\n\n.. code-block:: sh\n\n   # Write release notes\n   vim HISTORY.rst\n   git add HISTORY.rst\n   git commit -m \"Release notes for vx.y.z\"\n   # Bump\n   bump2version [patch,minor,major]\n   # Assuming no errors ...\n   git push --tags\n\nGo to this repository in Github, make a new release using the UI.\n\nThe Github Action should then take care of publishing the release on Pypi.\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.6 (2024-09-22)\n------------------\n* Correct syntax of release notes\n\n0.3.5 (2024-09-22)\n------------------\n* Correct silly typo in release process\n\n0.3.4 (2024-09-22)\n------------------\n* Add more supported commands\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.6",
    "project_urls": {
        "Homepage": "https://github.com/sredman/suta_ble_bed"
    },
    "split_keywords": [
        "suta",
        " sleepmotion",
        " i500",
        " i900",
        " i200"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "15db4c650fa711053a8835fe85aec3b58b244018499f568d2a2ba5ef9ecb6048",
                "md5": "7984dc26d07727d729eafae3e66654e3",
                "sha256": "6a611a615ceb2b90b295ef3580ce29f47eb8addd97868740499caeeca7aad8f0"
            },
            "downloads": -1,
            "filename": "suta_ble_bed-0.3.6-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7984dc26d07727d729eafae3e66654e3",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.6",
            "size": 10798,
            "upload_time": "2024-09-22T15:56:40",
            "upload_time_iso_8601": "2024-09-22T15:56:40.561673Z",
            "url": "https://files.pythonhosted.org/packages/15/db/4c650fa711053a8835fe85aec3b58b244018499f568d2a2ba5ef9ecb6048/suta_ble_bed-0.3.6-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "202fa0f102b7592acbe0c175bca3e6de36ed480ecbcdae59bdc5a3de82c8f33d",
                "md5": "a884aa102aa481084e192e3a43a20183",
                "sha256": "9703259c9f7869ab9f3d716da99817923ac72acdf5c5397b32f937788746d701"
            },
            "downloads": -1,
            "filename": "suta_ble_bed-0.3.6.tar.gz",
            "has_sig": false,
            "md5_digest": "a884aa102aa481084e192e3a43a20183",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 15474,
            "upload_time": "2024-09-22T15:56:42",
            "upload_time_iso_8601": "2024-09-22T15:56:42.058304Z",
            "url": "https://files.pythonhosted.org/packages/20/2f/a0f102b7592acbe0c175bca3e6de36ed480ecbcdae59bdc5a3de82c8f33d/suta_ble_bed-0.3.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-22 15:56:42",
    "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.51731s