aiotsmart


Nameaiotsmart JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/andrew-codechimp/python-tsmart
SummaryAsynchronous Python client for TSmart.
upload_time2024-09-09 12:58:05
maintainerAndrew Jackson
docs_urlNone
authorAndrew Jackson
requires_python<4.0,>=3.11
licenseMIT
keywords api async client
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Python: TSmart

[![GitHub Release][releases-shield]][releases]
[![Python Versions][python-versions-shield]][pypi]
![Project Stage][project-stage-shield]
![Project Maintenance][maintenance-shield]
[![License][license-shield]](LICENSE.md)

[![Build Status][build-shield]][build]
[![Code Coverage][codecov-shield]][codecov]
[![Code Smells][code-smells]][sonarcloud]

Asynchronous Python client for TSmart.

Work in progress!

## About

This package allows you to fetch data from your TSmart Immersion Heater.

## Installation

```bash
pip install aiotsmart
```

## Usage
```python
from aiotsmart.tsmart import TSmartClient, TSmartDiscovery, Mode

# Discovery
discovery = TSmartDiscovery()
devices = await discovery.discover()
print(devices)

# Configuration
client = TSmartClient(YOUR_IP)
configuration = await client.configuration_read()
print(configuration)

# Status
client = TSmartClient(YOUR_IP)
status = await client.control_read()
print(status)

# Set
client = TSmartClient(YOUR_IP)
await client.control_write(power=True, mode=Mode.MANUAL, setpoint=30)
```

## Changelog & Releases

This repository keeps a change log using [GitHub's releases][releases]
functionality. The format of the log is based on
[Keep a Changelog][keepchangelog].

Releases are based on [Semantic Versioning][semver], and use the format
of ``MAJOR.MINOR.PATCH``. In a nutshell, the version will be incremented
based on the following:

- ``MAJOR``: Incompatible or major changes.
- ``MINOR``: Backwards-compatible new features and enhancements.
- ``PATCH``: Backwards-compatible bugfixes and package updates.

## Contributing

This is an active open-source project. We are always open to people who want to
use the code or contribute to it.

We've set up a separate document for our
[contribution guidelines](.github/CONTRIBUTING.md).

Thank you for being involved! :heart_eyes:

## Setting up development environment

This Python project is fully managed using the [Poetry][poetry] dependency manager. But also relies on the use of NodeJS for certain checks during development.

You need at least:

- Python 3.11+
- [Poetry][poetry-install]
- NodeJS 12+ (including NPM)

To install all packages, including all development requirements:

```bash
npm install
poetry install
```

As this repository uses the [pre-commit][pre-commit] framework, all changes
are linted and tested with each commit. You can run all checks and tests
manually, using the following command:

```bash
poetry run pre-commit run --all-files
```

To run just the Python tests:

```bash
poetry run pytest
```

## Authors & contributors

The content is by [Andrew Jackson][andrew-codechimp].

For a full list of all authors and contributors,
check [the contributor's page][contributors].

## Disclaimer

This library is in no way approved, endorsed or supported by Tesla UK Ltd.

## Acknowledgements

<details>
    <summary>This library builds upon the great work by Paul Warren</summary>
    MIT License

    Copyright (c) 2023 Paul Warren

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.
</details>


## License

MIT License

Copyright (c) 2024 Andrew Jackson

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

[build-shield]: https://github.com/andrew-codechimp/python-tsmart/actions/workflows/tests.yaml/badge.svg
[build]: https://github.com/andrew-codechimp/python-tsmart/actions
[code-smells]: https://sonarcloud.io/api/project_badges/measure?project=andrew-codechimp_python-tsmart&metric=code_smells
[codecov-shield]: https://codecov.io/gh/andrew-codechimp/python-tsmart/branch/main/graph/badge.svg
[codecov]: https://codecov.io/gh/andrew-codechimp/python-tsmart
[commits-shield]: https://img.shields.io/github/commit-activity/y/andrew-codechimp/python-tsmart.svg
[commits]: https://github.com/andrew-codechimp/python-tsmart/commits/master
[contributors]: https://github.com/andrew-codechimp/python-tsmart/graphs/contributors
[andrew-codechimp]: https://github.com/andrew-codechimp
[keepchangelog]: http://keepachangelog.com/en/1.0.0/
[license-shield]: https://img.shields.io/github/license/andrew-codechimp/python-tsmart.svg
[maintenance-shield]: https://img.shields.io/maintenance/yes/2024.svg
[poetry-install]: https://python-poetry.org/docs/#installation
[poetry]: https://python-poetry.org
[pre-commit]: https://pre-commit.com/
[project-stage-shield]: https://img.shields.io/badge/project%20stage-stable-green.svg
[python-versions-shield]: https://img.shields.io/pypi/pyversions/aiotsmart
[releases-shield]: https://img.shields.io/github/release/andrew-codechimp/python-tsmart.svg
[releases]: https://github.com/andrew-codechimp/python-tsmart/releases
[semver]: http://semver.org/spec/v2.0.0.html
[sonarcloud]: https://sonarcloud.io/summary/new_code?id=andrew-codechimp_python-tsmart
[pypi]: https://pypi.org/project/aiotsmart/


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/andrew-codechimp/python-tsmart",
    "name": "aiotsmart",
    "maintainer": "Andrew Jackson",
    "docs_url": null,
    "requires_python": "<4.0,>=3.11",
    "maintainer_email": "andrew@codechimp.org",
    "keywords": "api, async, client",
    "author": "Andrew Jackson",
    "author_email": "andrew@codechimp.org",
    "download_url": "https://files.pythonhosted.org/packages/c8/07/5e53b518778117bcdc54c8ce06554aa6766d5b86b965ca4af59f8d39a012/aiotsmart-0.1.1.tar.gz",
    "platform": null,
    "description": "# Python: TSmart\n\n[![GitHub Release][releases-shield]][releases]\n[![Python Versions][python-versions-shield]][pypi]\n![Project Stage][project-stage-shield]\n![Project Maintenance][maintenance-shield]\n[![License][license-shield]](LICENSE.md)\n\n[![Build Status][build-shield]][build]\n[![Code Coverage][codecov-shield]][codecov]\n[![Code Smells][code-smells]][sonarcloud]\n\nAsynchronous Python client for TSmart.\n\nWork in progress!\n\n## About\n\nThis package allows you to fetch data from your TSmart Immersion Heater.\n\n## Installation\n\n```bash\npip install aiotsmart\n```\n\n## Usage\n```python\nfrom aiotsmart.tsmart import TSmartClient, TSmartDiscovery, Mode\n\n# Discovery\ndiscovery = TSmartDiscovery()\ndevices = await discovery.discover()\nprint(devices)\n\n# Configuration\nclient = TSmartClient(YOUR_IP)\nconfiguration = await client.configuration_read()\nprint(configuration)\n\n# Status\nclient = TSmartClient(YOUR_IP)\nstatus = await client.control_read()\nprint(status)\n\n# Set\nclient = TSmartClient(YOUR_IP)\nawait client.control_write(power=True, mode=Mode.MANUAL, setpoint=30)\n```\n\n## Changelog & Releases\n\nThis repository keeps a change log using [GitHub's releases][releases]\nfunctionality. The format of the log is based on\n[Keep a Changelog][keepchangelog].\n\nReleases are based on [Semantic Versioning][semver], and use the format\nof ``MAJOR.MINOR.PATCH``. In a nutshell, the version will be incremented\nbased on the following:\n\n- ``MAJOR``: Incompatible or major changes.\n- ``MINOR``: Backwards-compatible new features and enhancements.\n- ``PATCH``: Backwards-compatible bugfixes and package updates.\n\n## Contributing\n\nThis is an active open-source project. We are always open to people who want to\nuse the code or contribute to it.\n\nWe've set up a separate document for our\n[contribution guidelines](.github/CONTRIBUTING.md).\n\nThank you for being involved! :heart_eyes:\n\n## Setting up development environment\n\nThis Python project is fully managed using the [Poetry][poetry] dependency manager. But also relies on the use of NodeJS for certain checks during development.\n\nYou need at least:\n\n- Python 3.11+\n- [Poetry][poetry-install]\n- NodeJS 12+ (including NPM)\n\nTo install all packages, including all development requirements:\n\n```bash\nnpm install\npoetry install\n```\n\nAs this repository uses the [pre-commit][pre-commit] framework, all changes\nare linted and tested with each commit. You can run all checks and tests\nmanually, using the following command:\n\n```bash\npoetry run pre-commit run --all-files\n```\n\nTo run just the Python tests:\n\n```bash\npoetry run pytest\n```\n\n## Authors & contributors\n\nThe content is by [Andrew Jackson][andrew-codechimp].\n\nFor a full list of all authors and contributors,\ncheck [the contributor's page][contributors].\n\n## Disclaimer\n\nThis library is in no way approved, endorsed or supported by Tesla UK Ltd.\n\n## Acknowledgements\n\n<details>\n    <summary>This library builds upon the great work by Paul Warren</summary>\n    MIT License\n\n    Copyright (c) 2023 Paul Warren\n\n    Permission is hereby granted, free of charge, to any person obtaining a copy\n    of this software and associated documentation files (the \"Software\"), to deal\n    in the Software without restriction, including without limitation the rights\n    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n    copies of the Software, and to permit persons to whom the Software is\n    furnished to do so, subject to the following conditions:\n\n    The above copyright notice and this permission notice shall be included in all\n    copies or substantial portions of the Software.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n    SOFTWARE.\n</details>\n\n\n## License\n\nMIT License\n\nCopyright (c) 2024 Andrew Jackson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n[build-shield]: https://github.com/andrew-codechimp/python-tsmart/actions/workflows/tests.yaml/badge.svg\n[build]: https://github.com/andrew-codechimp/python-tsmart/actions\n[code-smells]: https://sonarcloud.io/api/project_badges/measure?project=andrew-codechimp_python-tsmart&metric=code_smells\n[codecov-shield]: https://codecov.io/gh/andrew-codechimp/python-tsmart/branch/main/graph/badge.svg\n[codecov]: https://codecov.io/gh/andrew-codechimp/python-tsmart\n[commits-shield]: https://img.shields.io/github/commit-activity/y/andrew-codechimp/python-tsmart.svg\n[commits]: https://github.com/andrew-codechimp/python-tsmart/commits/master\n[contributors]: https://github.com/andrew-codechimp/python-tsmart/graphs/contributors\n[andrew-codechimp]: https://github.com/andrew-codechimp\n[keepchangelog]: http://keepachangelog.com/en/1.0.0/\n[license-shield]: https://img.shields.io/github/license/andrew-codechimp/python-tsmart.svg\n[maintenance-shield]: https://img.shields.io/maintenance/yes/2024.svg\n[poetry-install]: https://python-poetry.org/docs/#installation\n[poetry]: https://python-poetry.org\n[pre-commit]: https://pre-commit.com/\n[project-stage-shield]: https://img.shields.io/badge/project%20stage-stable-green.svg\n[python-versions-shield]: https://img.shields.io/pypi/pyversions/aiotsmart\n[releases-shield]: https://img.shields.io/github/release/andrew-codechimp/python-tsmart.svg\n[releases]: https://github.com/andrew-codechimp/python-tsmart/releases\n[semver]: http://semver.org/spec/v2.0.0.html\n[sonarcloud]: https://sonarcloud.io/summary/new_code?id=andrew-codechimp_python-tsmart\n[pypi]: https://pypi.org/project/aiotsmart/\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Asynchronous Python client for TSmart.",
    "version": "0.1.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/andrew-codechimp/python-tsmart/issues",
        "Changelog": "https://github.com/andrew-codechimp/python-tsmart/releases",
        "Documentation": "https://github.com/andrew-codechimp/python-tsmart",
        "Homepage": "https://github.com/andrew-codechimp/python-tsmart",
        "Repository": "https://github.com/andrew-codechimp/python-tsmart"
    },
    "split_keywords": [
        "api",
        " async",
        " client"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f762028bf8d668cb12479931e295551102ab66c574c9be04caa6ac1cda53cd2a",
                "md5": "08daf3d7dfb8e451814d5bb14234d672",
                "sha256": "c92d763523e15f51aa4b5e3c028cc1b11b76bb9a0e7afc7081e627210ab9860e"
            },
            "downloads": -1,
            "filename": "aiotsmart-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "08daf3d7dfb8e451814d5bb14234d672",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 10822,
            "upload_time": "2024-09-09T12:58:03",
            "upload_time_iso_8601": "2024-09-09T12:58:03.831143Z",
            "url": "https://files.pythonhosted.org/packages/f7/62/028bf8d668cb12479931e295551102ab66c574c9be04caa6ac1cda53cd2a/aiotsmart-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c8075e53b518778117bcdc54c8ce06554aa6766d5b86b965ca4af59f8d39a012",
                "md5": "e64d52dbd02f5cd1d01fa31283f68b89",
                "sha256": "4809a342add3254b9b745c3e8479001c10543bc74cef2ca43228e9b1749400aa"
            },
            "downloads": -1,
            "filename": "aiotsmart-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "e64d52dbd02f5cd1d01fa31283f68b89",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 11192,
            "upload_time": "2024-09-09T12:58:05",
            "upload_time_iso_8601": "2024-09-09T12:58:05.329282Z",
            "url": "https://files.pythonhosted.org/packages/c8/07/5e53b518778117bcdc54c8ce06554aa6766d5b86b965ca4af59f8d39a012/aiotsmart-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-09 12:58:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "andrew-codechimp",
    "github_project": "python-tsmart",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "aiotsmart"
}
        
Elapsed time: 1.40915s