Skip to main content

Python package for controlling MyQ-Enabled Garage Door

Project description


# Introduction

This is a Python 3.5+ module aiming to interact with the Chamberlain MyQ API.

Code is licensed under the MIT license.

# Getting Started

## Installation

```python
pip install pymyq
```

## Usage

`pymyq` starts within an [aiohttp](https://aiohttp.readthedocs.io/en/stable/)
`ClientSession`:

```python
import asyncio

from aiohttp import ClientSession


async def main() -> None:
"""Create the aiohttp session and run."""
async with ClientSession() as websession:
# YOUR CODE HERE


asyncio.get_event_loop().run_until_complete(main())
```

To get all MyQ devices associated with an account:

```python
import asyncio

from aiohttp import ClientSession

import pymyq


async def main() -> None:
"""Create the aiohttp session and run."""
async with ClientSession() as websession:
# Valid Brands: 'chamberlain', 'craftsman', 'liftmaster', 'merlin'
myq = await pymyq.login('<EMAIL>', '<PASSWORD>', '<BRAND>', websession)

# Return only cover devices:
devices = await myq.get_devices()

# Return *all* devices:
devices = await myq.get_devices(covers_only=False)


asyncio.get_event_loop().run_until_complete(main())
```

## Device Properties

* `brand`: the brand of the device
* `device_id`: the device's MyQ ID
* `parent_id`: the device's parent device's MyQ ID
* `name`: the name of the device
* `serial`: the serial number of the device
* `state`: the device's current state
* `type`: the type of MyQ device

## Methods

All of the routines on the `MyQDevice` class are coroutines and need to be
`await`ed.

* `close`: close the device
* `open`: open the device
* `update`: get the latest device state (which can then be accessed via the
`state` property)

# Disclaimer

The code here is based off of an unsupported API from
[Chamberlain](http://www.chamberlain.com/) and is subject to change without
notice. The authors claim no responsibility for damages to your garage door or
property by use of the code within.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymyq-1.0.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymyq-1.0.0-py2.py3-none-any.whl (7.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pymyq-1.0.0.tar.gz.

File metadata

  • Download URL: pymyq-1.0.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6

File hashes

Hashes for pymyq-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b7652b83f944a662ae5c982ee5c4fd130cb9631d3c05b241e28d733249108d4a
MD5 f4c5c0d891f8ebaa14ed7af68f3f2bf0
BLAKE2b-256 0954dc1f7593add9b3493195722d29510a3794e692cdf0fade266cbe89af11ce

See more details on using hashes here.

File details

Details for the file pymyq-1.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: pymyq-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6

File hashes

Hashes for pymyq-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b3a4ac00e0a978caa0bdadf5e1c30338bcd82cbe8bee4d5feb69b514c5e26642
MD5 9ed30a5a570adb18bad2e6c7528b01b8
BLAKE2b-256 2e2ee0df998b4938992f4f493c3c973053c7ad90b5d593cb4f6a37afef7eb891

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page