Skip to main content

PyVLX is a wrapper for the Velux KLF 200 API.

Project description

PyVLX enables you to run scenes and or open and close velux windows.
Home-page: https://github.com/Julius2342/pyvlx
Author: Julius Mittenzwei
Author-email: julius@mittenzwei.com
License: LGPL
Download-URL: https://github.com/Julius2342/pyvlx/archive/0.2.10.zip
Description: PyVLX - controling VELUX windows with Python
============================================

[![Build Status](https://travis-ci.org/Julius2342/pyvlx.svg?branch=master)](https://travis-ci.org/Julius2342/pyvlx)

PyVLX uses the Velux KLF 200 interface to control io-Homecontrol devices, e.g. Velux Windows.

**Note:** To use version 0.2.\* you have to install the [new Firmware](https://www.velux.com/api/klf200) on your KLF device. If you dont want to use the new firmware install pyvlx==0.1.6.

Installation
------------

PyVLX can be installed via:

```bash
pip3 install pyvlx
```

Home Assistant Plugin
---------------------

PyVLX is used within [Home-Assistant](https://www.home-assistant.io/components/velux/). To enable it add the following lines to your ~/.home-assistant/configuration.yml:

```yaml
velux:
host: "192.168.0.0"
password: "1ADwl48dka"
```

*Please note that this uses the WiFi password, not the web login.*

For debugging frames add:

```yaml
logger:
default: warning
logs:
homeassistant.components.velux: debug
pyvlx: debug
```


Basic Operations
----------------

```python
"""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()
```



Keywords: velux KLF 200 home automation
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Developers
Classifier: Topic :: System :: Hardware :: Hardware Drivers
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6

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.10.tar.gz (25.7 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: pyvlx-0.2.10.tar.gz
  • Upload date:
  • Size: 25.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.6.3

File hashes

Hashes for pyvlx-0.2.10.tar.gz
Algorithm Hash digest
SHA256 2a0220ee5e0eeb845824d37c6e44a979c97aa02668f400440970c67ac3073057
MD5 7d680ca2d8760544309ee7048e22a11d
BLAKE2b-256 77beccda5b50a82aecb3ea66381f7fe205ee1a9465124f800e2a7ea0bb6c3468

See more details on using hashes here.

Supported by

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