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.

Files for python-kodaksmarthome, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size python_kodaksmarthome-0.1.1-py2.py3-none-any.whl (7.6 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size python-kodaksmarthome-0.1.1.tar.gz (21.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page