shelly-control


Nameshelly-control JSON
Version 0.2 PyPI version JSON
download
home_pageNone
SummaryA python package for Shelly Cloud API. Shelly is devoted to the development of innovative IoT solutions and products.
upload_time2024-09-12 04:46:37
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords shelly shelly plug shelly cloud api shelly cloud shelly access control shelly python library
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Shelly Easy Smart Home Automation


SHELLY: The go-to access control for smart homes.

This Python library provides convenient access to the Shelly cloud API, allowing you to manage your relays, rollers and lights.


[Shelly Shop](https://www.shelly.com/en/products/shop)<br>
Request Feature/Suggestion: https://forms.gle/efGD5DuTpWsX96GG7

# Download stats

[![Downloads](https://static.pepy.tech/badge/shelly-control)](https://pepy.tech/project/shelly-control)

## Installation
```console
pip install shelly_control
```
Shelly supports Python 3+.

## Usage
#### Default
```python
import shelly_control
```

#### Authentication

Before making requests, you need to authenticate using your Shelly API key. Initialize the `Connect` class with your API key:

```python
from shelly_control import Connect

base_url = "Your Cloud Server Address"
api_key = "Your Authorization cloud key"
sh = Connect(base_url,api_key)
```
OR
```python
import shelly_control 

base_url = "Your Cloud Server Address"
api_key = "Your Authorization cloud key"
sh = shelly_control.Connect(base_url,api_key)
```
Get Key & Server address from here [Shelly Control Cloud Dashboard](https://control.shelly.cloud/#/settings/user)

### Relay
#### Fetch Devices
```python
# Fetch device status
sh.get_device('device_id')

```

#### Control Devices
```python
# Control device
sh.control_device(channel , 'on'/'off' , device_id)

```
#### Bulk Control Devices
```python
# Bulk Control device
sh.bulk_control_relays('devices')

# Parameters:
#        - devices (list of dict): List of devices to control, each device should be a dictionary with keys:
#            - "id" (int): ID of the device.
#            - "channel" (int): Index of the relay or switch component.
```

### Rollers
#### Control Roller Direction
```python
# Control Roller
sh.control_roller_direction(direction , device_id)

```

#### Control Roller Position
```python
# Control Roller
sh.control_roller_position(position , device_id)

```

#### Bulk Control Roller
```python
# Bulk Control Roller
sh.bulk_control_rollers(device_id)

```

### Lights
#### Control Lights
```python
# Bulk Control Roller
sh.control_light(turn=None , white=None , red=None , green=None , blue=None , gain=None , device_id=None)

```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "shelly-control",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "Shelly, Shelly plug, Shelly cloud api, shelly cloud, Shelly access control, Shelly python library",
    "author": null,
    "author_email": "Ankush Kumar <ankush1611996@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/f9/6d/0ccf0416d8f2d996e419e68a69937c4ce59e15ee509f81dfe87f19cf6ff8/shelly_control-0.2.tar.gz",
    "platform": null,
    "description": "# Shelly Easy Smart Home Automation\n\n\nSHELLY: The go-to access control for smart homes.\n\nThis Python library provides convenient access to the Shelly cloud API, allowing you to manage your relays, rollers and lights.\n\n\n[Shelly Shop](https://www.shelly.com/en/products/shop)<br>\nRequest Feature/Suggestion: https://forms.gle/efGD5DuTpWsX96GG7\n\n# Download stats\n\n[![Downloads](https://static.pepy.tech/badge/shelly-control)](https://pepy.tech/project/shelly-control)\n\n## Installation\n```console\npip install shelly_control\n```\nShelly supports Python 3+.\n\n## Usage\n#### Default\n```python\nimport shelly_control\n```\n\n#### Authentication\n\nBefore making requests, you need to authenticate using your Shelly API key. Initialize the `Connect` class with your API key:\n\n```python\nfrom shelly_control import Connect\n\nbase_url = \"Your Cloud Server Address\"\napi_key = \"Your Authorization cloud key\"\nsh = Connect(base_url,api_key)\n```\nOR\n```python\nimport shelly_control \n\nbase_url = \"Your Cloud Server Address\"\napi_key = \"Your Authorization cloud key\"\nsh = shelly_control.Connect(base_url,api_key)\n```\nGet Key & Server address from here [Shelly Control Cloud Dashboard](https://control.shelly.cloud/#/settings/user)\n\n### Relay\n#### Fetch Devices\n```python\n# Fetch device status\nsh.get_device('device_id')\n\n```\n\n#### Control Devices\n```python\n# Control device\nsh.control_device(channel , 'on'/'off' , device_id)\n\n```\n#### Bulk Control Devices\n```python\n# Bulk Control device\nsh.bulk_control_relays('devices')\n\n# Parameters:\n#        - devices (list of dict): List of devices to control, each device should be a dictionary with keys:\n#            - \"id\" (int): ID of the device.\n#            - \"channel\" (int): Index of the relay or switch component.\n```\n\n### Rollers\n#### Control Roller Direction\n```python\n# Control Roller\nsh.control_roller_direction(direction , device_id)\n\n```\n\n#### Control Roller Position\n```python\n# Control Roller\nsh.control_roller_position(position , device_id)\n\n```\n\n#### Bulk Control Roller\n```python\n# Bulk Control Roller\nsh.bulk_control_rollers(device_id)\n\n```\n\n### Lights\n#### Control Lights\n```python\n# Bulk Control Roller\nsh.control_light(turn=None , white=None , red=None , green=None , blue=None , gain=None , device_id=None)\n\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A python package for Shelly Cloud API. Shelly is devoted to the development of innovative IoT solutions and products.",
    "version": "0.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/AnkushRozra/shelly/issues",
        "Homepage": "https://github.com/AnkushRozra/shelly"
    },
    "split_keywords": [
        "shelly",
        " shelly plug",
        " shelly cloud api",
        " shelly cloud",
        " shelly access control",
        " shelly python library"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "79992017a77c284ec73e5fc47d6e27fded233a290a40266804d8529649876d83",
                "md5": "76fc1967a6297f5a5bc79ef963e461a1",
                "sha256": "9d168ede3471e5ab6913f57a0b0edbb75ccd6e9944347186be27c04094350f90"
            },
            "downloads": -1,
            "filename": "shelly_control-0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "76fc1967a6297f5a5bc79ef963e461a1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 4808,
            "upload_time": "2024-09-12T04:46:36",
            "upload_time_iso_8601": "2024-09-12T04:46:36.806994Z",
            "url": "https://files.pythonhosted.org/packages/79/99/2017a77c284ec73e5fc47d6e27fded233a290a40266804d8529649876d83/shelly_control-0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f96d0ccf0416d8f2d996e419e68a69937c4ce59e15ee509f81dfe87f19cf6ff8",
                "md5": "813d8172bc89a588d530798eb65c3ef7",
                "sha256": "740bc983cfc74b45b1db85716b652673117abd6445c8b5893610f1e8ea084b90"
            },
            "downloads": -1,
            "filename": "shelly_control-0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "813d8172bc89a588d530798eb65c3ef7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 5019,
            "upload_time": "2024-09-12T04:46:37",
            "upload_time_iso_8601": "2024-09-12T04:46:37.646061Z",
            "url": "https://files.pythonhosted.org/packages/f9/6d/0ccf0416d8f2d996e419e68a69937c4ce59e15ee509f81dfe87f19cf6ff8/shelly_control-0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-12 04:46:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "AnkushRozra",
    "github_project": "shelly",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "shelly-control"
}
        
Elapsed time: 0.29906s