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.0.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.0-py3-none-any.whl (38.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: invisoutlet-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 6c04cddb1ec485e9390f0797c19a692862f94d70f38971a8b8a1d9c18ea177d5
MD5 da67158f59e9403d93af69fcf9f2ce34
BLAKE2b-256 17b8bc7a392eff0315487c6008594c4fdf9a5d660c94b9f5660ab29b7aba6b60

See more details on using hashes here.

Provenance

The following attestation bundles were made for invisoutlet-1.0.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: invisoutlet-1.0.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a964da61adc47ce1a3146c76c3985da0c307d7817fb8d45c4cb8471e787edb8d
MD5 e921d8ed0585ddb11ba7037ceb2cc478
BLAKE2b-256 74daac738a4dc08c8c5f23c71c0fe72f58b9b296de4bad6e6577a1ce0af3f8e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for invisoutlet-1.0.0-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