An interface to control ModerForms smart fans
Project description
Modern Forms smart fan interface
Modern Forms has a collection of cloud connected Wi-Fi smart fans. They can be controlled via their app, but they also support local control. This project is an interface to control their fans locally via the REST API on the fan.
All aspects of the fan and option light kit can be controlled.
The REST API of the fan is unpublished. It was mapped out using a packet capture and interactions with their app. Since the manufacturer was unwilling to publish the API it is subject to change and break at any time.
Invocation
Import into your code and create a ModernFormsFan object
import modernforms
fan = moderforms.ModernFormsFan('192.168.1.10', 5)
Constructor takes 2 arguments. The IP or hostname (if you DNS registered your fan) and the timeout for communicating with the fan.
The timeout is optional and has a default value of 5.
Fan Control
The fan has 3 attributes to control:
- fan_on
- fan_speed
- fan_direction
>>> fan.fan_on
False
>>> fan.fan_on = True
>>> fan.fan_on
True
Light Control
The light kit has two attributes to control:
- light_on
- light_brightness
>>> fan.light_on
False
>>> fan.light_on = True
>>> fan.light_on
True
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file modernforms-0.1.6.tar.gz.
File metadata
- Download URL: modernforms-0.1.6.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.55.2 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cad87dc632ba0165e508079169ed89eded92c123372a5d8e457c51557af3a1e
|
|
| MD5 |
70d31d0dfeaa1e6b01502cb9d25e3443
|
|
| BLAKE2b-256 |
00e77dfeb062b6c6f638db38842c42b66b1b52561dace5fab81230e1273595d8
|
File details
Details for the file modernforms-0.1.6-py3-none-any.whl.
File metadata
- Download URL: modernforms-0.1.6-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.55.2 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e480b4dd53717a2d018dfd35df2cb0656b0f0b7a9fa7f3c10ada0138db267491
|
|
| MD5 |
4b6a172453bcb58da86cb57e989a20ba
|
|
| BLAKE2b-256 |
dfefb4577db3104788c7f1d7954c2d6674a0ad8f58566321635ee88a33d8d579
|