Skip to main content

Python Kodak SmartHome API

Project description

Build Status Documentation Status codecov pypi pypi

Python Kodak Smart Home

Python Kodak Smart Home is a library written in Python 3 (>=3.7) that works as API for Kodak Smart Home Portal.

This API uses the credentials from Kodak Smart Home Portal to fetch devices registered and its events to be used as Python Projects.

This project is not part of Kodak.

Installation

pip install python-kodaksmarthome

Usage

Initializing the connection

>>> from kodaksmarthome import KodakSmartHome
>>> my_home = KodakSmartHome('my@email.com', 'my-pass')
>>> my_home.connect()
>>> my_home.is_connected
True

Listing devices, state, model and device id

>>> for device in my_home.list_devices:
...   print(f"Device: {device['name']}")
...   print(f"Device ID: {device['device_id']})
...   print(f"Model: {device['model_name']})
...   print(f"Online: {device['is_online']}\n")
...
Device: Playground
Device ID: '000009999999999999999999'
Model: Cherish 525
Online: False

Device: Bedroom
Device ID: '00000222222222222222222'
Model: Cherish 525
Online: True

Listing last device motion events

>>> motion_events = my_home.get_motion_events(device_id="00000222222222222222222")
>>> for event in motion_events[:2]:
...    print(f"snapshot: {event['snapshot']}")
...    print(f"video_recorded: {event['data'][0]['file']}")
...    print(f"data: {event['created_date']}\n")

snapshot: http://video_url/00000222222222222222222/SNAPSHOT.jpg
video_recorded: http://video_url/00000222222222222222222/VIDEO000001.flv
date: 2020-01-04T16:11:48.000Z

snapshot: http://video_url/00000222222222222222222/SNAPSHOT
video_recorded: http://video_url/00000222222222222222222/VIDEO000002.flv
date: 2020-01-04T16:08:52.000Z

Documentation

https://python-kodaksmarthome.readthedocs.io

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-kodaksmarthome-0.0.2a1.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

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

python_kodaksmarthome-0.0.2a1-py2.py3-none-any.whl (7.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file python-kodaksmarthome-0.0.2a1.tar.gz.

File metadata

  • Download URL: python-kodaksmarthome-0.0.2a1.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.2

File hashes

Hashes for python-kodaksmarthome-0.0.2a1.tar.gz
Algorithm Hash digest
SHA256 4881e7537eca35a1d6cd5ecc07aba9e26b35cb48822f0f398e8c7fe0b199bf16
MD5 2d021ed272c78e3fe9ee65ea9ed4a9d6
BLAKE2b-256 71f4dc2a6a99da248ad9855f8023224e303559d2c542d1039860387d586ea359

See more details on using hashes here.

File details

Details for the file python_kodaksmarthome-0.0.2a1-py2.py3-none-any.whl.

File metadata

  • Download URL: python_kodaksmarthome-0.0.2a1-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.2

File hashes

Hashes for python_kodaksmarthome-0.0.2a1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 89c9c9a4d06dc756550eef4d2a3222ee435c95df1f1812c28ff821f668cf0101
MD5 8adab5391e0d1b14119ee75b97fdb2ea
BLAKE2b-256 c738c3537a572ce752328d2d142313c73f34cb66f113a6295fde34526a0800c7

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