Skip to content
/ aionuki Public
forked from pschmitt/pynuki

Asynchronous python bindings for nuki.io bridges.

License

Notifications You must be signed in to change notification settings

rgon/aionuki

 
 

Repository files navigation

aionuki

PyPI PyPI - Downloads PyPI - License Python Lint

Asynchronous Python library for interacting with Nuki locks and openers. Forked from pynuki. Refactored to use aiohttp and asyncio.

Supports automatic bridge discovery using nuki.io servers and interactive authentication without manually entering any token.

Supports parsing callbacks and integrating the result in the object's data structure. Full support of the Nuki API Spec v1.12 PDF Here

Installation

pip install -U aionuki

Usage

import asyncio
from aionuki import NukiBridge

async def main():
    bridges = await NukiBridge.discover()

    async with (bridges[0])(token=None) as br:
        print("Starting the interactive auth procedure.", br)

        if not br.token:
            print("Received token:", await br.auth())

        await br.connect()

        lock = (await br.locks)[0]

        await lock.lock()
        await lock.unlock()

loop = asyncio.get_event_loop()
loop.run_until_complete(main())

More info in the examples directory.

About

Asynchronous python bindings for nuki.io bridges.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%