# suta-ble-bed
BLE handling code for bed frames which use the SUTA app (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.
## Usage
```
device = await suta_scanner.discover()[0]
bed = BleSutaBed(device)
await bed.raise_feet()
```
or
```
./suta_ble_bed_cli.py raise-feet
```
## Improvements
- It takes a really long time to connect to the bed, because when using Bluez
you must be actively scanning for the device in order to connect.
## Acknowledgements
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
Code structure inspirired by:
https://github.com/sopelj/python-ember-mug/blob/main/ember_mug/mug.py
Raw data
{
"_id": null,
"home_page": "https://github.com/sredman/suta-ble-bed",
"name": "suta-bed",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "SUTA,sleepmotion,i500,i900,i200",
"author": "Simon Redman",
"author_email": "simon@ergotech.com",
"download_url": "https://files.pythonhosted.org/packages/ee/ee/7f52f07a4b6ee7481bc450855ae9c014371dc40205b1e0eab48f7500a466/suta_bed-0.1.4.tar.gz",
"platform": null,
"description": "# suta-ble-bed\nBLE handling code for bed frames which use the SUTA app (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## Usage\n\n```\ndevice = await suta_scanner.discover()[0]\nbed = BleSutaBed(device)\nawait bed.raise_feet()\n```\n\nor\n\n```\n./suta_ble_bed_cli.py raise-feet\n```\n\n## Improvements\n\n- It takes a really long time to connect to the bed, because when using Bluez\nyou must be actively scanning for the device in order to connect.\n\n## Acknowledgements\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\nCode structure inspirired by:\nhttps://github.com/sopelj/python-ember-mug/blob/main/ember_mug/mug.py\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "",
"version": "0.1.4",
"split_keywords": [
"suta",
"sleepmotion",
"i500",
"i900",
"i200"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "eeee7f52f07a4b6ee7481bc450855ae9c014371dc40205b1e0eab48f7500a466",
"md5": "9f7b5ee3c30c86829c7aa6807db739a6",
"sha256": "ad8b9cbc46ad5aa2f1f2bd1e848f80447c531f32c2aaa5b81c6047c2a1a846d5"
},
"downloads": -1,
"filename": "suta_bed-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "9f7b5ee3c30c86829c7aa6807db739a6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3390,
"upload_time": "2023-03-21T00:29:52",
"upload_time_iso_8601": "2023-03-21T00:29:52.777064Z",
"url": "https://files.pythonhosted.org/packages/ee/ee/7f52f07a4b6ee7481bc450855ae9c014371dc40205b1e0eab48f7500a466/suta_bed-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-21 00:29:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "sredman",
"github_project": "suta-ble-bed",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "bleak",
"specs": [
[
">=",
"0.19.5"
]
]
},
{
"name": "bleak_retry_connector",
"specs": [
[
">=",
"3.0.0"
]
]
}
],
"lcname": "suta-bed"
}