This is an experimental Python library for Eufy Security devices (cameras, doorbells, etc.).
The library is currently supported on
pip install python-eufy-security
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.
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.
make init
.source ./venv/bin/activate
README.md
with any new documentation.make coverage
make lint
make typing