Skip to main content

A Python library for Eufy Security devices

Project description

python-eufy-security

This is an experimental Python library for Eufy Security devices (cameras, doorbells, etc.).

Python Versions

The library is currently supported on

  • Python 3.6
  • Python 3.7

Installation

TBD

Account Information

Because of the way the Eufy Security private API works, an email/password combo cannot work with both the Eufy Security mobile app and this library. It is recommended to use the mobile app to create a secondary "guest" account with a separate email address and use it with this library.

Usage

Everything starts with an: aiohttp ClientSession:

import asyncio

from aiohttp import ClientSession


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


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

Login and get to work:

import asyncio

from aiohttp import ClientSession

from eufy_security import async_login


async def main() -> None:
    """Create the aiohttp session and run the example."""
    async with ClientSession() as websession:
        # Create an API client:
        api = await async_login(EUFY_EMAIL, EUFY_PASSWORD, websession)

        # Loop through the cameras associated with the account:
        for camera in api.cameras.values():
            print("------------------")
            print("Camera Name: %s", camera.name)
            print("Serial Number: %s", camera.serial)
            print("Station Serial Number: %s", camera.station_serial)
            print("Last Camera Image URL: %s", camera.last_camera_image_url)

            print("Starting RTSP Stream")
            stream_url = await camera.async_start_stream()
            print("Stream URL: %s", stream_url)

            print("Stopping RTSP Stream")
            stream_url = await camera.async_stop_stream()


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

Check out example.py, the tests, and the source files themselves for method signatures and more examples.

Contributing

  1. Check for open features/bugs or initiate a discussion on one.
  2. Fork the repository.
  3. Install the dev environment: make init.
  4. Enter the virtual environment: pipenv shell
  5. Code your new feature or bug fix.
  6. Write a test that covers your new functionality.
  7. Run tests and ensure 100% code coverage: make coverage
  8. Submit a pull request!

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

python-eufy-security-0.1.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

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

python_eufy_security-0.1.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file python-eufy-security-0.1.0.tar.gz.

File metadata

  • Download URL: python-eufy-security-0.1.0.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for python-eufy-security-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0a8e7fbcb78db5d119bd054e28ddc295f93cf515ce339aa619eeb211f2c30f14
MD5 a9e4c885716f34828a77ba6b92f879ff
BLAKE2b-256 04090467df84f9021a08f3c95e13a572b6aa63b656a3f86a83b61cdc90f24431

See more details on using hashes here.

File details

Details for the file python_eufy_security-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: python_eufy_security-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for python_eufy_security-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8d2701360d2ab9a0b7a7b534e29097db93ab7c67554cff021eb94dd1ca8cbf8c
MD5 08c8835799b01ce2656d2342062f09db
BLAKE2b-256 ebea8b044edb1423a59ddddb32dd971b016f1cc2cf2ab235b7467593c40bb0cf

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