PyVLX is a wrapper for the Velux KLF 200 API. PyVLX enables you to run scenes and or open and close velux windows.
Project description
PyVLX - controling VELUX windows with Python
PyVLX uses the Velux KLF 200 interface to control io-Homecontrol devices, e.g. Velux Windows.
Please note: The KLF 200 is discontinued by Velux and even though the KLF 150 is marketed as its replacement device, it does not work with this library (it is missing the local API) unfortunately.
Installation
PyVLX can be installed via:
pip3 install pyvlx
Home Assistant Plugin
PyVLX is used within Home Assistant. The HA Velux integration can be added in the HA UI.
Please note that to connect you need to use the WiFi password, not the web login.
For debugging frames enable debug logging for the Velux integration in the HA UI.
Basic Operations
"""Just a demo of the PyVLX module."""
import asyncio
import logging
from pyvlx import Position, PyVLX
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__':
logging.basicConfig(level=logging.DEBUG)
myloop = asyncio.new_event_loop()
myloop.run_until_complete(main(myloop))
# loop.run_forever()
myloop.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
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 pyvlx-0.2.29.tar.gz.
File metadata
- Download URL: pyvlx-0.2.29.tar.gz
- Upload date:
- Size: 3.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f30476ddc9d9f0e0f9288e597ff494ce6c69650880a6130e2c37684a27bc646b
|
|
| MD5 |
c65a31809741f344d693ea75108c203f
|
|
| BLAKE2b-256 |
146b7a929165e393d9dc8fed209425da3c1c0d5264ffe975b4ba95e04aabfb90
|
Provenance
The following attestation bundles were made for pyvlx-0.2.29.tar.gz:
Publisher:
publish.yml on Julius2342/pyvlx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyvlx-0.2.29.tar.gz -
Subject digest:
f30476ddc9d9f0e0f9288e597ff494ce6c69650880a6130e2c37684a27bc646b - Sigstore transparency entry: 941714137
- Sigstore integration time:
-
Permalink:
Julius2342/pyvlx@b99089dcdc77d473588b8a95409a0d000ce112c6 -
Branch / Tag:
refs/tags/0.2.29 - Owner: https://github.com/Julius2342
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b99089dcdc77d473588b8a95409a0d000ce112c6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pyvlx-0.2.29-py3-none-any.whl.
File metadata
- Download URL: pyvlx-0.2.29-py3-none-any.whl
- Upload date:
- Size: 3.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51442e28e976f0189a9f870084e173332114c80a6c2ece7b1cbdc058cc642520
|
|
| MD5 |
66ce13196915f073be42e1212695ee12
|
|
| BLAKE2b-256 |
b6c85317aabaa8afd54a7cb54ccefd433546ac11f38d7f8060df860115cc49e3
|
Provenance
The following attestation bundles were made for pyvlx-0.2.29-py3-none-any.whl:
Publisher:
publish.yml on Julius2342/pyvlx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyvlx-0.2.29-py3-none-any.whl -
Subject digest:
51442e28e976f0189a9f870084e173332114c80a6c2ece7b1cbdc058cc642520 - Sigstore transparency entry: 941714155
- Sigstore integration time:
-
Permalink:
Julius2342/pyvlx@b99089dcdc77d473588b8a95409a0d000ce112c6 -
Branch / Tag:
refs/tags/0.2.29 - Owner: https://github.com/Julius2342
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b99089dcdc77d473588b8a95409a0d000ce112c6 -
Trigger Event:
release
-
Statement type: