yalesmartalarmclient


Nameyalesmartalarmclient JSON
Version 0.4.3 PyPI version JSON
download
home_pagehttps://github.com/domwillcode/yale-smart-alarm-client
SummaryInteract with Yale Smart Alarm systems
upload_time2024-09-20 22:06:52
maintainerG Johansson
docs_urlNone
authorDominic Willson
requires_python<4.0,>=3.11
licenseApache-2.0
keywords alarm yale smart alarm
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Yale Smart Alarm Client

[![PyPI version](https://img.shields.io/pypi/v/yalesmartalarmclient.svg?logo=pypi&logoColor=FFE873)](https://pypi.org/project/yalesmartalarmclient/)
[![Supported Python versions](https://img.shields.io/pypi/pyversions/yalesmartalarmclient.svg?logo=python&logoColor=FFE873)](https://pypi.org/project/yalesmartalarmclient/)
[![PyPI downloads](https://img.shields.io/pypi/dm/yalesmartalarmclient.svg)](https://yalesmartalarmclient.org/packages/yalesmartalarmclient)
[![GitHub](https://img.shields.io/github/license/domwillcode/yale-smart-alarm-client)](LICENSE)

Yale Smart Alarm client is a python client for interacting with the Yale Smart Alarm System API.

Supported functions:
- Arm full (away)
- Arm partial (away/night)
- Disarm
- Get alarm status
- Get locks and operate
- Door sensor status
- Trigger alarm panic button

### Usage
Create a client with:

```python
from yalesmartalarmclient.client import YaleSmartAlarmClient

client = YaleSmartAlarmClient(username, password)
```

where username and password are your Yale Smart Alarm credentials.

For full listing of function see functions.md

#### Locks

Iterate the connected locks

```python
client = YaleSmartAlarmClient(username, password)
for lock in client.lock_api.locks():
    print(lock)
```

lock a single lock:

```python
lock = client.lock_api.get(name="myfrontdoor")
lock.close()
```

unlock:

```python
lock = client.lock_api.get(name="myfrontdoor")
lock.open(pin_code="1234566")
```

DEPRECATED! Get connected locks states:

```python
client.get_locks_status()  # Returns an array of locks and status
```


#### Alarms

Change the alarm state with:

```python
client.arm_full()
client.arm_partial()
client.disarm()
```

or

```python
client.set_alarm_state(YALE_STATE_ARM_FULL)
```

where 'mode' is one of:

```python
from yalesmartalarmclient.client import (
    YALE_STATE_ARM_PARTIAL,
    YALE_STATE_DISARM,
    YALE_STATE_ARM_FULL,
)
```

Is the alarm armed fully or partially:

```python
client.is_armed()  # == True
```

or return alarm status. eg.:

```python
client.get_armed_status() is YALE_STATE_ARM_FULL
```

Trigger panic button:

```python
client.trigger_panic_button()
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/domwillcode/yale-smart-alarm-client",
    "name": "yalesmartalarmclient",
    "maintainer": "G Johansson",
    "docs_url": null,
    "requires_python": "<4.0,>=3.11",
    "maintainer_email": "goran.johansson@shiftit.se",
    "keywords": "alarm, Yale, Smart Alarm",
    "author": "Dominic Willson",
    "author_email": "domwillcode@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/d5/59/6bd7c1ff27af812fe7c914988b6e875f9d8b71b462c456ad9859cac7fac8/yalesmartalarmclient-0.4.3.tar.gz",
    "platform": null,
    "description": "# Yale Smart Alarm Client\n\n[![PyPI version](https://img.shields.io/pypi/v/yalesmartalarmclient.svg?logo=pypi&logoColor=FFE873)](https://pypi.org/project/yalesmartalarmclient/)\n[![Supported Python versions](https://img.shields.io/pypi/pyversions/yalesmartalarmclient.svg?logo=python&logoColor=FFE873)](https://pypi.org/project/yalesmartalarmclient/)\n[![PyPI downloads](https://img.shields.io/pypi/dm/yalesmartalarmclient.svg)](https://yalesmartalarmclient.org/packages/yalesmartalarmclient)\n[![GitHub](https://img.shields.io/github/license/domwillcode/yale-smart-alarm-client)](LICENSE)\n\nYale Smart Alarm client is a python client for interacting with the Yale Smart Alarm System API.\n\nSupported functions:\n- Arm full (away)\n- Arm partial (away/night)\n- Disarm\n- Get alarm status\n- Get locks and operate\n- Door sensor status\n- Trigger alarm panic button\n\n### Usage\nCreate a client with:\n\n```python\nfrom yalesmartalarmclient.client import YaleSmartAlarmClient\n\nclient = YaleSmartAlarmClient(username, password)\n```\n\nwhere username and password are your Yale Smart Alarm credentials.\n\nFor full listing of function see functions.md\n\n#### Locks\n\nIterate the connected locks\n\n```python\nclient = YaleSmartAlarmClient(username, password)\nfor lock in client.lock_api.locks():\n    print(lock)\n```\n\nlock a single lock:\n\n```python\nlock = client.lock_api.get(name=\"myfrontdoor\")\nlock.close()\n```\n\nunlock:\n\n```python\nlock = client.lock_api.get(name=\"myfrontdoor\")\nlock.open(pin_code=\"1234566\")\n```\n\nDEPRECATED! Get connected locks states:\n\n```python\nclient.get_locks_status()  # Returns an array of locks and status\n```\n\n\n#### Alarms\n\nChange the alarm state with:\n\n```python\nclient.arm_full()\nclient.arm_partial()\nclient.disarm()\n```\n\nor\n\n```python\nclient.set_alarm_state(YALE_STATE_ARM_FULL)\n```\n\nwhere 'mode' is one of:\n\n```python\nfrom yalesmartalarmclient.client import (\n    YALE_STATE_ARM_PARTIAL,\n    YALE_STATE_DISARM,\n    YALE_STATE_ARM_FULL,\n)\n```\n\nIs the alarm armed fully or partially:\n\n```python\nclient.is_armed()  # == True\n```\n\nor return alarm status. eg.:\n\n```python\nclient.get_armed_status() is YALE_STATE_ARM_FULL\n```\n\nTrigger panic button:\n\n```python\nclient.trigger_panic_button()\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Interact with Yale Smart Alarm systems",
    "version": "0.4.3",
    "project_urls": {
        "Bug Tracker": "https://github.com/domwillcode/yale-smart-alarm-client/issues",
        "Changelog": "https://github.com/domwillcode/yale-smart-alarm-client/releases",
        "Documentation": "https://github.com/domwillcode/yale-smart-alarm-client",
        "Homepage": "https://github.com/domwillcode/yale-smart-alarm-client",
        "Repository": "https://github.com/domwillcode/yale-smart-alarm-client"
    },
    "split_keywords": [
        "alarm",
        " yale",
        " smart alarm"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7ef706bdfe389a7fd1339d7230a1a1f9ec5aafcc6b64a545ee7566a173c6eec5",
                "md5": "a7566600bddae85ed34b68509d5484d7",
                "sha256": "87de0f2f74659cb7dee2c14fe73ebbaa5883dd1b2fe8ca3d57aa1174169b2330"
            },
            "downloads": -1,
            "filename": "yalesmartalarmclient-0.4.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a7566600bddae85ed34b68509d5484d7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 15671,
            "upload_time": "2024-09-20T22:06:50",
            "upload_time_iso_8601": "2024-09-20T22:06:50.208097Z",
            "url": "https://files.pythonhosted.org/packages/7e/f7/06bdfe389a7fd1339d7230a1a1f9ec5aafcc6b64a545ee7566a173c6eec5/yalesmartalarmclient-0.4.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d5596bd7c1ff27af812fe7c914988b6e875f9d8b71b462c456ad9859cac7fac8",
                "md5": "c3887c03ecc05ecdd25479b50bcf40e3",
                "sha256": "7d86c5b106c30b623211f83cdfd2dc928a668ba062c9c93eadeab00eeb7f34ba"
            },
            "downloads": -1,
            "filename": "yalesmartalarmclient-0.4.3.tar.gz",
            "has_sig": false,
            "md5_digest": "c3887c03ecc05ecdd25479b50bcf40e3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 18975,
            "upload_time": "2024-09-20T22:06:52",
            "upload_time_iso_8601": "2024-09-20T22:06:52.053984Z",
            "url": "https://files.pythonhosted.org/packages/d5/59/6bd7c1ff27af812fe7c914988b6e875f9d8b71b462c456ad9859cac7fac8/yalesmartalarmclient-0.4.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-20 22:06:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "domwillcode",
    "github_project": "yale-smart-alarm-client",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "yalesmartalarmclient"
}
        
Elapsed time: 0.28656s