Skip to main content

Python API for Beward Cameras and Doorbells.

Project description

Please :star: this repo if you find it useful

py-beward

Build Status GitHub Activity License PyPI PyPI - Python Version Coverage Status Requires.io

Project Maintenance

GitHub pull requests Bugs

Python API for Beward Cameras and Doorbells. This is used in Home Assistant component but should be generic enough that can be used elsewhere.

Installation

pip install beward

Usage example

import time

from beward import Beward
from beward.const import ALARM_ONLINE, ALARM_MOTION, ALARM_SENSOR


def handler(device, timestamp, alarm, state):
    print('Handling alarm "%s". State: %d' % (alarm, state))


DEVICE_HOST = '192.168.1.100'
DEVICE_USER = 'admin'
DEVICE_PASS = 'password'

bwd = Beward.factory(DEVICE_HOST, DEVICE_USER, DEVICE_PASS, stream=1)
bwd.add_alarms_handler(handler)
bwd.listen_alarms(alarms=(ALARM_ONLINE, ALARM_MOTION, ALARM_SENSOR))

print('Live image URL:', bwd.live_image_url)
print('RTSP live video URL:', bwd.rtsp_live_video_url)
print('Live image:', bwd.camera_image())

for decade in range(10):
    print('Time: %ds' % (decade * 10))
    time.sleep(10)
print('Bye')

Contributions are welcome!

This is an active open-source project. We are always open to people who want to use the code or contribute to it.

We have set up a separate document containing our contribution guidelines.

Thank you for being involved! :heart_eyes:

Authors & contributors

The original setup of this component is by [Andrey "Limych" Khrolenok][limych].

For a full list of all authors and contributors, check [the contributor's page][contributors].

License

creative commons Attribution-NonCommercial-ShareAlike 4.0 International License

See separate license file for full text.

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

beward-1.1.0b0.tar.gz (8.7 kB view details)

Uploaded Source

File details

Details for the file beward-1.1.0b0.tar.gz.

File metadata

  • Download URL: beward-1.1.0b0.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.5

File hashes

Hashes for beward-1.1.0b0.tar.gz
Algorithm Hash digest
SHA256 c590aa1e48a1b0ef920de41c6981d3dd8a5b985da50a5b67b241a0806dd06d3c
MD5 384743087e4c964527fd853f8f9bfe5c
BLAKE2b-256 499d6cc5479166f44ff73ca82b6af5075a68cd43fd52f59bb7d0ae891fb30e85

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