Skip to main content

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

CI

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyvlx-0.2.30.tar.gz (3.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyvlx-0.2.30-py3-none-any.whl (3.1 MB view details)

Uploaded Python 3

File details

Details for the file pyvlx-0.2.30.tar.gz.

File metadata

  • Download URL: pyvlx-0.2.30.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

Hashes for pyvlx-0.2.30.tar.gz
Algorithm Hash digest
SHA256 11308f77f9a470cd455269e228fc0117884c066932be02c1760c651930718803
MD5 323a603bd734a7c3d9e7fd9a2b583003
BLAKE2b-256 6d071e5bf4da90ffa0f818c9077a24026dcb4000d11e8e21fecec4b1094e2b2e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyvlx-0.2.30.tar.gz:

Publisher: publish.yml on Julius2342/pyvlx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyvlx-0.2.30-py3-none-any.whl.

File metadata

  • Download URL: pyvlx-0.2.30-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

Hashes for pyvlx-0.2.30-py3-none-any.whl
Algorithm Hash digest
SHA256 f809c00cc19b48c98fca17d70a1dc34f1b7faf44fbacd8fab5a9e21b0f0c9442
MD5 fb9f8046e0cdf2ed4f23dcef6a8a6ea9
BLAKE2b-256 6b53a60ec35f6e178f6d7e38bca1bde73934a34af5442885fd07106d89fa3542

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyvlx-0.2.30-py3-none-any.whl:

Publisher: publish.yml on Julius2342/pyvlx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page