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
Hashes for modernforms-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e480b4dd53717a2d018dfd35df2cb0656b0f0b7a9fa7f3c10ada0138db267491 |
|
MD5 | 4b6a172453bcb58da86cb57e989a20ba |
|
BLAKE2b-256 | dfefb4577db3104788c7f1d7954c2d6674a0ad8f58566321635ee88a33d8d579 |