Skip to main content

Python: Async IO Modern Forms API Client

GitHub Workflow Status Codecov License: MIT PyPI

Asynchronous Python client for Modern Forms Fans.

About

This package allows you to control and monitor Modern Forms fans programmatically. It is mainly created to allow third-party programs to automate the behavior of the Modern Forms fans

Installation

pip install aiomodernforms

Usage

"""Asynchronous Python client for Async IO Modern Forms fan."""

import asyncio
from datetime import datetime, timedelta

import aiomodernforms
from aiomodernforms.const import LIGHT_POWER_ON


async def main():
    """Turn on the fan light."""
    async with aiomodernforms.ModernFormsDevice("192.168.3.197") as fan:
        await fan.update()
        print(fan.status)
        await fan.light(
            on=LIGHT_POWER_ON,
            brightness=50,
            sleep=datetime.now() + timedelta(minutes=2),
        )
        print(fan.status)


if __name__ == "__main__":
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main())

Reporting compatibility issues

WAC and Modern Forms fans span several hardware generations, and not every generation behaves identically. If this library doesn't work correctly against your fan, run diagnose.py against it and paste the output into a GitHub issue:

python diagnose.py <fan-ip-address>
# or, from a checkout with a dev environment set up:
make diagnose HOST=<fan-ip-address>

This prints a Markdown report — parsed capability flags, the raw API responses, and any response fields this library doesn't recognize yet — that helps pinpoint model/generation differences. It redacts your account email, AWS identity, MAC address, device name, and certificate ID, and never includes the fan's IP address, so the output is safe to paste as-is. Still, give it a quick read before posting.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiomodernforms-0.2.0.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

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

aiomodernforms-0.2.0-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file aiomodernforms-0.2.0.tar.gz.

File metadata

  • Download URL: aiomodernforms-0.2.0.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for aiomodernforms-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1dadb9f0d69a0f7631b1671a2e037e7aad2d5e197cc8da7561b54f17c0773bcf
MD5 1d07224c9d14a460cf7a00cb33eed652
BLAKE2b-256 4dde36970e7c7ce813557f29bfdc3cf935202b870e5a2e63f29b0b1988aabcb2

See more details on using hashes here.

File details

Details for the file aiomodernforms-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: aiomodernforms-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for aiomodernforms-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0bacc460a8a3e53c4c084612cf733847efc203f3e09a8f200ef0d31f369b38be
MD5 2b3e06abc005a9734671b1350fa312eb
BLAKE2b-256 c23514e3cb83536e8687b69545f14bf37ea6b3a8a2bd7e8cad10ffa70c3e4edc

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page