skillfed

asyncsleepiq

ASync SleepIQ API

asyncsleepiq v1.7.1 75.8K downloads/30d#14,679 on PyPI6
Permissive license MIT Active released

What it is and what it does

AsyncSleepIQ is a Python library that wraps the SleepIQ API—the remote interface for SleepNumber smart beds—using async/await patterns via aiohttp. It lets you authenticate to your SleepNumber account, fetch current bed occupancy and sleep number settings, and control bed features like pause mode and calibration from Python code.

The library manages authentication (supporting both legacy key-based and modern cookie-based methods) and handles automatic re-authentication if sessions expire. You initialize it once with login and init_beds, then call fetch_bed_statuses repeatedly to poll for updates without re-authenticating each time. It exposes bed state through SleepIQBed, SleepIQSleeper, and SleepIQFoundation classes that you query and manipulate after fetching.

Use it for:

  • Monitor bed occupancy and sleep number values in a home automation system.
  • Build a dashboard that displays real-time SleepNumber bed status for multiple beds.
  • Automate bed pause mode or calibration on a schedule or in response to events.
  • Integrate SleepNumber data into a sleep tracking or health monitoring application.
  • Create alerts when bed occupancy changes or sleep number drifts beyond a threshold.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

AsyncSleepIQ provides async Python access to the SleepIQ API for SleepNumber beds, allowing you to query bed status, occupancy, sleep number values, and control bed features like pause mode and calibration.

Yes, if you own a SleepNumber bed and need programmatic control or monitoring. The library is actively maintained, has no known vulnerabilities, installs with minimal friction (one dependency), and uses a permissive MIT license. The main constraint is hardware availability—you must own a compatible SleepNumber bed to test or use it meaningfully.

Install

asyncsleepiq on PyPI

pip

pip install asyncsleepiq

uv

uv add asyncsleepiq

poetry

poetry add asyncsleepiq

Installing asyncsleepiq

Before you install

Low install friction; depends only on aiohttp. Actively maintained with a recent commit as of 2026-03-11 and no known vulnerabilities.

License in practice

MIT license permits commercial and private use with minimal restrictions, making it safe to integrate into any project.

Quickstart

pip install asyncsleepiq

import asyncio
from asyncsleepiq import AsyncSleepIQ, LOGIN_COOKIE

async def main():
    api = AsyncSleepIQ(login_method=LOGIN_COOKIE)
    await api.login("user@example.com", "password")
    await api.init_beds()
    await api.fetch_bed_statuses()
    for bed in api.beds.values():
        print(bed)
    await api.close_session()

asyncio.run(main())

Requires a SleepNumber bed with SleepIQ capability and valid SleepNumber account credentials.

Verify before relying

  • Whether the library supports all current SleepIQ API endpoints or only a subset of documented operations.
  • Python version compatibility beyond the generic 'Python :: 3' classifier.

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — aiohttp
Maintenance actively maintained — 156 days since the last release
Last repo commit
First released
Downloads 75,809/month — #14,679 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: asyncsleepiq-1.7.1-py3-none-any.whl

Programming Language :: Python :: 3

Tags

sleepiq api pythonsleepnumber bed controlasync sleep trackersleepiq home automationbed status monitoringsleepnumber api clientasync bed control
home-automationiot-integration

More WWW/HTTP packages