wyzeapy

raw JSON →
0.5.33 verified Fri May 01 auth: no python

An asynchronous Python library for interacting with Wyze home automation devices (cameras, sensors, locks, etc.) via the Wyze API. Current version 0.5.33, requires Python >=3.11. Active development with frequent releases.

pip install wyzeapy
error wyzeapy.exceptions.WyzeApiError: Invalid credentials
cause Email or password is incorrect, or Wyze API requires two-factor authentication (2FA).
fix
Verify credentials and if 2FA is enabled, use keypair-based authentication or handle the 2FA flow programmatically (see docs).
error RuntimeError: asyncio.run() cannot be called from a running event loop
cause Running asyncio.run() inside an environment that already has an event loop (e.g., Jupyter notebook).
fix
Use 'await' directly in async environments. In Jupyter, import nest_asyncio and apply nest_asyncio.apply().
error ModuleNotFoundError: No module named 'wyzeapy'
cause The library is not installed or installed in a different Python environment.
fix
Run 'pip install wyzeapy' in the correct Python environment (check with 'which python' or 'python --version').
breaking Wyzeapy.create() now requires email and password as arguments (previously used environment variables WYZE_EMAIL and WYZE_PASSWORD).
fix Pass credentials directly: await Wyzeapy.create(email=..., password=...)
gotcha All API calls are asynchronous and must be awaited. Failing to await will return a coroutine object, not the actual result.
fix Ensure you use 'await' when calling any method that returns a coroutine.
deprecated The 'get_devices()' method is deprecated in favor of type-specific methods like get_cameras(), get_locks(), get_sensors().
fix Use the type-specific getter methods instead of get_devices().

Initialize Wyzeapy client and list available cameras.

import asyncio
from wyzeapy import Wyzeapy

async def main():
    client = await Wyzeapy.create(email='your_email', password='your_password')
    cameras = await client.get_cameras()
    for cam in cameras:
        print(cam.nickname)

asyncio.run(main())