PyVLX is a wrapper for the Velux KLF 200 API. It enables run scenes, open, close windows. + SWINGING_SHUTTERS as ROLLER_SHUTTER
Project description
PyVLX - controling VELUX windows with Python
PyVLX uses the Velux KLF 200 interface to control io-Homecontrol devices, e.g. Velux Windows.
Installation
PyVLX can be installed via:
pip3 install pyvlx
Home Assistant Plugin
PyVLX is used within Home Assistant. To enable it add the following lines to your ~/.homeassistant/configuration.yml:
velux:
host: "192.168.0.0"
password: "1ADwl48dka"
Please note that this uses the WiFi password, not the web login.
For debugging frames add:
logger:
default: warning
logs:
homeassistant.components.velux: debug
pyvlx: debug
Basic Operations
"""Just a demo of the new PyVLX module."""
import asyncio
from pyvlx import PyVLX, Position
async def main(loop):
"""Demonstrate functionality of PyVLX."""
pyvlx = PyVLX('pyvlx.yaml', loop=loop)
# Alternative:
# pyvlx = PyVLX(host="192.168.2.127", password="velux123", loop=loop)
# Runing scenes:
await pyvlx.load_scenes()
await pyvlx.scenes["All Windows Closed"].run()
# Changing position of windows:
await pyvlx.load_nodes()
await pyvlx.nodes['Bath'].open()
await pyvlx.nodes['Bath'].close()
await pyvlx.nodes['Bath'].set_position(Position(position_percent=45))
# Changing of on-off switches:
# await pyvlx.nodes['CoffeeMaker'].set_on()
# await pyvlx.nodes['CoffeeMaker'].set_off()
# You can easily rename nodes:
# await pyvlx.nodes["Window 10"].rename("Window 11")
await pyvlx.disconnect()
if __name__ == '__main__':
# pylint: disable=invalid-name
LOOP = asyncio.get_event_loop()
LOOP.run_until_complete(main(LOOP))
# LOOP.run_forever()
LOOP.close()
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
pyvlx-tp85-0.0.1.tar.gz
(39.4 kB
view hashes)
Built Distribution
pyvlx_tp85-0.0.1-py3-none-any.whl
(70.8 kB
view hashes)
Close
Hashes for pyvlx_tp85-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5066940867c5b913e3a594faa4c9b6608e7bf1e112d1aeff2cef255ddacc33c |
|
MD5 | 701f91e0782d212511dd2749e4b2a5a6 |
|
BLAKE2b-256 | b0374c0929307b4df51a9abe13dc59ddeb7af27092774d7fb2b684139e5b83c2 |