Skip to main content

Python client library and CLI for InvisOutlet smart outlets

Project description

invisoutlet

ci codecov docs PyPI Python License: MIT

A Python client library and command-line tool for InvisOutlet smart outlets. It talks to the device directly over its local network API, so there's no cloud in the loop. This is an independent project, and it isn't affiliated with or endorsed by InvisOutlet.

Features

  • Local-only — speaks the device's on-device WebSocket API directly; no cloud account, no internet dependency.
  • Push-driven — subscribe to live sensor, outlet, and OTA updates as the device emits them; auto-reconnects with backoff.
  • Full device surface — outlets, nightlight and Aura color arrays (static color/temperature, per-LED palettes, animated effects), sensor readings, configuration, accessory names, calibration, and OTA firmware updates.
  • Typed, async APIasyncio throughout, parsed dataclass models, and exceptions on failure (no error codes to check).
  • invis CLI — discover devices on the network and drive every command from the terminal.
  • Lightweight core — the library depends only on aiohttp and zeroconf; CLI deps are an optional extra.

Install

uv pip install -e ".[dev]"          # library + CLI + tests, into the project venv
uv tool install --editable ".[cli]" # or just the `invis` command, globally

The library itself only needs aiohttp and zeroconf; the invis CLI's extra dependencies (typer, rich, questionary) live under the cli extra, so embedding the library elsewhere stays lightweight.

Using the library

import asyncio
from invisoutlet import InvisOutletClient

async def main() -> None:
    async with InvisOutletClient("10.42.44.90") as client:
        print(await client.get_device_info())
        await client.set_outlet(1, True)

asyncio.run(main())

Using the CLI

invis default select     # discover, pick, and save a default device
invis device info
invis outlet on 1
invis watch --us
invis nightlight aura color 200 90

The first time you run a command without a saved device, the CLI scans the network and lets you pick one.

Documentation

The full API and CLI reference lives on the documentation site.

Development

uv pip install -e ".[dev]"
uv run pytest -q

License

MIT

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

invisoutlet-1.0.1.tar.gz (48.9 kB view details)

Uploaded Source

Built Distribution

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

invisoutlet-1.0.1-py3-none-any.whl (38.3 kB view details)

Uploaded Python 3

File details

Details for the file invisoutlet-1.0.1.tar.gz.

File metadata

  • Download URL: invisoutlet-1.0.1.tar.gz
  • Upload date:
  • Size: 48.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for invisoutlet-1.0.1.tar.gz
Algorithm Hash digest
SHA256 03ae6e6fbc7834fe29f616cf8899811e5588a3ee3f8499dc556f148aa9c05059
MD5 f3e2116bd4f1db50368e25230a37e79e
BLAKE2b-256 5fffdb0dd8deff16af71649127db715232b43b2809a64d252c2bf36525be284d

See more details on using hashes here.

Provenance

The following attestation bundles were made for invisoutlet-1.0.1.tar.gz:

Publisher: release.yaml on tinkerborg/invisoutlet

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file invisoutlet-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: invisoutlet-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 38.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for invisoutlet-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 93e04d644ceee34042c65b2858388937cb958e47b0d177a22d13d567fbb2d9b0
MD5 647395a0fa036fa617555501dab9e4f0
BLAKE2b-256 7a4c6ba31b83b04fb2085ee25a7323a44b527aca34ae86528a0ca378c9cf22ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for invisoutlet-1.0.1-py3-none-any.whl:

Publisher: release.yaml on tinkerborg/invisoutlet

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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