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))
# Read limits of windows
# limit = await pyvlx.nodes['Bath'].get_limitation()
# limit.min_value
# limit.max_value
# 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()
Metadata
Release files for pyvlx-tp85 2.21.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyvlx-tp85-2.21.2.tar.gz | 51.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyvlx_tp85-2.21.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 136.7 kB
Release files / pyvlx-tp85-2.21.2.tar.gz
| Download URL | pyvlx-tp85-2.21.2.tar.gz |
|---|---|
| Size | 51.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dfdd137ffa66b8160c45179583cdc145d233028de2627d131fc08a95418c9454
|
|
BLAKE2b-256 checksum How to use checksums |
b537cd613a640992a8899e47f679a58646fc1b0fce3b49ff9cd00e0b03a245dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.8.10
|
Release files / pyvlx_tp85-2.21.2-py3-none-any.whl
| Download URL | pyvlx_tp85-2.21.2-py3-none-any.whl |
|---|---|
| Size | 85.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e48221ae4a8c369652fc340af9ba25febee974c7fe69779cbf4fb14a605c57ca
|
|
BLAKE2b-256 checksum How to use checksums |
f4da2478d7b4bda8986a00b80b2a4331244283c05c61da12e5685c50ce1a96a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.8.10
|