Skip to main content

Owlet baby montior API wrapper

Project description

Introduction

First pass at creating a wrapper for the Owlet baby monitor api, this currently only supports the sock v3 as I do not have a v2 to test with

inspiration and API reverse engineering taken from various projects:

https://github.com/BastianPoe/owlet_api

https://github.com/mbevand/owlet_monitor

End goal is to create a homeassistant integration using this API. But the intention is that this library will always be usable standalone

Install

To install via pip run command

pip install pyowletapi

To do

Tidy up exception logging

Create test routines

Use

import the api and sock objects

from pyowletapi.api import OwletAPI
from pyowlet.sock import Sock

create an api object passing your region, username and password, the OwletAPI will also take a aiohttp session as a keyword argument

api = OwletAPI('europe', username, password)

you can then authenticate against the Owlet servers using this object and create a list of sock objects

await api.authenticate()
socks = {device['device']['dsn']: Sock(api, device['device']) for device in devices}

to get current reading from sock call the update_properties function on each sock object

device.update_properties()

This will return a tuple, the first element being the raw response as a dict and the second element is a more cut down dict version of the response showing only the most relevant data.

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

pyowletapi-2023.5.24.tar.gz (10.2 kB view details)

Uploaded Source

File details

Details for the file pyowletapi-2023.5.24.tar.gz.

File metadata

  • Download URL: pyowletapi-2023.5.24.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.5

File hashes

Hashes for pyowletapi-2023.5.24.tar.gz
Algorithm Hash digest
SHA256 07c1d0b8587abdc872dbbdd51c9567a7b2e00e6828cf0359cfe232a64220d449
MD5 ad6b5c4e0c5180a3841a27d2be4da4b4
BLAKE2b-256 6f94c532545dabfd4f435b7c13ac5e60f45e0587b0713006ac35bbce5d262b1d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page