https://github.com/mezz64/pyeight
Python library to interface with the Eight Sleep API
https://github.com/mezz64/pyeight
eight eightsleep hacktoberfest python sleep sleep-tracker
Last synced: about 1 year ago
JSON representation
Python library to interface with the Eight Sleep API
- Host: GitHub
- URL: https://github.com/mezz64/pyeight
- Owner: mezz64
- License: mit
- Created: 2017-03-27T02:05:20.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-03-20T16:59:53.000Z (about 2 years ago)
- Last Synced: 2025-03-28T20:08:37.931Z (about 1 year ago)
- Topics: eight, eightsleep, hacktoberfest, python, sleep, sleep-tracker
- Language: Python
- Homepage:
- Size: 78.1 KB
- Stars: 60
- Watchers: 5
- Forks: 14
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://pypi.python.org/pypi/pyEight)
# Introduction
Python library to interface with the Eight Sleep API
API is currently undocumented. Usage is derived by capturing api calls made by the Eight Sleep android app.
Code is licensed under the MIT license.
## Thanks
Special thanks to github user @alyc100 for making his SmartThings Eight Sleep code available.
# Requirements
* python >= 3.9
* aiohttp >= 2.0
* asyncio
# Installation
```pip install pyeight```
# Usage
Full usage example can be found in the HomeAssistant implementation of this library.
Basic Usage
```python
from pyeight.eight import EightSleep
eight = EightSleep(user, pass, timezone, None)
await eight.start()
# Update mattress data, 1min interval recommended
await eight.update_device_data()
# Update user data, 5min interval recommended
await eight.update_user_data()
```
# Properties
Library properties are well defined in both ```eight.py``` and ```user.py```.
# TODO
* Improve dynamic presence detection through statistical analysis