local-tuya


Namelocal-tuya JSON
Version 0.2.6 PyPI version JSON
download
home_pagehttps://github.com/gpajot/local-tuya
SummaryInterface to Tuya devices over LAN.
upload_time2023-02-11 16:26:42
maintainer
docs_urlNone
authorGabriel Pajot
requires_python>=3.7,<3.12
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # local-tuya
Interface to Tuya devices over LAN.

Features:
- asynchronous methods and transport
- persistent communication to the device
- automatic remote device state updates (remotes can still be used)
- configuratble of buffering for subsequent updates
- constraints between device commands
- Domoticz plugin using a dedicated thread

> 💡 For now, only v3.3 is supported as I only own devices using this version.

## Requirements
To control a device you will need these 3 things:
- the device ID
- the device local IP address
- the device local key (encryption key generated upon pairing)

> ⚠️ This library does not provide support for getting these.
> See how to do that using any of those projects:
> - [tuyapi](https://github.com/codetheweb/tuyapi)
> - [tinytuya](https://github.com/jasonacox/tinytuya)
> 
> Generous thanks to the maintainers of those tools for details on interfacing with Tuya devices.

> ⚠️ Keep in mind that:
> - After pairing the devices, it's recommended to assign static IPs in your router.
> - If you reset or re-pair devices the local key will change.
> - You can delete your tuya IOT account but not the SmartLife one and devices should be kept there.
> - For state updates to be received properly, the device needs to be able to access the Tuya backend.

## Architecture
This library is composed of two main components:
- the Tuya protocol
- the device

### Protocol
The protocol is responsible of handling communication details with the Tuya device.
Its interface consists of an asynchronous method to update the device and accepts a callback to subscribe to state changes.

See [protocol module](./local_tuya/protocol).

### Device
The device handles higher level functional logic such as buffering, constraints and specific device commands.

See [device module](./local_tuya/device).

## Domoticz plugin tools
See [Domoticz module](./local_tuya/domoticz).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/gpajot/local-tuya",
    "name": "local-tuya",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<3.12",
    "maintainer_email": "",
    "keywords": "",
    "author": "Gabriel Pajot",
    "author_email": "gab@les-cactus.co",
    "download_url": "https://files.pythonhosted.org/packages/b0/e2/fbd3c221bd44285dfc387bc2be9bdf1aa526b61c919d1e6c28e3b313fd35/local_tuya-0.2.6.tar.gz",
    "platform": null,
    "description": "# local-tuya\nInterface to Tuya devices over LAN.\n\nFeatures:\n- asynchronous methods and transport\n- persistent communication to the device\n- automatic remote device state updates (remotes can still be used)\n- configuratble of buffering for subsequent updates\n- constraints between device commands\n- Domoticz plugin using a dedicated thread\n\n> \ud83d\udca1 For now, only v3.3 is supported as I only own devices using this version.\n\n## Requirements\nTo control a device you will need these 3 things:\n- the device ID\n- the device local IP address\n- the device local key (encryption key generated upon pairing)\n\n> \u26a0\ufe0f This library does not provide support for getting these.\n> See how to do that using any of those projects:\n> - [tuyapi](https://github.com/codetheweb/tuyapi)\n> - [tinytuya](https://github.com/jasonacox/tinytuya)\n> \n> Generous thanks to the maintainers of those tools for details on interfacing with Tuya devices.\n\n> \u26a0\ufe0f Keep in mind that:\n> - After pairing the devices, it's recommended to assign static IPs in your router.\n> - If you reset or re-pair devices the local key will change.\n> - You can delete your tuya IOT account but not the SmartLife one and devices should be kept there.\n> - For state updates to be received properly, the device needs to be able to access the Tuya backend.\n\n## Architecture\nThis library is composed of two main components:\n- the Tuya protocol\n- the device\n\n### Protocol\nThe protocol is responsible of handling communication details with the Tuya device.\nIts interface consists of an asynchronous method to update the device and accepts a callback to subscribe to state changes.\n\nSee [protocol module](./local_tuya/protocol).\n\n### Device\nThe device handles higher level functional logic such as buffering, constraints and specific device commands.\n\nSee [device module](./local_tuya/device).\n\n## Domoticz plugin tools\nSee [Domoticz module](./local_tuya/domoticz).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Interface to Tuya devices over LAN.",
    "version": "0.2.6",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4d24be2145de4cf6f9060e8b377558cd20f712abddeae3fd2990f263d764601c",
                "md5": "b69bc4f445a867dc25d9ec61d3102c72",
                "sha256": "2404558df88d43b9d47a30436e3f9614efb776f42559cce678048eb153cdfddb"
            },
            "downloads": -1,
            "filename": "local_tuya-0.2.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b69bc4f445a867dc25d9ec61d3102c72",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<3.12",
            "size": 35824,
            "upload_time": "2023-02-11T16:26:41",
            "upload_time_iso_8601": "2023-02-11T16:26:41.067420Z",
            "url": "https://files.pythonhosted.org/packages/4d/24/be2145de4cf6f9060e8b377558cd20f712abddeae3fd2990f263d764601c/local_tuya-0.2.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b0e2fbd3c221bd44285dfc387bc2be9bdf1aa526b61c919d1e6c28e3b313fd35",
                "md5": "bc7efbcc3d1738711c51c2e5d40ffa4d",
                "sha256": "71283365cb4a4787d5aa4a5367f034be5c8e2a8cff774f14ce247ea5269d43da"
            },
            "downloads": -1,
            "filename": "local_tuya-0.2.6.tar.gz",
            "has_sig": false,
            "md5_digest": "bc7efbcc3d1738711c51c2e5d40ffa4d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<3.12",
            "size": 23077,
            "upload_time": "2023-02-11T16:26:42",
            "upload_time_iso_8601": "2023-02-11T16:26:42.673780Z",
            "url": "https://files.pythonhosted.org/packages/b0/e2/fbd3c221bd44285dfc387bc2be9bdf1aa526b61c919d1e6c28e3b313fd35/local_tuya-0.2.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-11 16:26:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "gpajot",
    "github_project": "local-tuya",
    "lcname": "local-tuya"
}
        
Elapsed time: 0.07047s